Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -596,6 +596,7 @@ toolchain_library { vendor_available: true, recovery_available: true, native_bridge_supported: true, sdk_version: "current", arch: { arm: { Loading cc/cc_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -2303,13 +2303,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", "libgcc_stripped"}, module) checkStaticLibs(t, []string{"lib1", "libc++demangle", "libclang_rt.builtins-aarch64-android", "libatomic"}, 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", "libgcc_stripped"}, module) checkStaticLibs(t, []string{"lib1", "libc++_static", "libc++demangle", "libclang_rt.builtins-aarch64-android", "libatomic"}, module) } var compilerFlagsTestCases = []struct { Loading cc/config/global.go +1 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ var ( "-Wl,--no-undefined-version", "-Wl,--exclude-libs,libgcc.a", "-Wl,--exclude-libs,libgcc_stripped.a", "-Wl,--exclude-libs,libunwind_llvm.a", } deviceGlobalLldflags = append(ClangFilterUnknownLldflags(deviceGlobalLdflags), Loading cc/linker.go +1 −2 Original line number Diff line number Diff line Loading @@ -224,11 +224,10 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { } if ctx.toolchain().Bionic() { // libclang_rt.builtins, libgcc and libatomic have to be last on the command line // libclang_rt.builtins and libatomic have 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.LateStaticLibs = append(deps.LateStaticLibs, "libgcc_stripped") } systemSharedLibs := linker.Properties.System_shared_libs Loading cc/stl.go +7 −3 Original line number Diff line number Diff line Loading @@ -171,11 +171,13 @@ func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps { deps.StaticLibs = append(deps.StaticLibs, "libc++demangle") } if ctx.toolchain().Bionic() { if ctx.staticBinary() { deps.StaticLibs = append(deps.StaticLibs, "libm", "libc") if ctx.Arch().ArchType == android.Arm { deps.StaticLibs = append(deps.StaticLibs, "libunwind_llvm") } else { deps.StaticLibs = append(deps.StaticLibs, "libgcc_stripped") } if ctx.staticBinary() { deps.StaticLibs = append(deps.StaticLibs, "libm", "libc") } } case "": Loading @@ -196,6 +198,8 @@ func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps { } if ctx.Arch().ArchType == android.Arm { deps.StaticLibs = append(deps.StaticLibs, "ndk_libunwind") } else { deps.StaticLibs = append(deps.StaticLibs, "libgcc_stripped") } default: panic(fmt.Errorf("Unknown stl: %q", stl.Properties.SelectedStl)) Loading Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -596,6 +596,7 @@ toolchain_library { vendor_available: true, recovery_available: true, native_bridge_supported: true, sdk_version: "current", arch: { arm: { Loading
cc/cc_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -2303,13 +2303,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", "libgcc_stripped"}, module) checkStaticLibs(t, []string{"lib1", "libc++demangle", "libclang_rt.builtins-aarch64-android", "libatomic"}, 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", "libgcc_stripped"}, module) checkStaticLibs(t, []string{"lib1", "libc++_static", "libc++demangle", "libclang_rt.builtins-aarch64-android", "libatomic"}, module) } var compilerFlagsTestCases = []struct { Loading
cc/config/global.go +1 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ var ( "-Wl,--no-undefined-version", "-Wl,--exclude-libs,libgcc.a", "-Wl,--exclude-libs,libgcc_stripped.a", "-Wl,--exclude-libs,libunwind_llvm.a", } deviceGlobalLldflags = append(ClangFilterUnknownLldflags(deviceGlobalLdflags), Loading
cc/linker.go +1 −2 Original line number Diff line number Diff line Loading @@ -224,11 +224,10 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps { } if ctx.toolchain().Bionic() { // libclang_rt.builtins, libgcc and libatomic have to be last on the command line // libclang_rt.builtins and libatomic have 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.LateStaticLibs = append(deps.LateStaticLibs, "libgcc_stripped") } systemSharedLibs := linker.Properties.System_shared_libs Loading
cc/stl.go +7 −3 Original line number Diff line number Diff line Loading @@ -171,11 +171,13 @@ func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps { deps.StaticLibs = append(deps.StaticLibs, "libc++demangle") } if ctx.toolchain().Bionic() { if ctx.staticBinary() { deps.StaticLibs = append(deps.StaticLibs, "libm", "libc") if ctx.Arch().ArchType == android.Arm { deps.StaticLibs = append(deps.StaticLibs, "libunwind_llvm") } else { deps.StaticLibs = append(deps.StaticLibs, "libgcc_stripped") } if ctx.staticBinary() { deps.StaticLibs = append(deps.StaticLibs, "libm", "libc") } } case "": Loading @@ -196,6 +198,8 @@ func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps { } if ctx.Arch().ArchType == android.Arm { deps.StaticLibs = append(deps.StaticLibs, "ndk_libunwind") } else { deps.StaticLibs = append(deps.StaticLibs, "libgcc_stripped") } default: panic(fmt.Errorf("Unknown stl: %q", stl.Properties.SelectedStl)) Loading