Merge "Enable safe ICF with LLD." am: 63c6361f91 am: e77fe6ac08

am: 6cfa0e453a

Change-Id: I0a67788593daef55c323c85b2e778561473c4458
This commit is contained in:
Peter Collingbourne 2018-10-26 18:23:11 -07:00 committed by android-build-merger
commit caf7f87a65
2 changed files with 4 additions and 1 deletions

View File

@ -86,7 +86,6 @@ var ClangUnknownCflags = sorted([]string{
// Ldflags that should be filtered out when linking with clang lld
var ClangUnknownLldflags = sorted([]string{
"-fuse-ld=gold",
"-Wl,--icf=safe",
"-Wl,--fix-cortex-a8",
"-Wl,--no-fix-cortex-a8",
"-Wl,-m,aarch64_elf64_le_vec",

View File

@ -39,6 +39,10 @@ func ObjectFactory() android.Module {
baseLinker: NewBaseLinker(nil),
}
module.compiler = NewBaseCompiler()
// Clang's address-significance tables are incompatible with ld -r.
module.compiler.appendCflags([]string{"-fno-addrsig"})
module.stl = &stl{}
return module.Init()
}