Open ArgoreOfficial opened 1 week ago
for now I've solved this with an intermediate executable that takes the xmake inputs and reformats them for the archiver
having it natively in xmake would be nice though
Reordering flags is not supported yet, and it's complicated to implement.
if you use specialized archiver, you can call set_toolset("ar@artool mode")
to set mode.
or write a shell script to wrap it to ar
or wait for this feature to custom toolchain command and flags. https://github.com/xmake-io/xmake/issues/5554
I tried doing "ar@artool mode"
but that failed due to the exec trying to run a file named artool mode
.
if I remember correctly the command it called looked something like
exec( "\"artool mode\" -o file... ..etc" )
I'll wait for the feature, my workaround does its job for now :)
Is your feature request related to a problem? Please describe.
A specialized archiver I am working with uses the format
ar [mode] -o [outFile] [inputFiles...]
This mode flag has to be the first parameter, and from what I have found you are only able to append flags at the end
Describe the solution you'd like
add_arflags("mode", { prepend = true })
this would yield the following commandartool mode -o "outfile.a" "one.o" "two.o" "three.o" ...etc
Describe alternatives you've considered
alternatively some way to directly set the order
set_ar_order({ "userflags", "defaultflags", "files", ...etc })
Additional context
No response