aboutsummaryrefslogtreecommitdiffstats
path: root/cc/stl.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2020-02-19 16:54:04 -0800
committerColin Cross <ccross@android.com>2020-04-27 14:45:05 -0700
commit01fd7ccbc71c9eee7c56c73f05c4e7833a795aac (patch)
tree44d0667ee1032391aacd028af29bebdd6381331d /cc/stl.go
parent1c93c299fb0036b823e821237a8e52febe82679a (diff)
downloadbuild_soong-01fd7ccbc71c9eee7c56c73f05c4e7833a795aac.tar.gz
build_soong-01fd7ccbc71c9eee7c56c73f05c4e7833a795aac.tar.bz2
build_soong-01fd7ccbc71c9eee7c56c73f05c4e7833a795aac.zip
Add sdk mutator for native modules
Compiling native modules against the NDK disables platform features like ASAN. For anything shipped on the system image there is no reason to compile against the NDK. Add a new mutator to Soong that creates a platform and an SDK variant for modules that set sdk_version, and ignore sdk_version for the platform variant. The SDK variant will be used for embedding in APKs that may be installed on older platforms. Apexes use their own variants that enforce backwards compatibility. Test: sdk_test.go Test: TestJNIPackaging Bug: 149591340 Change-Id: I7d72934aaee2e1326cc0ba5f29f51f14feec4521 Merged-In: I7d72934aaee2e1326cc0ba5f29f51f14feec4521 (cherry picked from commit 82e192c3aeae55337e335101ba83126decd4ddac)
Diffstat (limited to 'cc/stl.go')
-rw-r--r--cc/stl.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cc/stl.go b/cc/stl.go
index eda8a4ff..34ff30c5 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -115,9 +115,13 @@ func (stl *stl) begin(ctx BaseModuleContext) {
switch s {
case "libc++", "libc++_static":
return s
+ case "c++_shared":
+ return "libc++"
+ case "c++_static":
+ return "libc++_static"
case "none":
return ""
- case "":
+ case "", "system":
if ctx.static() {
return "libc++_static"
} else {