Remove libgcc toolchain libs for Android
Remove Android-targeting gcc toolchain libraries -- libgcc,
libgcc_stripped, libatomic, and libgcov. Also remove libunwind_llvm,
which is replaced with a libunwind toolchain prebuilt.
The __atomic_* library functions are now part of the compiler-rt
builtins library:
https://android-review.googlesource.com/c/toolchain/llvm_android/+/1625025
Bug: http://b/153025717
Test: treehugger
Change-Id: I971d0a4a49f1aaeb3546e80b6d94208277a171ac
diff --git a/cc/cc_test.go b/cc/cc_test.go
index 76e75da..9fc1f35 100644
--- a/cc/cc_test.go
+++ b/cc/cc_test.go
@@ -2912,13 +2912,13 @@
// 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 {
diff --git a/cc/linker.go b/cc/linker.go
index 21281d2..ae33356 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -321,10 +321,9 @@
}
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
diff --git a/cc/testing.go b/cc/testing.go
index 6e35655..ff32bff 100644
--- a/cc/testing.go
+++ b/cc/testing.go
@@ -63,17 +63,6 @@
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,
vendor_ramdisk_available: true,
@@ -200,29 +189,6 @@
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 @@
"//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",