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.
1 parent c5dac5b commit 485f0d1093592f71bd7198708e671cd20931f21d
@Martin Kinkelin Martin Kinkelin authored on 17 Aug 2019
Showing 2 changed files
View
source/dub/compilers/ldc.d
View
source/dub/platform.d