From d42d675b81dfb035f1617fa76f1d4bdde71f9359 Mon Sep 17 00:00:00 2001 From: Johan Lorensson Date: Fri, 14 Dec 2018 15:45:33 -0500 Subject: Windows x64 LLVM assert support + MSVC only for none cross compiler build. (#11946) * Add support for LLVM asserts in internal LLVM build on Windows. * Only build LLVM using MSVC if not cross compiling. If not cross compiling, building runtime where host/target is Windows, only build and use LLVM as part of msvc build (only supported configuration), disabled on gcc build. Enforce 64-bit LLVM support when building using Visual Studio solution file. * Disable Windows LLVM Visual Studio build on unsupported configurations. Automatically disable Windows LLVM build in Visual Studio. This enables the option to configure using --enable-llvm but still build all runtime configurations from within Visual Studio. A warning will be issued into build logs when LLVM support is disabled for a specific build configuration. * Fix so build-init always have cygconf.h available when needed. --- msvc/build-external-llvm.bat | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'msvc/build-external-llvm.bat') diff --git a/msvc/build-external-llvm.bat b/msvc/build-external-llvm.bat index e65bef93a6a..4982a64c42d 100644 --- a/msvc/build-external-llvm.bat +++ b/msvc/build-external-llvm.bat @@ -9,10 +9,11 @@ :: %3 LLVM install root directory. :: %4 Mono distribution root directory. :: %5 VS CFLAGS. -:: %6 VS platform (Win32/x64) -:: %7 VS configuration (Debug/Release) -:: %8 VS target -:: %9 MsBuild bin path, if used. +:: %6 Additional CMake arguments. +:: %7 VS platform (Win32/x64). +:: %8 VS configuration (Debug/Release). +:: %9 VS target. +:: %10 MsBuild bin path, if used. :: -------------------------------------------------- @echo off @@ -33,10 +34,11 @@ set LLVM_BUILD_DIR=%~2 set LLVM_INSTALL_DIR=%~3 set MONO_DIST_DIR=%~4 set VS_CFLAGS=%~5 -set VS_PLATFORM=%~6 -set VS_CONFIGURATION=%~7 -set VS_TARGET=%~8 -set MSBUILD_BIN_PATH=%~9 +set LLVM_ADDITIONAL_CMAKE_ARGS=%~6 +set VS_PLATFORM=%~7 +set VS_CONFIGURATION=%~8 +set VS_TARGET=%~9 +set MSBUILD_BIN_PATH=%~10 :: Setup toolchain. :: set GIT= @@ -211,6 +213,7 @@ if /i "%CMAKE_GENERATOR%" == "ninja" ( -DLLVM_TOOLS_TO_BUILD="opt;llc;llvm-config;llvm-dis;llvm-mc;llvm-as" ^ -DLLVM_ENABLE_LIBXML2=Off ^ -DCMAKE_SYSTEM_PROCESSOR="%LLVM_ARCH%" ^ +%LLVM_ADDITIONAL_CMAKE_ARGS% ^ %CMAKE_GENERATOR_ARGS% ^ -G "%CMAKE_GENERATOR%" ^ "%LLVM_DIR%" -- cgit v1.2.3