aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2016-09-16 06:40:32 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-09-16 06:40:32 +0000
commit702b561ee585f01ccd523615e168bbb40196eead (patch)
tree2b8ffb0f3d30bf80a81c47745d308c1e0cb9de3c /cc
parent0e19618906f1ca5a5db0015d1f0b4a6cd66f0978 (diff)
parent3895d5b2461c5f62c18a9337ea43fbe6b6de4131 (diff)
downloadbuild_soong-702b561ee585f01ccd523615e168bbb40196eead.tar.gz
build_soong-702b561ee585f01ccd523615e168bbb40196eead.tar.bz2
build_soong-702b561ee585f01ccd523615e168bbb40196eead.zip
Merge changes from topics 'ndk-libc++-libdl', 'ndk-compiler-rt_extras'
* changes: Always link libdl with libc++ for the NDK. Use libcompiler-rt_extras with NDK builds.
Diffstat (limited to 'cc')
-rw-r--r--cc/linker.go2
-rw-r--r--cc/stl.go10
2 files changed, 9 insertions, 3 deletions
diff --git a/cc/linker.go b/cc/linker.go
index df19de7a..4ee38dcc 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -108,7 +108,7 @@ func (linker *baseLinker) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
deps.ReexportStaticLibHeaders = append(deps.ReexportStaticLibHeaders, linker.Properties.Export_static_lib_headers...)
deps.ReexportSharedLibHeaders = append(deps.ReexportSharedLibHeaders, linker.Properties.Export_shared_lib_headers...)
- if !ctx.sdk() && ctx.ModuleName() != "libcompiler_rt-extras" {
+ if ctx.ModuleName() != "libcompiler_rt-extras" {
deps.LateStaticLibs = append(deps.LateStaticLibs, "libcompiler_rt-extras")
}
diff --git a/cc/stl.go b/cc/stl.go
index a7e362c8..874e7ae7 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -114,9 +114,15 @@ func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps {
// The system STL doesn't have a prebuilt (it uses the system's libstdc++), but it does have
// its own includes. The includes are handled in CCBase.Flags().
deps.SharedLibs = append([]string{"libstdc++"}, deps.SharedLibs...)
- case "ndk_libc++_shared", "ndk_libstlport_shared":
+ case "ndk_libc++_shared":
+ deps.SharedLibs = append(deps.SharedLibs, stl.Properties.SelectedStl,
+ "libdl")
+ case "ndk_libc++_static":
+ deps.StaticLibs = append(deps.StaticLibs, stl.Properties.SelectedStl)
+ deps.SharedLibs = append(deps.SharedLibs, "libdl")
+ case "ndk_libstlport_shared":
deps.SharedLibs = append(deps.SharedLibs, stl.Properties.SelectedStl)
- case "ndk_libc++_static", "ndk_libstlport_static", "ndk_libgnustl_static":
+ case "ndk_libstlport_static", "ndk_libgnustl_static":
deps.StaticLibs = append(deps.StaticLibs, stl.Properties.SelectedStl)
default:
panic(fmt.Errorf("Unknown stl: %q", stl.Properties.SelectedStl))