Merge "Remove UnavailableSymbol from warnings to disable" into main
diff --git a/cc/config/global.go b/cc/config/global.go
index 67ea4fd..9232dde 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -259,6 +259,7 @@
 		"-Werror=fortify-source",
 
 		"-Werror=address-of-temporary",
+		"-Werror=incompatible-function-pointer-types",
 		"-Werror=null-dereference",
 		"-Werror=return-type",
 
@@ -335,10 +336,6 @@
 		"-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.
diff --git a/genrule/allowlists.go b/genrule/allowlists.go
index b3c662d..ea6be90 100644
--- a/genrule/allowlists.go
+++ b/genrule/allowlists.go
@@ -53,11 +53,6 @@
 		// 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 @@
 		"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 @@
 		"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/sdk_library.go b/java/sdk_library.go
index 2987370..7807889 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -1751,7 +1751,6 @@
 		"BroadcastBehavior",
 		"DeprecationMismatch",
 		"HiddenSuperclass",
-		"HiddenTypeParameter",
 		"MissingPermission",
 		"SdkConstant",
 		"Todo",
diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go
index 13cf68f..fe2cc9c 100644
--- a/sysprop/sysprop_library.go
+++ b/sysprop/sysprop_library.go
@@ -172,6 +172,12 @@
 		// 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 @@
 	Host_supported     *bool
 	Apex_available     []string
 	Min_sdk_version    *string
+	Cflags             []string
+	Ldflags            []string
 	Bazel_module       struct {
 		Label *string
 	}
@@ -511,6 +519,8 @@
 	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 17a837e..e581e8f 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -205,19 +205,6 @@
 	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 @@
 			c.arguments = append(c.arguments, arg)
 		}
 	}
-	if (!c.bazelProdMode) && (!c.bazelStagingMode) {
-		c.bazelProdMode = defaultBazelProdMode(c)
-	}
 }
 
 func validateNinjaWeightList(weightListFilePath string) (err error) {