Browse Source

Make the default build for Windows 64-bit

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1213/head
Dimitar Dobrev 6 years ago committed by João Matos
parent
commit
d24ef35949
  1. 11
      appveyor.yml
  2. 4
      build/Helpers.lua
  3. 6
      build/scripts/LLVM.lua

11
appveyor.yml

@ -32,12 +32,11 @@ configuration: @@ -32,12 +32,11 @@ configuration:
environment:
VS_VERSION: vs2017
BUILD_PLATFORM: 'x86'
DEPS_PATH: '%APPVEYOR_BUILD_FOLDER%\deps'
LLVM_PATH: '%APPVEYOR_BUILD_FOLDER%\deps\llvm'
BUILD_PATH: '%APPVEYOR_BUILD_FOLDER%\build\%VS_VERSION%'
LIB_PATH: '%APPVEYOR_BUILD_FOLDER%\build\%VS_VERSION%\lib\%CONFIGURATION%_%BUILD_PLATFORM%'
ARTIFACT_NAME: '%APPVEYOR_PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%VS_VERSION%-%BUILD_PLATFORM%.zip'
LIB_PATH: '%APPVEYOR_BUILD_FOLDER%\build\%VS_VERSION%\lib\%CONFIGURATION%_%PLATFORM%'
ARTIFACT_NAME: '%APPVEYOR_PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%VS_VERSION%-%PLATFORM%.zip'
GITHUB_ACCESS_TOKEN:
secure: CrxPDgxTKC9ZRvFjttpRPO+e1DT8s0Zkk9HrAmHOIzDkOfFbbu1iTm/yJjZ2eDcd
@ -45,11 +44,11 @@ init: @@ -45,11 +44,11 @@ init:
- git config --global core.autocrlf true
install:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
- build\premake5.exe --file=build\scripts\LLVM.lua download_llvm
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%
- build\premake5.exe --file=build\scripts\LLVM.lua download_llvm --arch=%PLATFORM%
build_script:
- build\premake5.exe --file=build\premake5.lua %VS_VERSION%
- build\premake5.exe --file=build\premake5.lua %VS_VERSION% --arch=%PLATFORM%
- msbuild %BUILD_PATH%\CppSharp.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /verbosity:minimal
#---------------------------------#

4
build/Helpers.lua

@ -28,11 +28,11 @@ function target_architecture() @@ -28,11 +28,11 @@ function target_architecture()
return "AnyCPU"
end
-- Default to 32-bit on Windows and Mono architecture otherwise.
-- Default to 64-bit on Windows and Mono architecture otherwise.
if explicit_target_architecture ~= nil then
return explicit_target_architecture
end
if os.ishost("windows") then return "x86" end
if os.ishost("windows") then return "x64" end
return is_64_bits_mono_runtime() and "x64" or "x86"
end

6
build/scripts/LLVM.lua

@ -347,9 +347,9 @@ end @@ -347,9 +347,9 @@ end
function get_cmake_generator()
local vsver = get_vs_version()
if vsver == "vs2017" then
return "Visual Studio 15 2017"
return "Visual Studio 15 2017" .. (target_architecture() == "x64" and " Win64" or "")
elseif vsver == "vs2015" then
return "Visual Studio 14 2015"
return "Visual Studio 14 2015" .. (target_architecture() == "x64" and " Win64" or "")
else
error("Cannot map to CMake configuration due to unknown MSVC version")
end
@ -368,7 +368,7 @@ function build_llvm(llvm_build) @@ -368,7 +368,7 @@ function build_llvm(llvm_build)
if os.ishost("windows") and use_msbuild then
cmake(get_cmake_generator(), conf, llvm_build)
local llvm_sln = path.join(llvm_build, "LLVM.sln")
msbuild(llvm_sln, conf)
msbuild('"' .. llvm_sln .. '"', conf)
else
local options = os.ishost("macosx") and
"-DLLVM_ENABLE_LIBCXX=true" or ""

Loading…
Cancel
Save