ldc-developers / ldc

The LLVM-based D Compiler.
http://wiki.dlang.org/LDC
Other
1.21k stars 262 forks source link

`--x86-asm-syntax=intel` option not documented #4658

Open dkorpel opened 6 months ago

dkorpel commented 6 months ago

I was looking for an option to output intel syntax with -output-s, and only found this because ldmd pushes this flag for -vasm. It would be nice if this option were more discoverable.

JohanEngelen commented 6 months ago

The --x86-asm-syntax=intel option is an LLVM option (meaning it is probably "expert" usage, and it is also available to Clang), and I don't think LDC should document such options; LDC should not be documenting LLVM, because it will quietly bitrot. I guess one could argue that LDC should add the -masm=intel option. https://stackoverflow.com/questions/10990018/how-to-generate-assembly-code-with-clang-in-intel-syntax

dkorpel commented 6 months ago

Maybe instead of documenting it as its own flag, mention it in the description of -output-s. LDC already depends on the flag through ldmd, so I don't think it increases the 'bitrot surface', but if this is meant to stay undocumented, that's also fair.