summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cc/builder.go2
-rw-r--r--cc/cc.go3
-rw-r--r--cc/vndk.go5
-rw-r--r--cc/vndk_prebuilt.go4
-rw-r--r--java/sdk.go11
-rw-r--r--rust/rust.go18
-rw-r--r--ui/build/paths/config.go4
7 files changed, 32 insertions, 15 deletions
diff --git a/cc/builder.go b/cc/builder.go
index 554706ca8..42d809aa8 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -551,7 +551,7 @@ func TransformObjToStaticLib(ctx android.ModuleContext, objFiles android.Paths,
flags builderFlags, outputFile android.ModuleOutPath, deps android.Paths) {
arCmd := "${config.ClangBin}/llvm-ar"
- arFlags := "crsD"
+ arFlags := "crsPD"
if !ctx.Darwin() {
arFlags += " -format=gnu"
}
diff --git a/cc/cc.go b/cc/cc.go
index 2ff343413..f97ef5aea 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -2323,6 +2323,9 @@ func ImageMutator(mctx android.BottomUpMutatorContext) {
// If the device isn't compiling against the VNDK, we always
// use the core mode.
coreVariantNeeded = true
+ } else if m.Target().NativeBridge == android.NativeBridgeEnabled {
+ // Skip creating vendor variants for natvie bridge modules
+ coreVariantNeeded = true
} else if _, ok := m.linker.(*llndkStubDecorator); ok {
// LL-NDK stubs only exist in the vendor variant, since the
// real libraries will be used in the core variant.
diff --git a/cc/vndk.go b/cc/vndk.go
index 2a86f5bc8..698fab527 100644
--- a/cc/vndk.go
+++ b/cc/vndk.go
@@ -317,10 +317,13 @@ func VndkMutator(mctx android.BottomUpMutatorContext) {
if !ok {
return
}
-
if !m.Enabled() {
return
}
+ if m.Target().NativeBridge == android.NativeBridgeEnabled {
+ // Skip native_bridge modules
+ return
+ }
if m.isVndk() {
if lib, ok := m.linker.(*vndkPrebuiltLibraryDecorator); ok {
diff --git a/cc/vndk_prebuilt.go b/cc/vndk_prebuilt.go
index c8ff87f04..da357ed93 100644
--- a/cc/vndk_prebuilt.go
+++ b/cc/vndk_prebuilt.go
@@ -139,6 +139,10 @@ func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext,
return nil
}
+func (p *vndkPrebuiltLibraryDecorator) nativeCoverage() bool {
+ return false
+}
+
func (p *vndkPrebuiltLibraryDecorator) install(ctx ModuleContext, file android.Path) {
arches := ctx.DeviceConfig().Arches()
if len(arches) == 0 || arches[0].ArchType.String() != p.arch() {
diff --git a/java/sdk.go b/java/sdk.go
index d1e2ae4d1..3451774c0 100644
--- a/java/sdk.go
+++ b/java/sdk.go
@@ -19,7 +19,6 @@ import (
"android/soong/java/config"
"fmt"
"path/filepath"
- "runtime"
"sort"
"strconv"
"strings"
@@ -349,15 +348,7 @@ func createAPIFingerprint(ctx android.SingletonContext) {
cmd.Text("cat").
Inputs(android.PathsForSource(ctx, in)).
- Text("|")
-
- if runtime.GOOS == "darwin" {
- cmd.Text("md5")
- } else {
- cmd.Text("md5sum")
- }
-
- cmd.Text("| cut -d' ' -f1 >").
+ Text("| md5sum | cut -d' ' -f1 >").
Output(out)
} else {
// Unbundled build
diff --git a/rust/rust.go b/rust/rust.go
index 5a2514e47..62ccfc740 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -173,6 +173,24 @@ func (mod *Module) Init() android.Module {
android.InitDefaultableModule(mod)
+ // Explicitly disable unsupported targets.
+ android.AddLoadHook(mod, func(ctx android.LoadHookContext) {
+ disableTargets := struct {
+ Target struct {
+ Darwin struct {
+ Enabled *bool
+ }
+ Linux_bionic struct {
+ Enabled *bool
+ }
+ }
+ }{}
+ disableTargets.Target.Darwin.Enabled = proptools.BoolPtr(false)
+ disableTargets.Target.Linux_bionic.Enabled = proptools.BoolPtr(false)
+
+ ctx.AppendProperties(&disableTargets)
+ })
+
return mod
}
diff --git a/ui/build/paths/config.go b/ui/build/paths/config.go
index b97391b20..786e7d391 100644
--- a/ui/build/paths/config.go
+++ b/ui/build/paths/config.go
@@ -129,12 +129,10 @@ var Configuration = map[string]PathConfig{
func init() {
if runtime.GOOS == "darwin" {
- // TODO: move Darwin off md5 and onto our md5sum prebuilt.
- Configuration["md5"] = Allowed
Configuration["sw_vers"] = Allowed
Configuration["xcrun"] = Allowed
- // We don't have darwin prebuilts for some tools (like toybox),
+ // We don't have darwin prebuilts for some tools,
// so allow the host versions.
for name, config := range Configuration {
if config.LinuxOnlyPrebuilt {