diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index 4f5afd3dd..fac62b978 100644 --- a/src/tools/msvc.jam +++ b/src/tools/msvc.jam @@ -254,6 +254,11 @@ rule configure-version-specific ( toolset : version : conditions ) # 8.0 and above only has multi-threaded static RTL. toolset.flags $(toolset).compile CFLAGS $(conditions)/off/static/single : /MT ; toolset.flags $(toolset).compile CFLAGS $(conditions)/on/static/single : /MTd ; + + # Specify target machine type so the linker will not need to guess. + toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-amd64) : /MACHINE:X64 ; + toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-i386) : /MACHINE:X86 ; + toolset.flags $(toolset).link LINKFLAGS $(conditions)/$(.cpu-arch-ia64) : /MACHINE:IA64 ; } toolset.pop-checking-for-flags-module ; }