Forbid -gsplit-dwarf cflag
Bug: 266468464
The build system cannot track debug info in a separate/split file.
Test: presubmit
Change-Id: I7e3a2790871a8987ae2bf83778ad4cc891cb20cb
diff --git a/cc/check.go b/cc/check.go
index fa1926d..8e2844f 100644
--- a/cc/check.go
+++ b/cc/check.go
@@ -40,6 +40,8 @@
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 == "-gsplit-dwarf" {
+ ctx.PropertyErrorf(prop, "Bad flag: `%s`, soong cannot track dependencies to split dwarf debuginfo", 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" {