Tweak linux_glibc properties for musl builds in bionic

For convenience, builds against musl libc currently use the
linux_glibc properties because they are almost always linux-specific
and not glibc-specific.  In preparation for removing this hack,
tweak the linux_glibc properties by either moving them to host_linux,
which will apply to linux_glibc, linux_musl and linux_bionic, or
by setting appropriate musl or linux_musl properties.  Properties
that must not be repeated while musl uses linux_musl and also still
uses the linux_glibc properties are moved to glibc properties, which
don't apply to musl.  Whether these stay as glibc properties or get
moved back to linux_glibc later once the musl hack is removed is TBD.

Bug: 223257095
Test: m checkbuild
Test: m USE_HOST_MUSL=true host-native
Change-Id: I809bf1ba783dff02f6491d87fbdc9fa7fc0975b0
This commit is contained in:
Colin Cross 2022-03-08 15:07:57 -08:00
parent 471bef4d34
commit da446cc5cc
2 changed files with 9 additions and 6 deletions

View file

@ -43,6 +43,9 @@ cc_defaults {
linux_glibc_x86: {
enabled: false,
},
linux_musl_x86: {
enabled: false,
},
},
}
@ -103,6 +106,11 @@ cc_defaults {
"-Wl,--rpath,${ORIGIN}/../../lib64",
],
},
linux_musl_x86_64: {
ldflags: [
"-Wl,--rpath,${ORIGIN}/../../lib64",
],
},
},
}

View file

@ -28,16 +28,11 @@ cc_object {
name: "linker_wrapper",
host_supported: true,
device_supported: false,
enabled: false,
target: {
linux_bionic: {
enabled: true,
},
linux_glibc: {
enabled: false,
},
darwin: {
enabled: false,
},
},
cflags: [