We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 824f09a commit b92fac5Copy full SHA for b92fac5
1 file changed
win/vs-cfg.cmd
@@ -51,7 +51,14 @@ set LAST_GENERATOR_IDX=4
51
set GEN_SHORTHAND=!GENERATOR:vs=!
52
53
if not "!GEN_SHORTHAND!"=="" if !GEN_SHORTHAND!==!GENERATOR! goto :GeneratorShorthandCheckDone
54
-set VS_PLATFORM=Win32
+
55
+set "VS_PLATFORM=Win32"
56
+:: use the command prompt target platform, at least initially
57
+if %VSCMD_ARG_TGT_ARCH%==x86 set "VS_PLATFORM=Win32"
58
+if %VSCMD_ARG_TGT_ARCH%==x64 set "VS_PLATFORM=x64"
59
+if %VSCMD_ARG_TGT_ARCH%==arm set "VS_PLATFORM=ARM"
60
+if %VSCMD_ARG_TGT_ARCH%==arm64 set "VS_PLATFORM=ARM64"
61
62
:: "echo if" trick from http://stackoverflow.com/a/8758579
63
echo(!GEN_SHORTHAND! | findstr /c:"-x86" >nul && ( set "VS_PLATFORM=Win32" )
64
echo(!GEN_SHORTHAND! | findstr /c:"-x64" >nul && ( set "VS_PLATFORM=x64" )
0 commit comments