aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-13 22:46:30 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-13 22:46:30 +0300
commit426bb223c9ee6cc41c8e9c7cdfd2ef49f92ea5bf (patch)
tree5f037f840c1a4aa43c0f2002c5c75617e7826288
parent7109c0459ad76c4314a14ee6e657c04b1d04125d (diff)
downloadydb-426bb223c9ee6cc41c8e9c7cdfd2ef49f92ea5bf.tar.gz
intermediate changes
ref:59368756f9863b1a4b8fbfb0c964bbb94cc79286
-rwxr-xr-xbuild/ymake_conf.py44
1 files changed, 30 insertions, 14 deletions
diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index 6311e63697..162e5b658c 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -1532,11 +1532,19 @@ class GnuCompiler(Compiler):
emit_big('''
when ($NO_WSHADOW == "yes") {
C_WARNING_OPTS += -Wno-shadow
- }
+ }''')
+
+ # Though -w is intended to switch off all the warnings,
+ # it does not switch at least -Wregister and -Wreserved-user-defined-literal under clang.
+ #
+ # Use -Wno-everything to force warning suppression.
+ emit_big('''
when ($NO_COMPILER_WARNINGS == "yes") {
C_WARNING_OPTS = -w
CXX_WARNING_OPTS = -Wno-everything
- }
+ }''')
+
+ emit_big('''
when ($NO_OPTIMIZE == "yes") {
OPTIMIZE = -O0
}
@@ -2449,12 +2457,6 @@ class MSVCCompiler(MSVC, Compiler):
if target.is_x86_64:
flags.append('-m64')
- # Some warnings are getting triggered even when NO_COMPILER_WARNINGS is enabled
- flags.extend((
- '-Wno-c++11-narrowing',
- '-Wno-register',
- ))
-
c_warnings.extend((
'-Wno-absolute-value',
'-Wno-bitwise-op-parentheses',
@@ -2477,7 +2479,6 @@ class MSVCCompiler(MSVC, Compiler):
cxx_warnings += [
'-Woverloaded-virtual',
- '-Wno-register', # IGNIETFERRO-722 needed for contrib
'-Wimport-preprocessor-directive-pedantic',
'-Wno-undefined-var-template',
]
@@ -2591,11 +2592,26 @@ class MSVCCompiler(MSVC, Compiler):
emit_big('''
when ($NO_WSHADOW == "yes") {
C_WARNING_OPTS += /wd4456 /wd4457
- }
- when ($NO_COMPILER_WARNINGS == "yes") {
- C_WARNING_OPTS = /w
- CXX_WARNING_OPTS =
- }
+ }''')
+
+ if self.tc.use_clang:
+ # Though /w is intended to switch off all the warnings,
+ # it does not switch at least -Wregister and -Wreserved-user-defined-literal under clang-cl.
+ #
+ # Use -Wno-everything to force warning suppression.
+ emit_big('''
+ when ($NO_COMPILER_WARNINGS == "yes") {
+ C_WARNING_OPTS = /w
+ CXX_WARNING_OPTS = -Wno-everything
+ }''')
+ else:
+ emit_big('''
+ when ($NO_COMPILER_WARNINGS == "yes") {
+ C_WARNING_OPTS = /w
+ CXX_WARNING_OPTS =
+ }''')
+
+ emit_big('''
when ($NO_OPTIMIZE == "yes") {
OPTIMIZE = /Od
}''')