diff options
| -rw-r--r-- | android/allowlists/allowlists.go | 11 | ||||
| -rw-r--r-- | cc/config/global.go | 8 | ||||
| -rw-r--r-- | genrule/allowlists.go | 30 | ||||
| -rw-r--r-- | java/base.go | 10 | ||||
| -rw-r--r-- | java/sdk_library.go | 2 | ||||
| -rw-r--r-- | sysprop/sysprop_library.go | 10 | ||||
| -rw-r--r-- | ui/build/config.go | 16 |
7 files changed, 29 insertions, 58 deletions
diff --git a/android/allowlists/allowlists.go b/android/allowlists/allowlists.go index 5b2519d45..07e1f122d 100644 --- a/android/allowlists/allowlists.go +++ b/android/allowlists/allowlists.go @@ -184,6 +184,7 @@ var ( "external/libdrm": Bp2BuildDefaultTrue, "external/libevent": Bp2BuildDefaultTrueRecursively, "external/libgav1": Bp2BuildDefaultTrueRecursively, + "external/libdav1d": Bp2BuildDefaultTrueRecursively, "external/libhevc": Bp2BuildDefaultTrueRecursively, "external/libjpeg-turbo": Bp2BuildDefaultTrueRecursively, "external/libmpeg2": Bp2BuildDefaultTrueRecursively, @@ -813,6 +814,7 @@ var ( "libcodec2_soft_vp8dec", "libcodec2_soft_vp9dec", "libcodec2_soft_av1dec_gav1", + "libcodec2_soft_av1dec_dav1d", "libcodec2_soft_vp8enc", "libcodec2_soft_vp9enc", "libcodec2_soft_rawdec", @@ -1643,10 +1645,11 @@ var ( "libneuralnetworks", "libneuralnetworks_static", // M13: media.swcodec launch - "com.android.media.swcodec", - "test_com.android.media.swcodec", - "libstagefright_foundation", - "libcodec2_hidl@1.0", + // TODO(b/307389608) Relaunch swcodec after fixing rust dependencies + // "com.android.media.swcodec", + // "test_com.android.media.swcodec", + // "libstagefright_foundation", + // "libcodec2_hidl@1.0", } // Staging-mode allowlist. Modules in this list are only built diff --git a/cc/config/global.go b/cc/config/global.go index 67ea4fdef..892a86c7e 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -259,6 +259,7 @@ var ( "-Werror=fortify-source", "-Werror=address-of-temporary", + "-Werror=incompatible-function-pointer-types", "-Werror=null-dereference", "-Werror=return-type", @@ -335,10 +336,6 @@ var ( "-fcommon", // http://b/191699019 "-Wno-format-insufficient-args", - // http://b/296321145 - // Indicates potential memory or stack corruption, so should be changed - // to a hard error. Currently triggered by some vendor code. - "-Wno-incompatible-function-pointer-types", // http://b/296321508 // Introduced in response to a critical security vulnerability and // should be a hard error - it requires only whitespace changes to fix. @@ -356,7 +353,7 @@ var ( llvmNextExtraCommonGlobalCflags = []string{ // Do not report warnings when testing with the top of trunk LLVM. - "-Wno-error", + "-Wno-everything", } // Flags that must not appear in any command line. @@ -472,6 +469,7 @@ func init() { flags := noOverrideGlobalCflags if ctx.Config().IsEnvTrue("LLVM_NEXT") { flags = append(noOverrideGlobalCflags, llvmNextExtraCommonGlobalCflags...) + IllegalFlags = []string{} // Don't fail build while testing a new compiler. } return strings.Join(flags, " ") }) diff --git a/genrule/allowlists.go b/genrule/allowlists.go index b3c662d4f..ea6be90a4 100644 --- a/genrule/allowlists.go +++ b/genrule/allowlists.go @@ -53,11 +53,6 @@ var ( // go/keep-sorted start "AudioFocusControlProtoStub_cc", "AudioFocusControlProtoStub_h", - "BlueberryFacadeAndCertGeneratedStub_py", - "BlueberryFacadeGeneratedStub_cc", - "BlueberryFacadeGeneratedStub_h", - "BluetoothGeneratedDumpsysBinarySchema_bfbs", - "BluetoothGeneratedDumpsysDataSchema_h", "CompilationTestCases_package-dex-usage", "ControlEnvProxyServerProto_cc", "ControlEnvProxyServerProto_h", @@ -109,36 +104,12 @@ var ( "camera-its", "checkIn-service-stub-lite", "chre_atoms_log.h", - "com.android.apex.apkrollback.test.pem", - "com.android.apex.apkrollback.test.pubkey", - "com.android.apex.cts.shim.debug.pem", - "com.android.apex.cts.shim.debug.pubkey", - "com.android.apex.cts.shim.pem", - "com.android.apex.cts.shim.pubkey", - "com.android.apex.cts.shim.v2_no_pb", - "com.android.apex.cts.shim.v2_signed_bob", - "com.android.apex.cts.shim.v2_signed_bob_rot", - "com.android.apex.cts.shim.v2_signed_bob_rot_rollback", - "com.android.apex.cts.shim.v2_unsigned_apk_container", - "com.android.apex.cts.shim.v3_signed_bob", - "com.android.apex.cts.shim.v3_signed_bob_rot", - "com.android.apex.cts.shim_not_pre_installed.pem", - "com.android.apex.cts.shim_not_pre_installed.pubkey", - "com.android.apex.rotation.key.bob.pem", - "com.android.apex.rotation.key.bob.pk8", - "com.android.apex.rotation.key.bob.rot", - "com.android.apex.rotation.key.bob.rot.rollback", - "com.android.apex.rotation.key.bob.x509.pem", "com.android.apex.test.bar_stripped", "com.android.apex.test.baz_stripped", "com.android.apex.test.foo_stripped", "com.android.apex.test.pony_stripped", "com.android.apex.test.sharedlibs_generated", "com.android.apex.test.sharedlibs_secondary_generated", - "com.android.overlaytest.overlaid.pem", - "com.android.overlaytest.overlaid.pubkey", - "com.android.overlaytest.overlay.pem", - "com.android.overlaytest.overlay.pubkey", "common-profile-text-protos", "core-tests-smali-dex", "cronet_aml_base_android_runtime_jni_headers", @@ -184,7 +155,6 @@ var ( "hidl_java_impl_test_gen", "lib-test-profile-text-protos", "libbssl_sys_src_nostd", - "libbt_topshim_facade_py_proto", "libc_musl_sysroot_bits", "libchrome-crypto-include", "libchrome-include", diff --git a/java/base.go b/java/base.go index 53f22a7c0..e1c2386ff 100644 --- a/java/base.go +++ b/java/base.go @@ -1014,8 +1014,16 @@ func (j *Module) collectJavacFlags( ctx android.ModuleContext, flags javaBuilderFlags, srcFiles android.Paths) javaBuilderFlags { // javac flags. javacFlags := j.properties.Javacflags + var needsDebugInfo bool - if ctx.Config().MinimizeJavaDebugInfo() && !ctx.Host() { + needsDebugInfo = false + for _, flag := range javacFlags { + if strings.HasPrefix(flag, "-g") { + needsDebugInfo = true + } + } + + if ctx.Config().MinimizeJavaDebugInfo() && !ctx.Host() && !needsDebugInfo { // For non-host binaries, override the -g flag passed globally to remove // local variable debug info to reduce disk and memory usage. javacFlags = append(javacFlags, "-g:source,lines") diff --git a/java/sdk_library.go b/java/sdk_library.go index 4ad3907a1..7807889cc 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -1751,11 +1751,9 @@ func (module *SdkLibrary) createStubsSourcesAndApi(mctx android.DefaultableHookC "BroadcastBehavior", "DeprecationMismatch", "HiddenSuperclass", - "HiddenTypeParameter", "MissingPermission", "SdkConstant", "Todo", - "UnavailableSymbol", } droidstubsArgs = append(droidstubsArgs, android.JoinWithPrefix(disabledWarnings, "--hide ")) diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go index 13cf68f7d..fe2cc9ca4 100644 --- a/sysprop/sysprop_library.go +++ b/sysprop/sysprop_library.go @@ -172,6 +172,12 @@ type syspropLibraryProperties struct { // Minimum sdk version that the artifact should support when it runs as part of mainline modules(APEX). // Forwarded to cc_library.min_sdk_version Min_sdk_version *string + + // C compiler flags used to build library + Cflags []string + + // Linker flags used to build binary + Ldflags []string } Java struct { @@ -416,6 +422,8 @@ type ccLibraryProperties struct { Host_supported *bool Apex_available []string Min_sdk_version *string + Cflags []string + Ldflags []string Bazel_module struct { Label *string } @@ -511,6 +519,8 @@ func syspropLibraryHook(ctx android.LoadHookContext, m *syspropLibrary) { ccProps.Host_supported = m.properties.Host_supported ccProps.Apex_available = m.ApexProperties.Apex_available ccProps.Min_sdk_version = m.properties.Cpp.Min_sdk_version + ccProps.Cflags = m.properties.Cpp.Cflags + ccProps.Ldflags = m.properties.Cpp.Ldflags ccProps.Bazel_module.Label = label ctx.CreateModule(cc.LibraryFactory, &ccProps) diff --git a/ui/build/config.go b/ui/build/config.go index 17a837ece..e581e8fbb 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -205,19 +205,6 @@ func loadEnvConfig(ctx Context, config *configImpl, bc string) error { return nil } -func defaultBazelProdMode(cfg *configImpl) bool { - // Environment flag to disable Bazel for users which experience - // broken bazel-handled builds, or significant performance regressions. - if cfg.IsBazelMixedBuildForceDisabled() { - return false - } - // Darwin-host builds are currently untested with Bazel. - if runtime.GOOS == "darwin" { - return false - } - return true -} - func UploadOnlyConfig(ctx Context, args ...string) Config { ret := &configImpl{ environ: OsEnvironment(), @@ -892,9 +879,6 @@ func (c *configImpl) parseArgs(ctx Context, args []string) { c.arguments = append(c.arguments, arg) } } - if (!c.bazelProdMode) && (!c.bazelStagingMode) { - c.bazelProdMode = defaultBazelProdMode(c) - } } func validateNinjaWeightList(weightListFilePath string) (err error) { |