From de4f1edc350636e4e2cde14ef1adda8716d394f6 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Fri, 26 Aug 2022 12:05:18 +0200 Subject: Rules: Extend configure rule by 'compiler_family' --- CC/EXPRESSIONS | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'CC/EXPRESSIONS') diff --git a/CC/EXPRESSIONS b/CC/EXPRESSIONS index 9e83937..d04591f 100644 --- a/CC/EXPRESSIONS +++ b/CC/EXPRESSIONS @@ -49,7 +49,8 @@ } } , "configure transition": - { "expression": + { "vars": ["COMPILER_FAMILY"] + , "expression": { "type": "let*" , "bindings": [ [ "OS" @@ -75,6 +76,16 @@ , "else": {"type": "var", "name": "ARCH"} } ] + , [ "FAMILY" + , {"type": "join", "$1": {"type": "FIELD", "name": "compiler_family"}} + ] + , [ "COMPILER_FAMILY" + , { "type": "if" + , "cond": {"type": "var", "name": "FAMILY"} + , "then": {"type": "var", "name": "FAMILY"} + , "else": {"type": "var", "name": "COMPILER_FAMILY"} + } + ] ] , "body": { "type": "map_union" @@ -95,6 +106,10 @@ , "key": "TARGET_ARCH" , "value": {"type": "var", "name": "TARGET_ARCH"} } + , { "type": "singleton_map" + , "key": "COMPILER_FAMILY" + , "value": {"type": "var", "name": "COMPILER_FAMILY"} + } ] } } -- cgit v1.2.3