diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-05-08 17:10:19 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-05-09 12:17:24 +0200 |
commit | 40d6a2decf29a697a0aaa9ed211aaf5c4102f855 (patch) | |
tree | f363ebaeaeafa7d824e2854027c84ecf17fbae34 /CC/prebuilt/EXPRESSIONS | |
parent | 0a11bce4b8f80e8e9041788ccbf383722394872f (diff) | |
download | rules-cc-40d6a2decf29a697a0aaa9ed211aaf5c4102f855.tar.gz |
rules: prebuilt expr calls pkg-config with --static
... for static prebuilt libraries.
Diffstat (limited to 'CC/prebuilt/EXPRESSIONS')
-rw-r--r-- | CC/prebuilt/EXPRESSIONS | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/CC/prebuilt/EXPRESSIONS b/CC/prebuilt/EXPRESSIONS index 6bfd874..6b7169a 100644 --- a/CC/prebuilt/EXPRESSIONS +++ b/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"}] } |