summaryrefslogtreecommitdiff
path: root/rules/CC/prebuilt/EXPRESSIONS
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-05-09 12:21:42 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2023-05-09 12:21:42 +0200
commit91c86187e770b6a3b91d9acc6289006b4323f1ea (patch)
treee62d8ca93c6287af8914bd43a0a26a52da55096c /rules/CC/prebuilt/EXPRESSIONS
parent00ccee9489db2e8e51e1b9750792353e0e029ce8 (diff)
parent40d6a2decf29a697a0aaa9ed211aaf5c4102f855 (diff)
downloadrules-cc-91c86187e770b6a3b91d9acc6289006b4323f1ea.tar.gz
Merge commit '40d6a2decf29a697a0aaa9ed211aaf5c4102f855' into rules/rules-cc
Diffstat (limited to 'rules/CC/prebuilt/EXPRESSIONS')
-rw-r--r--rules/CC/prebuilt/EXPRESSIONS33
1 files changed, 25 insertions, 8 deletions
diff --git a/rules/CC/prebuilt/EXPRESSIONS b/rules/CC/prebuilt/EXPRESSIONS
index 6bfd874..6b7169a 100644
--- a/rules/CC/prebuilt/EXPRESSIONS
+++ b/rules/CC/prebuilt/EXPRESSIONS
@@ -288,6 +288,13 @@
}
}
]
+ , [ "pc-args"
+ , { "type": "if"
+ , "cond": {"type": "var", "name": "shared"}
+ , "then": []
+ , "else": ["--static"]
+ }
+ ]
, [ "cflags-filename"
, {"type": "join", "$1": [{"type": "var", "name": "name"}, ".cflags"]}
]
@@ -307,10 +314,15 @@
]
}
, "cmd":
- [ "./config_reader"
- , {"type": "var", "name": "cflags-filename"}
- , {"type": "var", "name": "main-pkg-config"}
- ]
+ { "type": "++"
+ , "$1":
+ [ [ "./config_reader"
+ , {"type": "var", "name": "cflags-filename"}
+ , {"type": "var", "name": "main-pkg-config"}
+ ]
+ , {"type": "var", "name": "pc-args"}
+ ]
+ }
, "env": {"type": "var", "name": "ENV"}
, "outs": [{"type": "var", "name": "cflags-filename"}]
}
@@ -368,10 +380,15 @@
]
}
, "cmd":
- [ "./config_reader"
- , {"type": "var", "name": "ldflags-filename"}
- , {"type": "var", "name": "main-pkg-config"}
- ]
+ { "type": "++"
+ , "$1":
+ [ [ "./config_reader"
+ , {"type": "var", "name": "ldflags-filename"}
+ , {"type": "var", "name": "main-pkg-config"}
+ ]
+ , {"type": "var", "name": "pc-args"}
+ ]
+ }
, "env": {"type": "var", "name": "ENV"}
, "outs": [{"type": "var", "name": "ldflags-filename"}]
}