Merge "Remove CFI-related WARs that seem no longer necessary"

am: 9c7dcfd72c

Change-Id: I0857e964d456b4e8157acfbc8f49101e409ef2f6
This commit is contained in:
Pirama Arumuga Nainar 2017-11-06 20:34:38 +00:00 committed by android-build-merger
commit dae7f2b07b

View file

@ -34,9 +34,8 @@ var (
cfiCflags = []string{"-flto", "-fsanitize-cfi-cross-dso", cfiCflags = []string{"-flto", "-fsanitize-cfi-cross-dso",
"-fsanitize-blacklist=external/compiler-rt/lib/cfi/cfi_blacklist.txt"} "-fsanitize-blacklist=external/compiler-rt/lib/cfi/cfi_blacklist.txt"}
// FIXME: revert the __cfi_check flag when clang is updated to r280031.
cfiLdflags = []string{"-flto", "-fsanitize-cfi-cross-dso", "-fsanitize=cfi", cfiLdflags = []string{"-flto", "-fsanitize-cfi-cross-dso", "-fsanitize=cfi",
"-Wl,-plugin-opt,O1 -Wl,-export-dynamic-symbol=__cfi_check"} "-Wl,-plugin-opt,O1"}
cfiArflags = []string{"--plugin ${config.ClangBin}/../lib64/LLVMgold.so"} cfiArflags = []string{"--plugin ${config.ClangBin}/../lib64/LLVMgold.so"}
cfiExportsMapPath = "build/soong/cc/config/cfi_exports.map" cfiExportsMapPath = "build/soong/cc/config/cfi_exports.map"
cfiExportsMap android.Path cfiExportsMap android.Path
@ -364,9 +363,6 @@ func (sanitize *sanitize) flags(ctx ModuleContext, flags Flags) Flags {
// __cfi_check needs to be built as Thumb (see the code in linker_cfi.cpp). LLVM is not set up // __cfi_check needs to be built as Thumb (see the code in linker_cfi.cpp). LLVM is not set up
// to do this on a function basis, so force Thumb on the entire module. // to do this on a function basis, so force Thumb on the entire module.
flags.RequiredInstructionSet = "thumb" flags.RequiredInstructionSet = "thumb"
// Workaround for b/33678192. CFI jumptables need Thumb2 codegen. Revert when
// Clang is updated past r290384.
flags.LdFlags = append(flags.LdFlags, "-march=armv7-a")
} }
sanitizers = append(sanitizers, "cfi") sanitizers = append(sanitizers, "cfi")