Merge "Set -fsjlj-exceptions for all 32-bit Windows compiles"

This commit is contained in:
Pirama Arumuga Nainar 2020-09-10 20:41:41 +00:00 committed by Gerrit Code Review
commit 0710d8e1cc
2 changed files with 5 additions and 6 deletions

View file

@ -49,7 +49,11 @@ var (
windowsClangCppflags = []string{}
windowsX86ClangCppflags = []string{}
windowsX86ClangCppflags = []string{
// Use SjLj exceptions for 32-bit. libgcc_eh implements SjLj
// exception model for 32-bit.
"-fsjlj-exceptions",
}
windowsX8664ClangCppflags = []string{}

View file

@ -239,11 +239,6 @@ func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags {
flags.Local.CppFlags = append(flags.Local.CppFlags, "-nostdinc++")
flags.extraLibFlags = append(flags.extraLibFlags, "-nostdlib++")
if ctx.Windows() {
// Use SjLj exceptions for 32-bit. libgcc_eh implements SjLj
// exception model for 32-bit.
if ctx.Arch().ArchType == android.X86 {
flags.Local.CppFlags = append(flags.Local.CppFlags, "-fsjlj-exceptions")
}
flags.Local.CppFlags = append(flags.Local.CppFlags,
// Disable visiblity annotations since we're using static
// libc++.