From 112521bf8aef650487ffc15c640960c3062b2236 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Thu, 15 Sep 2022 15:10:38 +0200 Subject: protobuf: Precisely replicate original flags --- etc/defaults/CC/TARGETS.protobuf | 45 ++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 9 deletions(-) (limited to 'etc/defaults') 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"] + } + ] + } + } } } -- cgit v1.2.3