summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2024-05-21 18:50:10 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2024-05-21 18:51:16 +0200
commitecb8968a0f7bd8927c51ce04ad7ffa124d165018 (patch)
tree41c722cb4685c626668a5df604be0986b4010c64
parenteed2d215d1a42441ea98535c50850e2f03306157 (diff)
downloadrules-cc-ecb8968a0f7bd8927c51ce04ad7ffa124d165018.tar.gz
Support creating shared lib from object lib
-rw-r--r--CC/EXPRESSIONS16
1 files changed, 14 insertions, 2 deletions
diff --git a/CC/EXPRESSIONS b/CC/EXPRESSIONS
index 62293a8..236e430 100644
--- a/CC/EXPRESSIONS
+++ b/CC/EXPRESSIONS
@@ -1394,7 +1394,13 @@
, ["objects", {"type": "CALL_EXPRESSION", "name": "objects"}]
, [ "base name"
, { "type": "if"
- , "cond": {"type": "var", "name": "objects"}
+ , "cond":
+ { "type": "or"
+ , "$1":
+ [ {"type": "var", "name": "objects"}
+ , {"type": "var", "name": "link-deps"}
+ ]
+ }
, "then":
{ "type": "assert_non_empty"
, "msg": "A name has to be provided for non-header-only libraries"
@@ -1422,7 +1428,13 @@
]
, [ "lib"
, { "type": "if"
- , "cond": {"type": "var", "name": "objects"}
+ , "cond":
+ { "type": "or"
+ , "$1":
+ [ {"type": "var", "name": "objects"}
+ , {"type": "var", "name": "link-deps"}
+ ]
+ }
, "else": {"type": "empty_map"}
, "then":
{ "type": "ACTION"