diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-03-21 13:44:59 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-04-23 15:26:15 +0200 |
commit | 95905ca12f6433916ba3c326685f3cdfd92ce89f (patch) | |
tree | a1ba8365b910ea45f4710def66ef73337907ffa8 | |
parent | 293488e5c0fb4416e7ac0f60e3bf6348334dda82 (diff) | |
download | rules-cc-95905ca12f6433916ba3c326685f3cdfd92ce89f.tar.gz |
rules CC: Add DWP configuration variable
...defining the DWARF format packaging tool to use once debug
fission is supported.
-rw-r--r-- | CC/RULES | 45 | ||||
-rw-r--r-- | CC/TARGETS | 1 |
2 files changed, 44 insertions, 2 deletions
@@ -21,6 +21,7 @@ , "ADD_LDFLAGS" , "ADD_DEBUGFLAGS" , "AR" + , "DWP" , "PATH" , "SYSTEM_TOOLS" ] @@ -44,9 +45,13 @@ , "CC": ["The C compiler to use"] , "CXX": ["The C++ compiler to use"] , "AR": ["The archiver tool to use"] + , "DWP": + [ "The DWARF format packaging tool to use. Required by debug builds that" + , "enable debug fission." + ] , "SYSTEM_TOOLS": - [ "List of tools (\"CC\", \"CXX\", or \"AR\") that should be taken from" - , "the system instead of from \"toolchain\" (if specified)." + [ "List of tools (\"CC\", \"CXX\", \"AR\", or \"DWP\") that should be" + , "taken from the system instead of from \"toolchain\" (if specified)." ] , "CFLAGS": [ "Flags for C compilation. Specifying this field overwrites" @@ -149,6 +154,7 @@ , ["ARFLAGS", {"type": "FIELD", "name": "ARFLAGS"}] , ["DEBUGFLAGS", {"type": "FIELD", "name": "DEBUGFLAGS"}] , ["AR", {"type": "FIELD", "name": "AR"}] + , ["DWP", {"type": "FIELD", "name": "DWP"}] , ["PATH", {"type": "FIELD", "name": "PATH"}] , ["provider", "CC"] , [ "CC" @@ -214,6 +220,14 @@ , "else": {"type": "CALL_EXPRESSION", "name": "base-provides"} } ] + , ["provider", "DWP"] + , [ "DWP" + , { "type": "if" + , "cond": {"type": "var", "name": "DWP"} + , "then": {"type": "var", "name": "DWP"} + , "else": {"type": "CALL_EXPRESSION", "name": "base-provides"} + } + ] , ["provider", "PATH"] , [ "PATH" , { "type": "nub_left" @@ -279,6 +293,20 @@ } ] } + , { "type": "if" + , "cond": {"type": "FIELD", "name": "DWP"} + , "then": + [ { "type": "singleton_map" + , "key": "DWP" + , "value": + { "type": "if" + , "cond": {"type": "FIELD", "name": "toolchain"} + , "then": true + , "else": false + } + } + ] + } , { "type": "foreach" , "range": {"type": "FIELD", "name": "SYSTEM_TOOLS"} , "var": "tool" @@ -432,6 +460,7 @@ , "CXXFLAGS" , "LDFLAGS" , "AR" + , "DWP" , "ARFLAGS" , "PATH" , "ENV" @@ -472,6 +501,7 @@ , "ADD_CFLAGS" , "ADD_CXXFLAGS" , "AR" + , "DWP" , "ENV" , "DEBUG" , "LINT" @@ -567,6 +597,11 @@ [ "The archive tool to used for creating the library" , "If None, the respective value from [\"CC\", \"defaults\"] will be taken." ] + , "DWP": + [ "The DWARF format packaging tool to use in debug builds that enable" + , "debug fission." + , "If None, the respective value from [\"CC\", \"defaults\"] will be taken." + ] , "ENV": ["The environment for any action generated."] , "DEBUG": [ "Map configuring the debug-stage, needed for local debugging." @@ -726,6 +761,7 @@ , "CXXFLAGS" , "ADD_CFLAGS" , "ADD_CXXFLAGS" + , "DWP" , "ENV" , "DEBUG" , "LINT" @@ -785,6 +821,11 @@ [ "The flags to add to the default ones for CXX" , "taken from the [\"CC\", \"defaults\"] target" ] + , "DWP": + [ "The DWARF format packaging tool to use in debug builds that enable" + , "debug fission." + , "If None, the respective value from [\"CC\", \"defaults\"] will be taken." + ] , "ENV": ["The environment for any action generated."] , "DEBUG": [ "Map configuring the debug-stage, needed for local debugging." @@ -5,6 +5,7 @@ , "CFLAGS": [] , "CXXFLAGS": [] , "AR": ["ar"] + , "DWP": ["dwp"] , "PATH": ["/bin", "/usr/bin"] } } |