diff options
| -rw-r--r-- | android/androidmk.go | 8 | ||||
| -rw-r--r-- | androidmk/cmd/androidmk/android.go | 1 | ||||
| -rw-r--r-- | androidmk/cmd/androidmk/androidmk_test.go | 2 | ||||
| -rw-r--r-- | cc/androidmk.go | 25 | ||||
| -rw-r--r-- | cc/cc.go | 2 | ||||
| -rw-r--r-- | cc/config/clang.go | 3 |
6 files changed, 28 insertions, 13 deletions
diff --git a/android/androidmk.go b/android/androidmk.go index 2bbd452b1..7d0aa3bdf 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -28,10 +28,6 @@ import ( "github.com/google/blueprint/bootstrap" ) -var ( - NativeBridgeSuffix = ".native_bridge" -) - func init() { RegisterSingletonType("androidmk", AndroidMkSingleton) } @@ -165,10 +161,6 @@ func (a *AndroidMkEntries) fillInEntries(config Config, bpPath string, mod bluep } } - if amod.Target().NativeBridge { - a.SubName += NativeBridgeSuffix - } - fmt.Fprintln(&a.header, "\ninclude $(CLEAR_VARS)") // Collect make variable assignment entries. diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index a23879f5c..cb71725ad 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -123,6 +123,7 @@ func init() { "LOCAL_SYSTEM_SHARED_LIBRARIES": "system_shared_libs", "LOCAL_ASFLAGS": "asflags", "LOCAL_CLANG_ASFLAGS": "clang_asflags", + "LOCAL_COMPATIBILITY_SUPPORT_FILES": "data", "LOCAL_CONLYFLAGS": "conlyflags", "LOCAL_CPPFLAGS": "cppflags", "LOCAL_REQUIRED_MODULES": "required", diff --git a/androidmk/cmd/androidmk/androidmk_test.go b/androidmk/cmd/androidmk/androidmk_test.go index b3b1ce0c1..2eab0ccf3 100644 --- a/androidmk/cmd/androidmk/androidmk_test.go +++ b/androidmk/cmd/androidmk/androidmk_test.go @@ -809,6 +809,7 @@ include $(CLEAR_VARS) LOCAL_PACKAGE_NAME := FooTest LOCAL_COMPATIBILITY_SUITE := cts LOCAL_CTS_TEST_PACKAGE := foo.bar +LOCAL_COMPATIBILITY_SUPPORT_FILES := file1 include $(BUILD_CTS_PACKAGE) `, expected: ` @@ -817,6 +818,7 @@ android_test { defaults: ["cts_defaults"], test_suites: ["cts"], + data: ["file1"], } `, }, diff --git a/cc/androidmk.go b/cc/androidmk.go index c7883e2fa..ae34e3d1e 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -24,8 +24,9 @@ import ( ) var ( - vendorSuffix = ".vendor" - recoverySuffix = ".recovery" + nativeBridgeSuffix = ".native_bridge" + vendorSuffix = ".vendor" + recoverySuffix = ".recovery" ) type AndroidMkContext interface { @@ -105,6 +106,10 @@ func (c *Module) AndroidMk() android.AndroidMkData { } c.subAndroidMk(&ret, c.installer) + if c.Target().NativeBridge == android.NativeBridgeEnabled { + ret.SubName += nativeBridgeSuffix + } + if c.useVndk() && c.hasVendorVariant() { // .vendor suffix is added only when we will have two variants: core and vendor. // The suffix is not added for vendor-only module. @@ -134,6 +139,18 @@ func androidMkWriteTestData(data android.Paths, ctx AndroidMkContext, ret *andro } } +func makeOverrideModuleNames(ctx AndroidMkContext, overrides []string) []string { + if ctx.Target().NativeBridge == android.NativeBridgeEnabled { + var result []string + for _, override := range overrides { + result = append(result, override+nativeBridgeSuffix) + } + return result + } + + return overrides +} + func (library *libraryDecorator) androidMkWriteExportedFlags(w io.Writer) { exportedFlags := library.exportedFlags() if len(exportedFlags) > 0 { @@ -166,7 +183,7 @@ func (library *libraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.An fmt.Fprintln(w, "LOCAL_SOONG_UNSTRIPPED_BINARY :=", library.unstrippedOutputFile.String()) } if len(library.Properties.Overrides) > 0 { - fmt.Fprintln(w, "LOCAL_OVERRIDES_MODULES := "+strings.Join(library.Properties.Overrides, " ")) + fmt.Fprintln(w, "LOCAL_OVERRIDES_MODULES := "+strings.Join(makeOverrideModuleNames(ctx, library.Properties.Overrides), " ")) } if len(library.post_install_cmds) > 0 { fmt.Fprintln(w, "LOCAL_POST_INSTALL_CMD := "+strings.Join(library.post_install_cmds, "&& ")) @@ -241,7 +258,7 @@ func (binary *binaryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.Andr } if len(binary.Properties.Overrides) > 0 { - fmt.Fprintln(w, "LOCAL_OVERRIDES_MODULES := "+strings.Join(binary.Properties.Overrides, " ")) + fmt.Fprintln(w, "LOCAL_OVERRIDES_MODULES := "+strings.Join(makeOverrideModuleNames(ctx, binary.Properties.Overrides), " ")) } if len(binary.post_install_cmds) > 0 { fmt.Fprintln(w, "LOCAL_POST_INSTALL_CMD := "+strings.Join(binary.post_install_cmds, "&& ")) @@ -1826,7 +1826,7 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps { } else if ccDep.inRecovery() && !ccDep.onlyInRecovery() { return libName + recoverySuffix } else if ccDep.Target().NativeBridge == android.NativeBridgeEnabled { - return libName + android.NativeBridgeSuffix + return libName + nativeBridgeSuffix } else { return libName } diff --git a/cc/config/clang.go b/cc/config/clang.go index 94a8257f5..47b60e713 100644 --- a/cc/config/clang.go +++ b/cc/config/clang.go @@ -108,6 +108,9 @@ func init() { // Help catch common 32/64-bit errors. "-Werror=int-conversion", + // Enable the new pass manager. + "-fexperimental-new-pass-manager", + // Disable overly aggressive warning for macros defined with a leading underscore // This happens in AndroidConfig.h, which is included nearly everywhere. // TODO: can we remove this now? |