diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-09-15 16:51:40 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-09-16 10:47:55 +0200 |
commit | b7c19f42562d98f1e2dd65e0b826771ceb6554b8 (patch) | |
tree | fc4aabacafb6de34fe4655c08b0948ac186650e4 /etc/defaults | |
parent | 1dd35faf13c50cd2f19ea1916170326cba4106b5 (diff) | |
download | justbuild-b7c19f42562d98f1e2dd65e0b826771ceb6554b8.tar.gz |
grpc: Precisely replicate original flags
Diffstat (limited to 'etc/defaults')
-rw-r--r-- | etc/defaults/CC/TARGETS.grpc | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/etc/defaults/CC/TARGETS.grpc b/etc/defaults/CC/TARGETS.grpc new file mode 100644 index 00000000..608966c2 --- /dev/null +++ b/etc/defaults/CC/TARGETS.grpc @@ -0,0 +1,102 @@ +{ "defaults": + { "type": ["CC", "defaults"] + , "arguments_config": ["DEBUG", "OS", "COMPILER_FAMILY"] + , "base": [["@", "base", "CC", "defaults"]] + , "ADD_CFLAGS": + { "type": "let*" + , "bindings": + [ [ "COMPILER_FAMILY" + , {"type": "var", "name": "COMPILER_FAMILY", "default": "unknown"} + ] + , [ "OS" + , { "type": "var" + , "name": "OS" + , "default": + {"type": "fail", "msg": "Required variable 'OS' is not set."} + } + ] + ] + , "body": + { "type": "++" + , "$1": + [ ["-std=c99"] + , { "type": "case" + , "expr": {"type": "var", "name": "COMPILER_FAMILY"} + , "case": {"msvc": []} + , "default": + [ "-Wall" + , "-Wextra" + , "-DOSATOMIC_USE_INLINED=1" + ] + } + , { "type": "if" + , "cond": {"type": "var", "name": "DEBUG"} + , "then": ["-D_DEBUG", "-DDEBUG"] + , "else": ["-Wframe-larger-than=16384"] + } + , { "type": "case" + , "expr": {"type": "var", "name": "OS"} + , "case": + { "windows": + [ "-D_WIN32_WINNT=0x0600" + , "-DWIN32_LEAN_AND_MEAN" + , "-D_HAS_EXCEPTIONS=0" + , "-DUNICODE" + , "-D_UNICODE" + , "-DNOMINMAX" + ] + } + } + ] + } + } + , "ADD_CXXFLAGS": + { "type": "let*" + , "bindings": + [ [ "COMPILER_FAMILY" + , {"type": "var", "name": "COMPILER_FAMILY", "default": "unknown"} + ] + , [ "OS" + , { "type": "var" + , "name": "OS" + , "default": + {"type": "fail", "msg": "Required variable 'OS' is not set."} + } + ] + ] + , "body": + { "type": "++" + , "$1": + [ ["-std=c++20"] + , { "type": "case" + , "expr": {"type": "var", "name": "COMPILER_FAMILY"} + , "case": {"msvc": []} + , "default": + [ "-Wall" + , "-Wextra" + , "-DOSATOMIC_USE_INLINED=1" + ] + } + , { "type": "if" + , "cond": {"type": "var", "name": "DEBUG"} + , "then": ["-D_DEBUG", "-DDEBUG"] + , "else": ["-Wframe-larger-than=16384"] + } + , { "type": "case" + , "expr": {"type": "var", "name": "OS"} + , "case": + { "windows": + [ "-D_WIN32_WINNT=0x0600" + , "-DWIN32_LEAN_AND_MEAN" + , "-D_HAS_EXCEPTIONS=0" + , "-DUNICODE" + , "-D_UNICODE" + , "-DNOMINMAX" + ] + } + } + ] + } + } + } +} |