diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-05-29 12:01:30 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-06-03 16:46:49 +0200 |
commit | 34cdfeb793317de7909b18b31e72909164390794 (patch) | |
tree | 9aca3879c3ef10048ee3cf83947bc4d136e9fba9 /CC/EXPRESSIONS | |
parent | 5c5ecfb43c7f200e258a6412f121bb30b7454511 (diff) | |
download | rules-cc-34cdfeb793317de7909b18b31e72909164390794.tar.gz |
debug rule: Add flag field to skip installing extra debug artifacts
This is useful when we want to install targets built in debug mode,
but do not want to stage all the additional source and header files
if no debugging is being performed, e.g., in tests.
Diffstat (limited to 'CC/EXPRESSIONS')
-rw-r--r-- | CC/EXPRESSIONS | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/CC/EXPRESSIONS b/CC/EXPRESSIONS index 7d9dfa1..437758e 100644 --- a/CC/EXPRESSIONS +++ b/CC/EXPRESSIONS @@ -1452,7 +1452,14 @@ } } , "install-with-deps result": - { "vars": ["pc-install-dir", "targets", "prefix", "flat-libs", "hdrs-only"] + { "vars": + [ "pc-install-dir" + , "targets" + , "prefix" + , "flat-libs" + , "hdrs-only" + , "skip-debug-stage" + ] , "imports": {"pkg-config": "pkg-config"} , "expression": { "type": "let*" @@ -1490,10 +1497,15 @@ } ] , [ "debug-srcs" - , { "type": "DEP_PROVIDES" - , "dep": {"type": "var", "name": "target"} - , "provider": "debug-srcs" - , "default": {"type": "empty_map"} + , { "type": "if" + , "cond": {"type": "var", "name": "skip-debug-stage"} + , "then": {"type": "empty_map"} + , "else": + { "type": "DEP_PROVIDES" + , "dep": {"type": "var", "name": "target"} + , "provider": "debug-srcs" + , "default": {"type": "empty_map"} + } } ] ] |