Skip to content

Commit d24ef35

Browse files
ddobrevtritao
authored andcommitted
Make the default build for Windows 64-bit
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent c579b65 commit d24ef35

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

appveyor.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,23 @@ configuration:
3232

3333
environment:
3434
VS_VERSION: vs2017
35-
BUILD_PLATFORM: 'x86'
3635
DEPS_PATH: '%APPVEYOR_BUILD_FOLDER%\deps'
3736
LLVM_PATH: '%APPVEYOR_BUILD_FOLDER%\deps\llvm'
3837
BUILD_PATH: '%APPVEYOR_BUILD_FOLDER%\build\%VS_VERSION%'
39-
LIB_PATH: '%APPVEYOR_BUILD_FOLDER%\build\%VS_VERSION%\lib\%CONFIGURATION%_%BUILD_PLATFORM%'
40-
ARTIFACT_NAME: '%APPVEYOR_PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%VS_VERSION%-%BUILD_PLATFORM%.zip'
38+
LIB_PATH: '%APPVEYOR_BUILD_FOLDER%\build\%VS_VERSION%\lib\%CONFIGURATION%_%PLATFORM%'
39+
ARTIFACT_NAME: '%APPVEYOR_PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%VS_VERSION%-%PLATFORM%.zip'
4140
GITHUB_ACCESS_TOKEN:
4241
secure: CrxPDgxTKC9ZRvFjttpRPO+e1DT8s0Zkk9HrAmHOIzDkOfFbbu1iTm/yJjZ2eDcd
4342

4443
init:
4544
- git config --global core.autocrlf true
4645

4746
install:
48-
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
49-
- build\premake5.exe --file=build\scripts\LLVM.lua download_llvm
47+
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
48+
- build\premake5.exe --file=build\scripts\LLVM.lua download_llvm --arch=%PLATFORM%
5049

5150
build_script:
52-
- build\premake5.exe --file=build\premake5.lua %VS_VERSION%
51+
- build\premake5.exe --file=build\premake5.lua %VS_VERSION% --arch=%PLATFORM%
5352
- msbuild %BUILD_PATH%\CppSharp.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /verbosity:minimal
5453

5554
#---------------------------------#

build/Helpers.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ function target_architecture()
2828
return "AnyCPU"
2929
end
3030

31-
-- Default to 32-bit on Windows and Mono architecture otherwise.
31+
-- Default to 64-bit on Windows and Mono architecture otherwise.
3232
if explicit_target_architecture ~= nil then
3333
return explicit_target_architecture
3434
end
35-
if os.ishost("windows") then return "x86" end
35+
if os.ishost("windows") then return "x64" end
3636
return is_64_bits_mono_runtime() and "x64" or "x86"
3737
end
3838

build/scripts/LLVM.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,9 @@ end
347347
function get_cmake_generator()
348348
local vsver = get_vs_version()
349349
if vsver == "vs2017" then
350-
return "Visual Studio 15 2017"
350+
return "Visual Studio 15 2017" .. (target_architecture() == "x64" and " Win64" or "")
351351
elseif vsver == "vs2015" then
352-
return "Visual Studio 14 2015"
352+
return "Visual Studio 14 2015" .. (target_architecture() == "x64" and " Win64" or "")
353353
else
354354
error("Cannot map to CMake configuration due to unknown MSVC version")
355355
end
@@ -368,7 +368,7 @@ function build_llvm(llvm_build)
368368
if os.ishost("windows") and use_msbuild then
369369
cmake(get_cmake_generator(), conf, llvm_build)
370370
local llvm_sln = path.join(llvm_build, "LLVM.sln")
371-
msbuild(llvm_sln, conf)
371+
msbuild('"' .. llvm_sln .. '"', conf)
372372
else
373373
local options = os.ishost("macosx") and
374374
"-DLLVM_ENABLE_LIBCXX=true" or ""

0 commit comments

Comments
 (0)