diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-21 13:59:17 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-08-23 15:33:10 +0200 |
commit | d62cbb609f486becb6603e1712d81ba52788232e (patch) | |
tree | e90baf62519ab7664887143560dacbef3b10ecb3 | |
parent | e09422ff46a3a826ad1b58d915728933fa9d710b (diff) | |
download | rules-cc-d62cbb609f486becb6603e1712d81ba52788232e.tar.gz |
rules: add and forward lint information in all cases
... provided the configuration variable "LINT" is set.
-rw-r--r-- | rules/CC/EXPRESSIONS | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/rules/CC/EXPRESSIONS b/rules/CC/EXPRESSIONS index 7d5310e..3ca2bee 100644 --- a/rules/CC/EXPRESSIONS +++ b/rules/CC/EXPRESSIONS @@ -1087,6 +1087,7 @@ , "deps-transition" , "compile-args" , "defaults-transition" + , "modified-transitions" ] , "imports": { "objects": "objects" @@ -1262,7 +1263,17 @@ { "type": "let*" , "bindings": [ ["provider", "lint"] - , ["transition", {"type": "var", "name": "deps-transition"}] + , [ "transition" + , { "type": "lookup" + , "map": + { "type": "var" + , "name": "modified-transitions" + , "default": {"type": "empty_map"} + } + , "key": {"type": "var", "name": "fieldname"} + , "default": {"type": "var", "name": "deps-transition"} + } + ] ] , "body": {"type": "CALL_EXPRESSION", "name": "list_provider"} } @@ -1700,7 +1711,7 @@ ] , ["link-deps", {"type": "CALL_EXPRESSION", "name": "link-deps"}] , ["lib", {"type": "CALL_EXPRESSION", "name": "lib artifact"}] - , ["lint-deps fieldnames", ["deps", "private-deps"]] + , ["lint-deps fieldnames", ["deps", "private-deps", "components"]] , [ "lint" , { "type": "if" , "cond": {"type": "var", "name": "LINT"} @@ -1805,6 +1816,7 @@ , "package" , "debug-srcs" , "debug-hdrs" + , "lint" ] } , { "type": "var" @@ -2036,6 +2048,7 @@ , "ADD_LDFLAGS" , "ENV" , "DEBUG" + , "LINT" , "name" , "pure C" , "srcs" @@ -2066,6 +2079,7 @@ , "ldflags-files-deps": "ldflags-files-deps" , "shared artifact": "shared artifact" , "debug-deps": "debug-deps" + , "lint": "lint information" } , "expression": { "type": "let*" @@ -2124,6 +2138,13 @@ , "else": {"type": "empty_map"} } ] + , ["lint-deps fieldnames", ["deps", "private-deps", "components"]] + , [ "lint" + , { "type": "if" + , "cond": {"type": "var", "name": "LINT"} + , "then": {"type": "CALL_EXPRESSION", "name": "lint"} + } + ] , [ "debug-hdrs" , { "type": "if" , "cond": {"type": "var", "name": "DEBUG"} @@ -2222,6 +2243,7 @@ , "package" , "debug-srcs" , "debug-hdrs" + , "lint" ] } , { "type": "var" @@ -2345,6 +2367,7 @@ , "BUILD_POSITION_INDEPENDENT" , "BUILD_OBJECT_ONLY_DROP_OBJECT_LINKING" , "DEBUG" + , "LINT" , "name" , "pure C" , "srcs" @@ -2375,6 +2398,7 @@ , "ldflags-files-deps": "ldflags-files-deps" , "object artifacts": "object artifacts" , "debug-deps": "debug-deps" + , "lint": "lint information" } , "expression": { "type": "let*" @@ -2398,6 +2422,13 @@ ] , ["link-deps", {"type": "CALL_EXPRESSION", "name": "link-deps"}] , ["objects", {"type": "CALL_EXPRESSION", "name": "object artifacts"}] + , ["lint-deps fieldnames", ["deps", "private-deps", "components"]] + , [ "lint" + , { "type": "if" + , "cond": {"type": "var", "name": "LINT"} + , "then": {"type": "CALL_EXPRESSION", "name": "lint"} + } + ] , [ "link-args" , { "type": "nub_right" , "$1": |