summaryrefslogtreecommitdiff
path: root/rules/CC/RULES
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-04-03 12:05:06 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-04-23 15:20:08 +0200
commit3a8b8f617e65aef4fef3ea7ac514117350dc8ed9 (patch)
tree7fe8d4ab8c6c46148c7b42f02436d2d2bcafdbba /rules/CC/RULES
parent20fed370e22dd5c3759b5c58cfdaa5246d52543d (diff)
downloadjustbuild-3a8b8f617e65aef4fef3ea7ac514117350dc8ed9.tar.gz
rules CC: Make DEBUG variable a map
It expects now the key 'USE_DEBUG_FISSION', which enables debug fission, but does not add any flags on its own. For this, the 'FISSION_CONFIG' key is expected with certain entries that provide the compile and/or link flags that configure debug fission. The flags are added only where needed, i.e., before running or storing the respective compile or link actions.
Diffstat (limited to 'rules/CC/RULES')
-rw-r--r--rules/CC/RULES52
1 files changed, 49 insertions, 3 deletions
diff --git a/rules/CC/RULES b/rules/CC/RULES
index c6184670..61834f92 100644
--- a/rules/CC/RULES
+++ b/rules/CC/RULES
@@ -104,7 +104,23 @@
, "HOST_ARCH":
["The architecture on which the build actions are carried out."]
, "TARGET_ARCH": ["The architecture for which to build."]
- , "DEBUG": ["Compute the debug-stage, needed for local debugging."]
+ , "DEBUG":
+ [ "Map configuring the debug-stage, needed for local debugging."
+ , "If non-empty, debug mode is enabled."
+ , ""
+ , "The key \"USE_DEBUG_FISSION\" expects a flag which enables the debug"
+ , "fission mode, but does not add any flags. Explicitly setting it to a"
+ , "false value is needed to enable regular debug mode."
+ , "The key \"FISSION_CONFIG\" expects a map configuring debug fission."
+ , " - subkey \"USE_SPLIT_DWARF\" expects a flag that, if true, adds the"
+ , "-gsplit-dwarf compile flag."
+ , " - subkey \"DWARF_VERSION\" expects a string that adds the"
+ , "-gdwarf-<value> compile flag."
+ , " - subkey \"USE_GDB_INDEX\" expects a flag that, if true, adds the"
+ , "-Wl,--gdb-index linker flag."
+ , " - subkey \"USE_DEBUG_TYPES_SECTION\" expects a flag that, if true,"
+ , "adds the -fdebug-types-section compile flag."
+ ]
}
, "imports":
{ "base-provides": "defaults-base-provides"
@@ -553,7 +569,22 @@
]
, "ENV": ["The environment for any action generated."]
, "DEBUG":
- [ "Compute the debug-stage, needed for local debugging."
+ [ "Map configuring the debug-stage, needed for local debugging."
+ , "If non-empty, debug mode is enabled."
+ , ""
+ , "The key \"USE_DEBUG_FISSION\" expects a flag which enables the debug"
+ , "fission mode, but does not add any flags. Explicitly setting it to a"
+ , "false value is needed to enable regular debug mode."
+ , "The key \"FISSION_CONFIG\" expects a map configuring debug fission."
+ , " - subkey \"USE_SPLIT_DWARF\" expects a flag that, if true, adds the"
+ , "-gsplit-dwarf compile flag."
+ , " - subkey \"DWARF_VERSION\" expects a string that adds the"
+ , "-gdwarf-<value> compile flag."
+ , " - subkey \"USE_GDB_INDEX\" expects a flag that, if true, adds the"
+ , "-Wl,--gdb-index linker flag."
+ , " - subkey \"USE_DEBUG_TYPES_SECTION\" expects a flag that, if true,"
+ , "adds the -fdebug-types-section compile flag."
+ , ""
, "If no compile flags are otherwise configured, [\"-g\"] will be taken."
]
, "LINT":
@@ -756,7 +787,22 @@
]
, "ENV": ["The environment for any action generated."]
, "DEBUG":
- [ "Compute the debug-stage, needed for local debugging."
+ [ "Map configuring the debug-stage, needed for local debugging."
+ , "If non-empty, debug mode is enabled."
+ , ""
+ , "The key \"USE_DEBUG_FISSION\" expects a flag which enables the debug"
+ , "fission mode, but does not add any flags. Explicitly setting it to a"
+ , "false value is needed to enable regular debug mode."
+ , "The key \"FISSION_CONFIG\" expects a map configuring debug fission."
+ , " - subkey \"USE_SPLIT_DWARF\" expects a flag that, if true, adds the"
+ , "-gsplit-dwarf compile flag."
+ , " - subkey \"DWARF_VERSION\" expects a string that adds the"
+ , "-gdwarf-<value> compile flag."
+ , " - subkey \"USE_GDB_INDEX\" expects a flag that, if true, adds the"
+ , "-Wl,--gdb-index linker flag."
+ , " - subkey \"USE_DEBUG_TYPES_SECTION\" expects a flag that, if true,"
+ , "adds the -fdebug-types-section compile flag."
+ , ""
, "If no compile flags are otherwise configured, [\"-g\"] will be taken."
]
, "LINT":