Open russelltg opened 4 months ago
Thanks, I think option 1 and option 3 makes sense.
Fallback to llvm-ml
helps with cross compilation, and having an environment for selecting ar makes a lot of sense.
Though I wonder if we could use existing env variable AR
instead of a new one.
AR
is for archivers, not assemblers....
But you're saying "assume you want an LLVM assember if you want an LLVM archiver"?
Thanks for correction, yeah I mixed them up
In that case having a MASM_ASM
env var does make sense.
Since there's no "standard" env var name for this maybe CC_MASM_ASM
to match the other cc-specific env var CC_ENABLE_DEBUG_OUTPUT
?
Yeah, having CC_
prefix definitely makes sense
LLVM has a MASM assembler,
llvm-ml
, which can perform the tasks of ml.exe and ml64.exe (with the -m64 flag), that can be used when cross-compiling to Windows.Currently, these .exe names are hardcoded, which feels a bit kludgy, but at least there is the woarkaround of adding a script like
which does indeed work. Ideally cc-rs could be taught about llvm-ml though. I see a few options, that may not be mutually exclusive:
Thoughts?