summaryrefslogtreecommitdiff
path: root/CC/EXPRESSIONS
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-05-29 12:18:48 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-06-03 16:52:06 +0200
commit03fa22155c8236e4834e2b51bc7a631ca170459e (patch)
tree6336cd0d8cacdf034ce16897c31286a6c1efa124 /CC/EXPRESSIONS
parente300323e84bc882fcd305ced32f5dc8859854721 (diff)
downloadrules-cc-03fa22155c8236e4834e2b51bc7a631ca170459e.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/EXPRESSIONS31
1 files changed, 25 insertions, 6 deletions
diff --git a/CC/EXPRESSIONS b/CC/EXPRESSIONS
index e0c729d..f2259b6 100644
--- a/CC/EXPRESSIONS
+++ b/CC/EXPRESSIONS
@@ -2213,7 +2213,14 @@
}
}
, "install-with-deps stage":
- { "vars": ["pc-install-dir", "targets", "prefix", "flat-libs", "hdrs-only"]
+ { "vars":
+ [ "pc-install-dir"
+ , "targets"
+ , "prefix"
+ , "flat-libs"
+ , "hdrs-only"
+ , "skip-debug-stage"
+ ]
, "imports":
{ "compile-deps": "compile-deps"
, "compile-args-deps": "compile-args-deps"
@@ -2259,10 +2266,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"}
+ }
}
]
]
@@ -2449,7 +2461,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": {"install stage": "install-with-deps stage"}
, "expression":
{ "type": "RESULT"