summaryrefslogtreecommitdiff
path: root/CC
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-07-29 11:06:44 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-07-29 13:28:44 +0200
commit54393b2288110c8d2ebcc0c19c14b62e286a6ab9 (patch)
tree4d1ae7364f885e460dbe4c3eb394844489ea98d9 /CC
parent965d97835da8dd2cb71a6444537003577b60a0ad (diff)
downloadrules-cc-54393b2288110c8d2ebcc0c19c14b62e286a6ab9.tar.gz
["CC", "libary"] properly stage ar action
In this action we support a user provided toolchain, hence all the components of the library need to go into a subdirectory to avoid staiging conflicts.
Diffstat (limited to 'CC')
-rw-r--r--CC/EXPRESSIONS69
1 files changed, 51 insertions, 18 deletions
diff --git a/CC/EXPRESSIONS b/CC/EXPRESSIONS
index c7ee9e0..34c0ed4 100644
--- a/CC/EXPRESSIONS
+++ b/CC/EXPRESSIONS
@@ -1047,26 +1047,59 @@
, "cond": {"type": "var", "name": "objects"}
, "else": {"type": "empty_map"}
, "then":
- { "type": "ACTION"
- , "outs": [{"type": "var", "name": "libpath"}]
- , "inputs":
- { "type": "map_union"
- , "$1":
- [ {"type": "var", "name": "TOOLCHAIN"}
- , {"type": "var", "name": "objects"}
+ { "type": "let*"
+ , "bindings":
+ [ [ "staged objects"
+ , { "type": "to_subdir"
+ , "subdir": "work"
+ , "$1": {"type": "var", "name": "objects"}
+ }
]
- }
- , "env":
- {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
- , "cmd":
- { "type": "++"
- , "$1":
- [ [ {"type": "var", "name": "AR", "default": "ar"}
- , "cqs"
- , {"type": "var", "name": "libpath"}
- ]
- , {"type": "keys", "$1": {"type": "var", "name": "objects"}}
+ , [ "staged libpath"
+ , { "type": "join"
+ , "$1": ["work/", {"type": "var", "name": "libpath"}]
+ }
+ ]
+ , [ "staged lib"
+ , { "type": "ACTION"
+ , "outs": [{"type": "var", "name": "staged libpath"}]
+ , "inputs":
+ { "type": "map_union"
+ , "$1":
+ [ {"type": "var", "name": "TOOLCHAIN"}
+ , {"type": "var", "name": "staged objects"}
+ ]
+ }
+ , "env":
+ { "type": "var"
+ , "name": "ENV"
+ , "default": {"type": "empty_map"}
+ }
+ , "cmd":
+ { "type": "++"
+ , "$1":
+ [ [ {"type": "var", "name": "AR", "default": "ar"}
+ , "cqs"
+ , {"type": "var", "name": "staged libpath"}
+ ]
+ , { "type": "keys"
+ , "$1": {"type": "var", "name": "staged objects"}
+ }
+ ]
+ }
+ }
+ ]
+ , [ "lib artifact"
+ , { "type": "lookup"
+ , "map": {"type": "var", "name": "staged lib"}
+ , "key": {"type": "var", "name": "staged libpath"}
+ }
]
+ ]
+ , "body":
+ { "type": "singleton_map"
+ , "key": {"type": "var", "name": "libpath"}
+ , "value": {"type": "var", "name": "lib artifact"}
}
}
}