Description
Zig needs the ability to pass target features along to the integrated assembler - see ziglang/zig#10411.
For C files, Zig uses -Xclang -target-feature
. For assembly, the only option at the moment is to switch to clang -cc1as
but that would require massive surgery in Zig's driver code since it has a shared code path (with tons of logic) for both at the moment.
There is a very simple change that would solve this headache: Update Clang's CollectArgsForIntegratedAssembler()
to accept -target-feature
and pass it along. (Or even pass anything along, as -Xclang
does.)
Alternatively, if -Xassembler
has to be kept GNU-compatible only, we could imagine adding a new -Xclangas
that just passes the arguments through like -Xclang
.
Would either of these options be acceptable? If so, I could probably do a PR.