Enable specifying full target triples as --arch for ldc2
By treating all 'architectures' containing a `-` as `-mtriple` values. E.g., `dub --arch=wasm32-unknown-unknown-wasm` to cross-compile to WebAssembly. This dub switch is already used when probing the compiler, so the build platform detection works as expected. Also add `wasm` as detected platform and use the .wasm executable file extension (for ldc2). This fixes #1749 when moving the `-mtriple` option from the dub config file to the dub command line. |
---|
|
source/dub/compilers/ldc.d |
---|
source/dub/platform.d |
---|