only enable arm and wasm when the feature is enabled

This commit is contained in:
Folkert 2020-04-18 15:28:10 +02:00
parent 62b5f165f6
commit 98d451b240

View file

@ -420,12 +420,16 @@ fn gen(
"x86-64"
}
Architecture::Arm(_) => {
Architecture::Arm(_) if cfg!(feature = "target-arm") => {
// NOTE: why not enable arm and wasm by default?
//
// We had some trouble getting them to link properly. This may be resolved in the
// future, or maybe it was just some weird configuration on one machine.
Target::initialize_arm(&InitializationConfig::default());
"arm"
}
Architecture::Wasm32 => {
Architecture::Wasm32 if cfg!(feature = "target-webassembly") => {
Target::initialize_webassembly(&InitializationConfig::default());
"wasm32"