diff --git a/apex/apex_test.go b/apex/apex_test.go index 5276ce4ed..f71abd77a 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -585,7 +585,7 @@ func TestApexWithSystemLibsStubs(t *testing.T) { cc_library { name: "libc", - no_libgcc: true, + no_libcrt: true, nocrt: true, system_shared_libs: [], stl: "none", @@ -596,7 +596,7 @@ func TestApexWithSystemLibsStubs(t *testing.T) { cc_library { name: "libm", - no_libgcc: true, + no_libcrt: true, nocrt: true, system_shared_libs: [], stl: "none", @@ -607,7 +607,7 @@ func TestApexWithSystemLibsStubs(t *testing.T) { cc_library { name: "libdl", - no_libgcc: true, + no_libcrt: true, nocrt: true, system_shared_libs: [], stl: "none", diff --git a/cc/cc_test.go b/cc/cc_test.go index 997e11eaf..ca34185dc 100644 --- a/cc/cc_test.go +++ b/cc/cc_test.go @@ -184,7 +184,7 @@ func TestVendorSrc(t *testing.T) { 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 @@ func TestDoubleLoadableDepError(t *testing.T) { 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 @@ func TestLlndkHeaders(t *testing.T) { shared_libs: ["libllndk"], vendor: true, srcs: ["foo.c"], - no_libgcc: true, + no_libcrt: true, nocrt: true, } `) @@ -1815,7 +1815,7 @@ const runtimeLibAndroidBp = ` cc_library { name: "libvendor_available1", vendor_available: true, - no_libgcc : true, + no_libcrt : true, nocrt : true, system_shared_libs : [], } @@ -1823,7 +1823,7 @@ const runtimeLibAndroidBp = ` 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 @@ const runtimeLibAndroidBp = ` 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 @@ const runtimeLibAndroidBp = ` name: "libvendor2", vendor: true, runtime_libs: ["libvendor_available1", "libvendor1"], - no_libgcc : true, + no_libcrt : true, nocrt : true, system_shared_libs : [], } @@ -2050,7 +2050,7 @@ func TestVendorPublicLibraries(t *testing.T) { name: "libvendorpublic", srcs: ["foo.c"], vendor: true, - no_libgcc: true, + no_libcrt: true, nocrt: true, } @@ -2059,7 +2059,7 @@ func TestVendorPublicLibraries(t *testing.T) { shared_libs: ["libvendorpublic"], vendor: false, srcs: ["foo.c"], - no_libgcc: true, + no_libcrt: true, nocrt: true, } cc_library { @@ -2067,7 +2067,7 @@ func TestVendorPublicLibraries(t *testing.T) { 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 986a56295..dda2fcb33 100644 --- a/cc/linker.go +++ b/cc/linker.go @@ -57,9 +57,6 @@ type BaseLinkerProperties struct { // 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 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { 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 d9be900af..df7cb78f2 100644 --- a/cc/testing.go +++ b/cc/testing.go @@ -78,7 +78,7 @@ func GatherRequiredDepsForTest(os android.OsType) string { cc_library { name: "libc", - no_libgcc: true, + no_libcrt: true, nocrt: true, system_shared_libs: [], recovery_available: true, @@ -89,7 +89,7 @@ func GatherRequiredDepsForTest(os android.OsType) string { } cc_library { name: "libm", - no_libgcc: true, + no_libcrt: true, nocrt: true, system_shared_libs: [], recovery_available: true, @@ -100,7 +100,7 @@ func GatherRequiredDepsForTest(os android.OsType) string { } cc_library { name: "libdl", - no_libgcc: true, + no_libcrt: true, nocrt: true, system_shared_libs: [], recovery_available: true, @@ -111,7 +111,7 @@ func GatherRequiredDepsForTest(os android.OsType) string { } cc_library { name: "libc++_static", - no_libgcc: true, + no_libcrt: true, nocrt: true, system_shared_libs: [], stl: "none", @@ -120,7 +120,7 @@ func GatherRequiredDepsForTest(os android.OsType) string { } cc_library { name: "libc++", - no_libgcc: true, + no_libcrt: true, nocrt: true, system_shared_libs: [], stl: "none", @@ -133,7 +133,7 @@ func GatherRequiredDepsForTest(os android.OsType) string { } cc_library { name: "libunwind_llvm", - no_libgcc: true, + no_libcrt: true, nocrt: true, system_shared_libs: [], stl: "none", diff --git a/sysprop/sysprop_test.go b/sysprop/sysprop_test.go index d78238afd..b470ba531 100644 --- a/sysprop/sysprop_test.go +++ b/sysprop/sysprop_test.go @@ -278,7 +278,7 @@ func TestSyspropLibrary(t *testing.T) { cc_library { name: "liblog", - no_libgcc: true, + no_libcrt: true, nocrt: true, system_shared_libs: [], recovery_available: true,