Clean up no_libgcc
no_libgcc is no longer needed anywhere. Move all occurances to no_libcrt
and remove no_libgcc.
Test: build
Change-Id: I6dd49db71d05d7685aa90cc837627f65e6742d6d
diff --git a/cc/cc_test.go b/cc/cc_test.go
index 997e11e..ca34185 100644
--- a/cc/cc_test.go
+++ b/cc/cc_test.go
@@ -184,7 +184,7 @@
cc_library {
name: "libTest",
srcs: ["foo.c"],
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
system_shared_libs: [],
vendor_available: true,
@@ -647,7 +647,7 @@
testCcError(t, "module \".*\" variant \".*\": link.* \".*\" which is not LL-NDK, VNDK-SP, .*double_loadable", `
cc_library {
name: "libllndk",
- no_libgcc: true,
+ no_libcrt: true,
shared_libs: ["libnondoubleloadable"],
}
@@ -1786,7 +1786,7 @@
shared_libs: ["libllndk"],
vendor: true,
srcs: ["foo.c"],
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
}
`)
@@ -1815,7 +1815,7 @@
cc_library {
name: "libvendor_available1",
vendor_available: true,
- no_libgcc : true,
+ no_libcrt : true,
nocrt : true,
system_shared_libs : [],
}
@@ -1823,7 +1823,7 @@
name: "libvendor_available2",
vendor_available: true,
runtime_libs: ["libvendor_available1"],
- no_libgcc : true,
+ no_libcrt : true,
nocrt : true,
system_shared_libs : [],
}
@@ -1836,21 +1836,21 @@
exclude_runtime_libs: ["libvendor_available1"],
}
},
- no_libgcc : true,
+ no_libcrt : true,
nocrt : true,
system_shared_libs : [],
}
cc_library {
name: "libcore",
runtime_libs: ["libvendor_available1"],
- no_libgcc : true,
+ no_libcrt : true,
nocrt : true,
system_shared_libs : [],
}
cc_library {
name: "libvendor1",
vendor: true,
- no_libgcc : true,
+ no_libcrt : true,
nocrt : true,
system_shared_libs : [],
}
@@ -1858,7 +1858,7 @@
name: "libvendor2",
vendor: true,
runtime_libs: ["libvendor_available1", "libvendor1"],
- no_libgcc : true,
+ no_libcrt : true,
nocrt : true,
system_shared_libs : [],
}
@@ -2050,7 +2050,7 @@
name: "libvendorpublic",
srcs: ["foo.c"],
vendor: true,
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
}
@@ -2059,7 +2059,7 @@
shared_libs: ["libvendorpublic"],
vendor: false,
srcs: ["foo.c"],
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
}
cc_library {
@@ -2067,7 +2067,7 @@
shared_libs: ["libvendorpublic"],
vendor: true,
srcs: ["foo.c"],
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
}
`)
diff --git a/cc/linker.go b/cc/linker.go
index 986a562..dda2fcb 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -57,9 +57,6 @@
// This flag should only be necessary for compiling low-level libraries like libc.
Allow_undefined_symbols *bool `android:"arch_variant"`
- // don't link in libgcc.a
- No_libgcc *bool
-
// don't link in libclang_rt.builtins-*.a
No_libcrt *bool `android:"arch_variant"`
@@ -230,9 +227,6 @@
deps.LateStaticLibs = append(deps.LateStaticLibs, config.BuiltinsRuntimeLibrary(ctx.toolchain()))
deps.LateStaticLibs = append(deps.LateStaticLibs, "libatomic")
deps.LateStaticLibs = append(deps.LateStaticLibs, "libgcc_stripped")
- } else if !Bool(linker.Properties.No_libgcc) {
- deps.LateStaticLibs = append(deps.LateStaticLibs, "libatomic")
- deps.LateStaticLibs = append(deps.LateStaticLibs, "libgcc")
}
systemSharedLibs := linker.Properties.System_shared_libs
diff --git a/cc/testing.go b/cc/testing.go
index d9be900..df7cb78 100644
--- a/cc/testing.go
+++ b/cc/testing.go
@@ -78,7 +78,7 @@
cc_library {
name: "libc",
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
system_shared_libs: [],
recovery_available: true,
@@ -89,7 +89,7 @@
}
cc_library {
name: "libm",
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
system_shared_libs: [],
recovery_available: true,
@@ -100,7 +100,7 @@
}
cc_library {
name: "libdl",
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
system_shared_libs: [],
recovery_available: true,
@@ -111,7 +111,7 @@
}
cc_library {
name: "libc++_static",
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
system_shared_libs: [],
stl: "none",
@@ -120,7 +120,7 @@
}
cc_library {
name: "libc++",
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
system_shared_libs: [],
stl: "none",
@@ -133,7 +133,7 @@
}
cc_library {
name: "libunwind_llvm",
- no_libgcc: true,
+ no_libcrt: true,
nocrt: true,
system_shared_libs: [],
stl: "none",