Deprecating clang Property
Clang has defaulted to true since 2018. Clang property is deprecated.
Set up a BUILD_BROKEN_CLANG_PROPERTY flag so partners can bypass \
errors from using clang.
Bug: 208980553
Test: m nothing & treehugger
Change-Id: I8fd7d3e6bdbb963279248d3482e8a590238727e3
diff --git a/cc/cc.go b/cc/cc.go
index 336771a..f1e9bf6 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1900,6 +1900,8 @@
if c.Properties.Clang != nil && *c.Properties.Clang == false {
ctx.PropertyErrorf("clang", "false (GCC) is no longer supported")
+ } else if c.Properties.Clang != nil && !ctx.DeviceConfig().BuildBrokenClangProperty() {
+ ctx.PropertyErrorf("clang", "property is deprecated, see Changes.md file")
}
flags := Flags{