diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-04-29 15:30:00 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-04-29 17:06:06 +0200 |
commit | a39470f45d63faff07dd60972901709755049db0 (patch) | |
tree | 7be3c44853fb490b0b67b8696b69caf12c99dbf2 /CC | |
parent | 037cc9ef248b1a001683591809c75476784d1bdd (diff) | |
download | rules-cc-a39470f45d63faff07dd60972901709755049db0.tar.gz |
["CC", "defaults"] rule: Add "ADD_COMPILE_FLAGS"
The C++ programming language is tightly related to the C programming
language. Consequently, the command line interface for C and C++
are also related and share quite a number of compile flags. Honor
this tight connection by have in our defaults a field allowing to
extend both compile flags, those for C as well as those for C++. In
this way, build defaults can be described in a more readable way.
Diffstat (limited to 'CC')
-rw-r--r-- | CC/RULES | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -13,6 +13,7 @@ , "CFLAGS" , "CXXFLAGS" , "LDFLAGS" + , "ADD_COMPILE_FLAGS" , "ADD_CFLAGS" , "ADD_CXXFLAGS" , "ADD_LDFLAGS" @@ -55,12 +56,16 @@ [ "Linker flags for linking the final CC library. Specifying this field" , "overwrites values from \"base\"." ] + , "ADD_COMPILE_FLAGS": + [ "Additional compilation flags for C and C++. Specifying this field" + , "extends values from \"base\" for both, \"CFLAGS\" and \"CXXFLAGS\"." + ] , "ADD_CFLAGS": - [ "Additional compilation flags for C. Specifying this field" + [ "Additional compilation flags specific for C. Specifying this field" , "extends values from \"base\"." ] , "ADD_CXXFLAGS": - [ "Additional compilation flags for C++. Specifying this field" + [ "Additional compilation flags specific for C++. Specifying this field" , "extends values from \"base\"." ] , "ADD_LDFLAGS": @@ -259,6 +264,7 @@ , { "type": "++" , "$1": [ {"type": "var", "name": "CFLAGS"} + , {"type": "FIELD", "name": "ADD_COMPILE_FLAGS"} , {"type": "FIELD", "name": "ADD_CFLAGS"} ] } @@ -267,6 +273,7 @@ , { "type": "++" , "$1": [ {"type": "var", "name": "CXXFLAGS"} + , {"type": "FIELD", "name": "ADD_COMPILE_FLAGS"} , {"type": "FIELD", "name": "ADD_CXXFLAGS"} ] } |