diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-06-30 16:42:29 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-06-30 18:01:06 +0200 |
commit | 3da82010cea24fb8ed41ff88c5d8df8e086c5aa4 (patch) | |
tree | bb8e122960827e5bfc557a69521ca9614795025c | |
parent | c130ef42628648b15824a3ab8514972603cbc3c4 (diff) | |
download | rules-cc-3da82010cea24fb8ed41ff88c5d8df8e086c5aa4.tar.gz |
Rules: Split library result and library artifact expression
-rw-r--r-- | CC/EXPRESSIONS | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/CC/EXPRESSIONS b/CC/EXPRESSIONS index 3c1fa33..b551787 100644 --- a/CC/EXPRESSIONS +++ b/CC/EXPRESSIONS @@ -340,7 +340,7 @@ } } } -, "lib result": +, "lib artifact": { "vars": [ "CXX" , "CXXFLAGS" @@ -352,15 +352,10 @@ , "hdrs" , "private-hdrs" , "local cflags" - , "link external" - , "extra-provides" + , "compile-deps" ] , "imports": - { "artifacts": ["./", "..", "field_artifacts"] - , "compile-deps": "compile-deps" - , "link-deps": "link-deps" - , "link-args-deps": "link-args-deps" - , "compiler": "compiler" + { "compiler": "compiler" , "flags": "flags" , "objects": "objects" , "default-ENV": "default-ENV" @@ -400,8 +395,6 @@ } ] , ["deps-fieldnames", ["deps", "proto-deps"]] - , ["compile-deps", {"type": "CALL_EXPRESSION", "name": "compile-deps"}] - , ["link-deps", {"type": "CALL_EXPRESSION", "name": "link-deps"}] , [ "local hdrs" , { "type": "disjoint_map_union" , "$1": @@ -448,6 +441,42 @@ , "$1": {"type": "var", "name": "lib"} } ] + ] + , "body": + { "type": "to_subdir" + , "subdir": {"type": "var", "name": "stage"} + , "$1": {"type": "var", "name": "lib"} + } + } + } +, "lib result": + { "vars": + [ "CXX" + , "CXXFLAGS" + , "CC" + , "CFLAGS" + , "ENV" + , "AR" + , "srcs" + , "hdrs" + , "private-hdrs" + , "local cflags" + , "link external" + , "extra-provides" + ] + , "imports": + { "compile-deps": "compile-deps" + , "link-deps": "link-deps" + , "link-args-deps": "link-args-deps" + , "lib artifact": "lib artifact" + } + , "expression": + { "type": "let*" + , "bindings": + [ ["deps-fieldnames", ["deps", "proto-deps"]] + , ["compile-deps", {"type": "CALL_EXPRESSION", "name": "compile-deps"}] + , ["link-deps", {"type": "CALL_EXPRESSION", "name": "link-deps"}] + , ["lib", {"type": "CALL_EXPRESSION", "name": "lib artifact"}] , [ "link-args" , { "type": "nub_right" , "$1": |