cc: Filter out unknown clang cflags from InstructionSetFlags
-funswitch-loops is in the arm instruction set flags, but unsupported by
clang. Make removes clang unknown cflags from the instruction set flags.
This was producing a warning, causing -Werror to fail on libm.
Change-Id: Ibc69c9af04a738aa8adeb5549900e2b53ab754f0
diff --git a/cc/toolchain.go b/cc/toolchain.go
index d188845..e17e345 100644
--- a/cc/toolchain.go
+++ b/cc/toolchain.go
@@ -49,6 +49,7 @@
ClangCflags() string
ClangCppflags() string
ClangLdflags() string
+ ClangInstructionSetFlags(string) (string, error)
Is64Bit() bool
}
@@ -63,6 +64,13 @@
return "", nil
}
+func (toolchainBase) ClangInstructionSetFlags(s string) (string, error) {
+ if s != "" {
+ return "", fmt.Errorf("instruction_set: %s is not a supported instruction set", s)
+ }
+ return "", nil
+}
+
type toolchain64Bit struct {
toolchainBase
}