Move disabled warnings to test_compiler.py
Bug: http://b/62292583
Hard-code the disabled warnings in test_compiler.py instead of the
wrapper, and pass it to the wrapper through an environment variable.
These warnings are disabled only for the continuous build with the next
Clang version.
Test: Build the aosp-master-plus-llvm branch
Change-Id: I8fed75dc3d078b4bf0914dcdf2b4ec41214835c8
diff --git a/test_compiler.py b/test_compiler.py
index 8d67821..378ef8f 100755
--- a/test_compiler.py
+++ b/test_compiler.py
@@ -31,6 +31,13 @@
'-google-runtime-references', '-cppcoreguidelines-*',
'-modernize-*', '-clang-analyzer-alpha*')
+# We may introduce some new warnings after rebasing and we need to disable them
+# before we fix those warnings.
+DISABLED_WARNINGS = [
+ '-Wno-error=zero-as-null-pointer-constant',
+ '-Wno-error=unknown-warning-option'
+]
+
class ClangProfileHandler(object):
@@ -198,6 +205,8 @@
env[redirect_key] = redirect_path
fallback_path = build.clang_prebuilt_bin_dir()
env[compiler_wrapper.PREBUILT_COMPILER_PATH_KEY] = fallback_path
+ env[compiler_wrapper.DISABLED_WARNINGS_KEY] = ' '.join(
+ DISABLED_WARNINGS)
env['LLVM_PREBUILTS_VERSION'] = 'clang-dev'
env['LLVM_RELEASE_VERSION'] = clang_version.long_version()