Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Lorensson <lateralusx.github@gmail.com>2018-12-14 23:45:33 +0300
committerLudovic Henry <luhenry@microsoft.com>2018-12-14 23:45:33 +0300
commitd42d675b81dfb035f1617fa76f1d4bdde71f9359 (patch)
treeb65601abd27be3525828c4bfa2108a35cb1ad9ce /msvc/mono.external.targets
parent1503ca49525e0846bd21e454dae1c5ae2e3afcb0 (diff)
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.
Diffstat (limited to 'msvc/mono.external.targets')
-rw-r--r--msvc/mono.external.targets17
1 files changed, 14 insertions, 3 deletions
diff --git a/msvc/mono.external.targets b/msvc/mono.external.targets
index 70682389c89..e6c998118a4 100644
--- a/msvc/mono.external.targets
+++ b/msvc/mono.external.targets
@@ -113,6 +113,7 @@
<_LLVMSourceDir Condition="'$(_LLVMSourceDir)' == ''">$(_MonoSourceDir)\external\llvm</_LLVMSourceDir>
<_LLVMBuildDir>$([System.IO.Path]::GetFullPath('$(MONO_BUILD_DIR_PREFIX)$(Platform)\obj\external\llvm-build\$(Configuration)'))</_LLVMBuildDir>
<_LLVMInstallDir>$(_LLVMBuildDir)\install</_LLVMInstallDir>
+ <_MonoLLVMConfig>$(_LLVMInstallDir)\bin\llvm-config.exe</_MonoLLVMConfig>
</PropertyGroup>
<PropertyGroup>
@@ -159,11 +160,21 @@
<PropertyGroup Condition="'$(MONO_EXTERNAL_LLVM_CONFIG)' == ''">
<_MonoEnableExternalLLVM>false</_MonoEnableExternalLLVM>
<_MonoEnableInternalLLVM>true</_MonoEnableInternalLLVM>
- <_MonoLLVMConfig>$(_LLVMInstallDir)\bin\llvm-config.exe</_MonoLLVMConfig>
</PropertyGroup>
</Target>
- <Target Name="_SetupMonoLLVMBuildProperties" Condition="$(MONO_ENABLE_LLVM)=='true'">
+ <Target Name="_CheckLLVMPlatformSupport" Condition="'$(MONO_ENABLE_LLVM)' == 'true'">
+ <warning Text="LLVM only supported on x64 builds, disabling LLVM support." Condition="'$(Platform)' != 'x64'" />
+ <PropertyGroup Condition="'$(Platform)' != 'x64'">
+ <MONO_ENABLE_LLVM>false</MONO_ENABLE_LLVM>
+ </PropertyGroup>
+ </Target>
+
+ <Target Name="_SetupMonoLLVMBuildProperties" Condition="$(MONO_ENABLE_LLVM) == 'true'">
+
+ <_CheckConfigurationProperty ConfFile="$(MONO_DIR)/cygconfig.h" ConfRegEx=".*#define.*INTERNAL_LLVM_ASSERTS.*1" Condition="'$(MONO_ENABLE_LLVM_ASSERTS)' != 'true'">
+ <Output TaskParameter="ConfPropertyFoundMatch" PropertyName="MONO_ENABLE_LLVM_ASSERTS" />
+ </_CheckConfigurationProperty>
<Error Text="LLVM config executable $(_MonoLLVMConfig) not found." Condition="!Exists($(_MonoLLVMConfig))" />
@@ -216,7 +227,7 @@
</Target>
- <Target Name="_ConfigureExternalMonoLLVMBuildEnvironment" DependsOnTargets="_SetDefaultLLVMProperties;_CheckEnableLLVM;_CheckInternalLLVM;_CheckExternalLLVM" />
+ <Target Name="_ConfigureExternalMonoLLVMBuildEnvironment" DependsOnTargets="_SetDefaultLLVMProperties;_CheckEnableLLVM;_CheckInternalLLVM;_CheckExternalLLVM;_CheckLLVMPlatformSupport" />
<Target Name="_ConfigureExternalMonoBTLSBuildEnvironment" DependsOnTargets="_CheckEnableBtls" />
<Target Name="_ConfigureExternalMonoBuildEnvironment" DependsOnTargets="_ConfigureExternalMonoLLVMBuildEnvironment;_ConfigureExternalMonoBTLSBuildEnvironment" />