From 0cfbefbf10198c06f46602f8a6d214d8a44cabb8 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Fri, 30 Aug 2024 18:57:22 +0000 Subject: [PATCH] Add a check for -fno-integrated-as Bug: 188684773 Test: presubmit This flag can cause the build to invoke the `as` from the build host, which can cause problems with cross-compilation. Change-Id: I0a2ec5a10c97534bc9cb03e76b95b8e54d2c75ba --- cc/check.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cc/check.go b/cc/check.go index e3af3b288..fa1926dd4 100644 --- a/cc/check.go +++ b/cc/check.go @@ -40,6 +40,8 @@ func CheckBadCompilerFlags(ctx BaseModuleContext, prop string, flags []string) { ctx.PropertyErrorf(prop, "Bad flag: `%s`, use native_coverage instead", flag) } else if flag == "-fwhole-program-vtables" { ctx.PropertyErrorf(prop, "Bad flag: `%s`, use whole_program_vtables instead", flag) + } else if flag == "-fno-integrated-as" { + ctx.PropertyErrorf("Bad flag: `%s` is disallowed as it may invoke the `as` from the build host", flag) } else if flag == "-Weverything" { if !ctx.Config().IsEnvTrue("ANDROID_TEMPORARILY_ALLOW_WEVERYTHING") { ctx.PropertyErrorf(prop, "-Weverything is not allowed in Android.bp files. "+