diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-09-15 15:10:38 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-09-16 10:48:00 +0200 |
commit | 112521bf8aef650487ffc15c640960c3062b2236 (patch) | |
tree | 55792a9392c916a90b895eaf220fef7e67dc3cd0 /etc/defaults | |
parent | b7c19f42562d98f1e2dd65e0b826771ceb6554b8 (diff) | |
download | justbuild-112521bf8aef650487ffc15c640960c3062b2236.tar.gz |
protobuf: Precisely replicate original flags
Diffstat (limited to 'etc/defaults')
-rw-r--r-- | etc/defaults/CC/TARGETS.protobuf | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/etc/defaults/CC/TARGETS.protobuf b/etc/defaults/CC/TARGETS.protobuf index 16e481bc..32f6623d 100644 --- a/etc/defaults/CC/TARGETS.protobuf +++ b/etc/defaults/CC/TARGETS.protobuf @@ -1,16 +1,43 @@ { "defaults": { "type": ["CC", "defaults"] + , "arguments_config": ["ARCH", "TARGET_ARCH", "COMPILER_FAMILY"] , "base": [["@", "base", "CC", "defaults"]] , "ADD_CFLAGS": ["-std=gnu17"] , "ADD_CXXFLAGS": - [ "-std=c++20" - , "-DHAVE_PTHREAD" - , "-DHAVE_ZLIB" - , "-Woverloaded-virtual" - , "-Wno-sign-compare" - , "-Wno-unused-function" - , "-Wno-write-strings" - , "-Wno-deprecated-declarations" - ] + { "type": "let*" + , "bindings": + [ [ "COMPILER_FAMILY" + , {"type": "var", "name": "COMPILER_FAMILY", "default": "unknown"} + ] + ] + , "body": + { "type": "++" + , "$1": + [ ["-std=c++20", "-DHAVE_PTHREAD=1", "-DHAVE_ZLIB=1"] + , { "type": "case" + , "expr": {"type": "var", "name": "COMPILER_FAMILY"} + , "case": + { "msvc": + [ "/wd4018" + , "/wd4065" + , "/wd4146" + , "/wd4244" + , "/wd4251" + , "/wd4267" + , "/wd4305" + , "/wd4307" + , "/wd4309" + , "/wd4334" + , "/wd4355" + , "/wd4506" + , "/wd4800" + , "/wd4996" + ] + } + , "default": ["-Wall", "-Wno-sign-compare"] + } + ] + } + } } } |