Loading cc/cc_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -1941,13 +1941,13 @@ func TestStaticLibDepExport(t *testing.T) { // Check the shared version of lib2. variant := "android_arm64_armv8-a_core_shared" module := ctx.ModuleForTests("lib2", variant).Module().(*Module) checkStaticLibs(t, []string{"lib1", "libclang_rt.builtins-aarch64-android", "libatomic", "libgcc_stripped"}, module) checkStaticLibs(t, []string{"lib1", "libc++demangle", "libclang_rt.builtins-aarch64-android", "libatomic", "libgcc_stripped"}, module) // Check the static version of lib2. variant = "android_arm64_armv8-a_core_static" module = ctx.ModuleForTests("lib2", variant).Module().(*Module) // libc++_static is linked additionally. checkStaticLibs(t, []string{"lib1", "libc++_static", "libclang_rt.builtins-aarch64-android", "libatomic", "libgcc_stripped"}, module) checkStaticLibs(t, []string{"lib1", "libc++_static", "libc++demangle", "libclang_rt.builtins-aarch64-android", "libatomic", "libgcc_stripped"}, module) } var compilerFlagsTestCases = []struct { Loading cc/stl.go +9 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,15 @@ func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps { } else { deps.StaticLibs = append(deps.StaticLibs, stl.Properties.SelectedStl) } if ctx.Device() && !ctx.useSdk() { // __cxa_demangle is not a part of libc++.so on the device since // it's large and most processes don't need it. Statically link // libc++demangle into every process so that users still have it if // needed, but the linker won't include this unless it is actually // called. // http://b/138245375 deps.StaticLibs = append(deps.StaticLibs, "libc++demangle") } if ctx.toolchain().Bionic() { if ctx.Arch().ArchType == android.Arm { deps.StaticLibs = append(deps.StaticLibs, "libunwind_llvm") Loading cc/testing.go +10 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,16 @@ func GatherRequiredDepsForTest(os android.OsType) string { support_system_process: true, }, } cc_library { name: "libc++demangle", no_libcrt: true, nocrt: true, system_shared_libs: [], stl: "none", host_supported: false, vendor_available: true, recovery_available: true, } cc_library { name: "libunwind_llvm", no_libcrt: true, Loading Loading
cc/cc_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -1941,13 +1941,13 @@ func TestStaticLibDepExport(t *testing.T) { // Check the shared version of lib2. variant := "android_arm64_armv8-a_core_shared" module := ctx.ModuleForTests("lib2", variant).Module().(*Module) checkStaticLibs(t, []string{"lib1", "libclang_rt.builtins-aarch64-android", "libatomic", "libgcc_stripped"}, module) checkStaticLibs(t, []string{"lib1", "libc++demangle", "libclang_rt.builtins-aarch64-android", "libatomic", "libgcc_stripped"}, module) // Check the static version of lib2. variant = "android_arm64_armv8-a_core_static" module = ctx.ModuleForTests("lib2", variant).Module().(*Module) // libc++_static is linked additionally. checkStaticLibs(t, []string{"lib1", "libc++_static", "libclang_rt.builtins-aarch64-android", "libatomic", "libgcc_stripped"}, module) checkStaticLibs(t, []string{"lib1", "libc++_static", "libc++demangle", "libclang_rt.builtins-aarch64-android", "libatomic", "libgcc_stripped"}, module) } var compilerFlagsTestCases = []struct { Loading
cc/stl.go +9 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,15 @@ func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps { } else { deps.StaticLibs = append(deps.StaticLibs, stl.Properties.SelectedStl) } if ctx.Device() && !ctx.useSdk() { // __cxa_demangle is not a part of libc++.so on the device since // it's large and most processes don't need it. Statically link // libc++demangle into every process so that users still have it if // needed, but the linker won't include this unless it is actually // called. // http://b/138245375 deps.StaticLibs = append(deps.StaticLibs, "libc++demangle") } if ctx.toolchain().Bionic() { if ctx.Arch().ArchType == android.Arm { deps.StaticLibs = append(deps.StaticLibs, "libunwind_llvm") Loading
cc/testing.go +10 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,16 @@ func GatherRequiredDepsForTest(os android.OsType) string { support_system_process: true, }, } cc_library { name: "libc++demangle", no_libcrt: true, nocrt: true, system_shared_libs: [], stl: "none", host_supported: false, vendor_available: true, recovery_available: true, } cc_library { name: "libunwind_llvm", no_libcrt: true, Loading