Work around b/24465209, do not use clang lld

See longer explanation in b/80093890.
Clang lld does not generate expected DT_REL and DT_RELA tags
with --hash-style=both and --pack-dyn-relocs=android.
I am not sure about the extent of b/24465209, so
I would rather not to use lld for these .so files for now.

Bug: 80093890
Bug: 24465209
Test: build with USE_CLANG_LLD=true and run dlext.compat_elf_hash_and_relocation_tables
Change-Id: I94e9fe8d687daeadb0182ae26596ca11d3f8bd9b
This commit is contained in:
Chih-Hung Hsieh 2018-05-22 21:34:26 -07:00 committed by Chih-hung Hsieh
parent a6a56784e0
commit 0fc5df0fde
3 changed files with 8 additions and 0 deletions

View File

@ -1773,6 +1773,7 @@ cc_library {
arm: { arm: {
//TODO: This is to work around b/24465209. Remove after root cause is fixed //TODO: This is to work around b/24465209. Remove after root cause is fixed
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
use_clang_lld: false,
// Don't re-export new/delete and friends, even if the compiler really wants to. // Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.arm.map", version_script: "libc.arm.map",
@ -1806,6 +1807,7 @@ cc_library {
x86: { x86: {
//TODO: This is to work around b/24465209. Remove after root cause is fixed //TODO: This is to work around b/24465209. Remove after root cause is fixed
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
use_clang_lld: false,
// Don't re-export new/delete and friends, even if the compiler really wants to. // Don't re-export new/delete and friends, even if the compiler really wants to.
version_script: "libc.x86.map", version_script: "libc.x86.map",
@ -1837,6 +1839,7 @@ cc_library {
arch: { arch: {
arm: { arm: {
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
use_clang_lld: false,
version_script: "libstdc++.arm.map", version_script: "libstdc++.arm.map",
}, },
arm64: { arm64: {
@ -1850,6 +1853,7 @@ cc_library {
}, },
x86: { x86: {
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
use_clang_lld: false,
version_script: "libstdc++.x86.map", version_script: "libstdc++.x86.map",
}, },
x86_64: { x86_64: {

View File

@ -50,6 +50,7 @@ cc_library {
arm: { arm: {
version_script: "libdl.arm.map", version_script: "libdl.arm.map",
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
use_clang_lld: false,
}, },
arm64: { arm64: {
version_script: "libdl.arm64.map", version_script: "libdl.arm64.map",
@ -65,6 +66,7 @@ cc_library {
"-Wl,--exclude-libs=libgcc_eh.a", "-Wl,--exclude-libs=libgcc_eh.a",
"-Wl,--hash-style=both", "-Wl,--hash-style=both",
], ],
use_clang_lld: false,
version_script: "libdl.x86.map", version_script: "libdl.x86.map",
}, },
x86_64: { x86_64: {

View File

@ -294,6 +294,7 @@ cc_library {
}, },
instruction_set: "arm", instruction_set: "arm",
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
use_clang_lld: false,
version_script: "libm.arm.map", version_script: "libm.arm.map",
}, },
@ -421,6 +422,7 @@ cc_library {
}, },
local_include_dirs: ["i387"], local_include_dirs: ["i387"],
ldflags: ["-Wl,--hash-style=both"], ldflags: ["-Wl,--hash-style=both"],
use_clang_lld: false,
version_script: "libm.x86.map", version_script: "libm.x86.map",
}, },