Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules
Export Soong cc modules to Make using a new soong_cc_prebuilt.mk that
bypasses all of prebuilt_internal.mk, dynamic_binary.mk and binary.mk.
This also means that stripping is handled in Soong instead of Make.
Relands If9008c50920779048480f5eeeb0084f26006c998 with fixes for
mac builds.
Bug: 113936524
Test: m checkbuild
Change-Id: I9710ff57f0793f36eb889eabd08bd60a365a88dd
diff --git a/cc/cc.go b/cc/cc.go
index 358bff6..188a1cc 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1177,7 +1177,7 @@
// We can be permissive with the system "STL" since it is only the C++
// ABI layer, but in the future we should make sure that everyone is
// using either libc++ or nothing.
- } else if getNdkStlFamily(ctx, from) != getNdkStlFamily(ctx, to) {
+ } else if getNdkStlFamily(from) != getNdkStlFamily(to) {
ctx.ModuleErrorf("uses %q and depends on %q which uses incompatible %q",
from.stl.Properties.SelectedStl, ctx.OtherModuleName(to),
to.stl.Properties.SelectedStl)
@@ -1487,6 +1487,29 @@
return false
}
+func (c *Module) getMakeLinkType() string {
+ if c.useVndk() {
+ if inList(c.Name(), vndkCoreLibraries) || inList(c.Name(), vndkSpLibraries) || inList(c.Name(), llndkLibraries) {
+ if inList(c.Name(), vndkPrivateLibraries) {
+ return "native:vndk_private"
+ } else {
+ return "native:vndk"
+ }
+ } else {
+ return "native:vendor"
+ }
+ } else if c.inRecovery() {
+ return "native:recovery"
+ } else if c.Target().Os == android.Android && String(c.Properties.Sdk_version) != "" {
+ return "native:ndk:none:none"
+ // TODO(b/114741097): use the correct ndk stl once build errors have been fixed
+ //family, link := getNdkStlFamilyAndLinkType(c)
+ //return fmt.Sprintf("native:ndk:%s:%s", family, link)
+ } else {
+ return "native:platform"
+ }
+}
+
//
// Defaults
//