From 5f0b15ec07111b3767c89b19d69a98a759b582f2 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 7 Aug 2024 10:16:00 +0200 Subject: Add field to ["CC", "defaults"] to specify arguments for ar ... instead of hard-coding ["cqs"]. --- CC/RULES | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'CC/RULES') diff --git a/CC/RULES b/CC/RULES index af9ad92..93407ac 100644 --- a/CC/RULES +++ b/CC/RULES @@ -13,6 +13,7 @@ , "CFLAGS" , "CXXFLAGS" , "LDFLAGS" + , "ARFLAGS" , "ADD_COMPILE_FLAGS" , "ADD_CFLAGS" , "ADD_CXXFLAGS" @@ -57,6 +58,11 @@ [ "Linker flags for linking the final CC library. Specifying this field" , "overwrites values from \"base\"." ] + , "ARFLAGS": + [ "Arguments to tell the archiver to create an archive with the specified" + , "object files. If the \"ARFLAGS\" specified in the defaults target are" + , "empty, the rules will use [\"cqs\"]." + ] , "ADD_COMPILE_FLAGS": [ "Additional compilation flags for C and C++. Specifying this field" , "extends values from \"base\" for both, \"CFLAGS\" and \"CXXFLAGS\"." @@ -113,6 +119,7 @@ , ["CFLAGS", {"type": "FIELD", "name": "CFLAGS"}] , ["CXXFLAGS", {"type": "FIELD", "name": "CXXFLAGS"}] , ["LDFLAGS", {"type": "FIELD", "name": "LDFLAGS"}] + , ["ARFLAGS", {"type": "FIELD", "name": "ARFLAGS"}] , ["AR", {"type": "FIELD", "name": "AR"}] , ["PATH", {"type": "FIELD", "name": "PATH"}] , ["provider", "CC"] @@ -155,6 +162,14 @@ , "else": {"type": "CALL_EXPRESSION", "name": "base-provides-++"} } ] + , ["provider", "ARFLAGS"] + , [ "ARFLAGS" + , { "type": "if" + , "cond": {"type": "var", "name": "ARFLAGS"} + , "then": {"type": "var", "name": "ARFLAGS"} + , "else": {"type": "CALL_EXPRESSION", "name": "base-provides-++"} + } + ] , ["provider", "AR"] , [ "AR" , { "type": "if" @@ -350,6 +365,7 @@ , "CXXFLAGS" , "LDFLAGS" , "AR" + , "ARFLAGS" , "PATH" , "ENV" , "TOOLCHAIN" -- cgit v1.2.3