Merge "Remove libgcc toolchain libs for Android" am: 3f3bb83f81 am: f72c6f2e44 am: a5934e3408

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1663859

Change-Id: Ia4b0f7de3bac88ab90a3ca0a6dd647117275aa7c
This commit is contained in:
Ryan Prichard 2021-04-07 00:15:50 +00:00 committed by Automerger Merge Worker
commit a467ea4870
7 changed files with 3 additions and 187 deletions

View File

@ -46,101 +46,6 @@ cc_defaults {
// C static libraries extracted from the gcc toolchain
//
toolchain_library {
name: "libatomic",
defaults: ["linux_bionic_supported"],
vendor_available: true,
product_available: true,
ramdisk_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_bridge_supported: true,
arch: {
arm: {
src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/lib/libatomic.a",
},
arm64: {
src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/lib64/libatomic.a",
},
x86: {
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/lib/libatomic.a",
},
x86_64: {
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/x86_64-linux-android/lib64/libatomic.a",
},
},
}
toolchain_library {
name: "libgcc",
defaults: ["linux_bionic_supported"],
vendor_available: true,
product_available: true,
recovery_available: true,
native_bridge_supported: true,
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
arch: {
arm: {
src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a",
},
arm64: {
src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcc.a",
},
x86: {
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcc.a",
},
x86_64: {
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a",
},
},
}
toolchain_library {
name: "libgcc_stripped",
defaults: ["linux_bionic_supported"],
vendor_available: true,
product_available: true,
ramdisk_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
native_bridge_supported: true,
sdk_version: "current",
arch: {
arm: {
src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcc.a",
repack_objects_to_keep: [],
enabled: false,
},
arm64: {
src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcc.a",
repack_objects_to_keep: [
"unwind-dw2.o",
"unwind-dw2-fde-dip.o",
],
},
x86: {
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcc.a",
repack_objects_to_keep: [
"unwind-dw2.o",
"unwind-dw2-fde-dip.o",
],
},
x86_64: {
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcc.a",
repack_objects_to_keep: [
"unwind-dw2.o",
"unwind-dw2-fde-dip.o",
],
},
},
}
toolchain_library {
name: "libwinpthread",
host_supported: true,
@ -159,26 +64,6 @@ toolchain_library {
notice: ":mingw-libwinpthread-notice",
}
toolchain_library {
name: "libgcov",
defaults: ["linux_bionic_supported"],
arch: {
arm: {
src: "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi/4.9.x/libgcov.a",
},
arm64: {
src: "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/lib/gcc/aarch64-linux-android/4.9.x/libgcov.a",
},
x86: {
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/32/libgcov.a",
},
x86_64: {
src: "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/lib/gcc/x86_64-linux-android/4.9.x/libgcov.a",
},
},
}
kernel_headers {
name: "device_kernel_headers",
vendor: true,

View File

@ -2938,9 +2938,7 @@ func makeApexAvailableBaseline() map[string][]string {
"com.google.android.material_material",
"com.google.android.material_material-nodeps",
"libatomic",
"libclang_rt",
"libgcc_stripped",
"libprofile-clang-extras",
"libprofile-clang-extras_ndk",
"libprofile-extras",

View File

@ -37,17 +37,6 @@ toolchain_library {
recovery_available: true,
native_bridge_supported: true,
src: "",
}
toolchain_library {
name: "libatomic",
defaults: ["linux_bionic_supported"],
vendor_available: true,
vendor_ramdisk_available: true,
product_available: true,
recovery_available: true,
native_bridge_supported: true,
src: "",
}`
)

View File

@ -37,17 +37,6 @@ toolchain_library {
recovery_available: true,
native_bridge_supported: true,
src: "",
}
toolchain_library {
name: "libatomic",
defaults: ["linux_bionic_supported"],
vendor_available: true,
vendor_ramdisk_available: true,
product_available: true,
recovery_available: true,
native_bridge_supported: true,
src: "",
}`
)

View File

@ -2912,13 +2912,13 @@ func TestStaticLibDepExport(t *testing.T) {
// Check the shared version of lib2.
variant := "android_arm64_armv8-a_shared"
module := ctx.ModuleForTests("lib2", variant).Module().(*Module)
checkStaticLibs(t, []string{"lib1", "libc++demangle", "libclang_rt.builtins-aarch64-android", "libatomic"}, module)
checkStaticLibs(t, []string{"lib1", "libc++demangle", "libclang_rt.builtins-aarch64-android"}, module)
// Check the static version of lib2.
variant = "android_arm64_armv8-a_static"
module = ctx.ModuleForTests("lib2", variant).Module().(*Module)
// libc++_static is linked additionally.
checkStaticLibs(t, []string{"lib1", "libc++_static", "libc++demangle", "libclang_rt.builtins-aarch64-android", "libatomic"}, module)
checkStaticLibs(t, []string{"lib1", "libc++_static", "libc++demangle", "libclang_rt.builtins-aarch64-android"}, module)
}
var compilerFlagsTestCases = []struct {

View File

@ -321,10 +321,9 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
}
if ctx.toolchain().Bionic() {
// libclang_rt.builtins and libatomic have to be last on the command line
// libclang_rt.builtins has to be last on the command line
if !Bool(linker.Properties.No_libcrt) {
deps.LateStaticLibs = append(deps.LateStaticLibs, config.BuiltinsRuntimeLibrary(ctx.toolchain()))
deps.LateStaticLibs = append(deps.LateStaticLibs, "libatomic")
}
deps.SystemSharedLibs = linker.Properties.System_shared_libs

View File

@ -62,17 +62,6 @@ func GatherRequiredDepsForTest(oses ...android.OsType) string {
func commonDefaultModules() string {
return `
toolchain_library {
name: "libatomic",
defaults: ["linux_bionic_supported"],
vendor_available: true,
vendor_ramdisk_available: true,
product_available: true,
recovery_available: true,
native_bridge_supported: true,
src: "",
}
toolchain_library {
name: "libcompiler_rt-extras",
vendor_available: true,
@ -200,29 +189,6 @@ func commonDefaultModules() string {
srcs: [""],
}
toolchain_library {
name: "libgcc",
defaults: ["linux_bionic_supported"],
vendor_available: true,
product_available: true,
recovery_available: true,
src: "",
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
}
toolchain_library {
name: "libgcc_stripped",
defaults: ["linux_bionic_supported"],
vendor_available: true,
product_available: true,
recovery_available: true,
sdk_version: "current",
src: "",
}
cc_library {
name: "libc",
defaults: ["linux_bionic_supported"],
@ -398,16 +364,6 @@ func commonDefaultModules() string {
"//apex_available:anyapex",
],
}
cc_library {
name: "libunwind_llvm",
no_libcrt: true,
nocrt: true,
system_shared_libs: [],
stl: "none",
vendor_available: true,
product_available: true,
recovery_available: true,
}
cc_defaults {
name: "crt_defaults",