summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-09-14 14:59:29 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-09-14 16:12:58 +0200
commitfde7ef4f123d65f6a40b5de22b5f9d8c75f3e5ae (patch)
treebb7f6c95c950398e056e2d537d01249cf666f929
parentdb835b5846c2961b6821e25808515bb4a1a61a4f (diff)
downloadjustbuild-fde7ef4f123d65f6a40b5de22b5f9d8c75f3e5ae.tar.gz
Defaults: Fix definition of ar binary
-rw-r--r--etc/defaults/CC/TARGETS30
1 files changed, 29 insertions, 1 deletions
diff --git a/etc/defaults/CC/TARGETS b/etc/defaults/CC/TARGETS
index c2f93fdf..d51c8218 100644
--- a/etc/defaults/CC/TARGETS
+++ b/etc/defaults/CC/TARGETS
@@ -189,7 +189,35 @@
, "arguments_config": ["OS", "HOST_ARCH", "TARGET_ARCH"]
, "CC": ["clang"]
, "CXX": ["clang++"]
- , "AR": ["ar"]
+ , "AR":
+ { "type": "let*"
+ , "bindings":
+ [ [ "PLATFORM"
+ , { "type": "join"
+ , "separator": "_"
+ , "$1":
+ [ {"type": "var", "name": "OS"}
+ , {"type": "var", "name": "TARGET_ARCH"}
+ ]
+ }
+ ]
+ ]
+ , "body":
+ { "type": "case"
+ , "expr": {"type": "var", "name": "PLATFORM"}
+ , "case":
+ { "linux_x86": ["i686-linux-gnu-ar"]
+ , "linux_x86_64": ["x86_64-linux-gnu-ar"]
+ , "linux_arm": ["arm-linux-gnueabi-ar"]
+ , "linux_arm64": ["aarch64-linux-gnu-ar"]
+ }
+ , "default":
+ { "type": "fail"
+ , "msg":
+ ["Unsupported PLATFORM for ar", {"type": "var", "name": "PLATFORM"}]
+ }
+ }
+ }
, "CFLAGS":
{ "type": "let*"
, "bindings":