pw_toolchain: Add missing {{arflags} to tool("alink")
GN configs support flags for ar. Typically it is used to enable thin
archives. Allow this in pigweed.
No-Docs-Update-Reason: We're not documenting GN here.
Change-Id: I663750e49adaf67cb4274776d93c946b4d4919b0
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/39440
Commit-Queue: Michael Spang <spang@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
diff --git a/pw_toolchain/generate_toolchain.gni b/pw_toolchain/generate_toolchain.gni
index ccc1c36..5be80eb5 100644
--- a/pw_toolchain/generate_toolchain.gni
+++ b/pw_toolchain/generate_toolchain.gni
@@ -223,10 +223,9 @@
rspfile = "{{output}}.rsp"
rspfile_content = "{{inputs}}"
rm_command = "del /F /Q \"{{output}}\" 2> NUL"
- command = "cmd /c \"($rm_command) & ${invoker.ar} rcs {{output}} @$rspfile\""
+ command = "cmd /c \"($rm_command) & ${invoker.ar} {{arflags}} rcs {{output}} @$rspfile\""
} else {
- command =
- "rm -f {{output}} && ${invoker.ar} rcs {{output}} {{inputs}}"
+ command = "rm -f {{output}} && ${invoker.ar} {{arflags}} rcs {{output}} {{inputs}}"
}
description = "ar {{target_output_name}}{{output_extension}}"