diff --git a/source/dub/compilers/compiler.d b/source/dub/compilers/compiler.d index ca4f7ac..80eafc8 100644 --- a/source/dub/compilers/compiler.d +++ b/source/dub/compilers/compiler.d @@ -88,7 +88,7 @@ /// Convert linker flags to compiler format string[] lflagsToDFlags(in string[] lflags) const; - + /** Runs a tool and provides common boilerplate code. This method should be used by `Compiler` implementations to invoke the @@ -135,7 +135,10 @@ build_platform.compiler, this.name); } - if (arch_override.length && !build_platform.architecture.canFind(arch_override)) { + // Hack: see #1059 + // When compiling with --arch=x86_mscoff build_platform.architecture is equal to ["x86"] and canFind below is false. + // This hack prevents unnesessary warning 'Failed to apply the selected architecture x86_mscoff. Got ["x86"]'. + if (arch_override.length && !build_platform.architecture.canFind(arch_override == "x86_mscoff" ? "x86" : arch_override)) { logWarn(`Failed to apply the selected architecture %s. Got %s.`, arch_override, build_platform.architecture); }