Skip to content

Commit 7ed82bc

Browse files
committed
Enable building LLVM cross-compilers on Linux
Linux doesn't need to build MXE since the distributions we support at this point have mingw packaged and we rely on the packages to provide cross-compilation environment for Windows. Neither does Linux build require the Mono Windows environments to be built. Previously, when one enable the Windows LLVM build the Mono Windows runtime was attempted to build as well. The attempt would fail since some Windows-only libraries required by Mono/libmonodroid aren't available as packages on Linux. This commit disables building of Mono Windows runtimes while making it possible to build the LLVM Windows cross compiler.
1 parent d891a86 commit 7ed82bc

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

build-tools/mono-runtimes/mono-runtimes.projitems

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
<InstallPath Condition="$(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))">Linux/</InstallPath>
277277
</_LlvmRuntime>
278278

279-
<_LlvmRuntime Include="llvmwin32" Condition=" '$(_LlvmNeeded)' != '' And ($(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':mxe-Win32:')) Or $(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':linux-Win32:'))) ">
279+
<_LlvmRuntime Include="llvmwin32" Condition=" '$(_LlvmNeededWindows32)' != '' ">
280280
<BuildDir>build-win32</BuildDir>
281281
<Prefix>$(_LlvmPrefixWin32)</Prefix>
282282
<ConfigureFlags>$(_LlvmConfigureFlagsWin32)</ConfigureFlags>
@@ -287,7 +287,7 @@
287287
<InstallPath></InstallPath>
288288
</_LlvmRuntime>
289289

290-
<_LlvmRuntime Include="llvmwin64" Condition=" '$(_LlvmNeeded)' != '' And ($(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':mxe-Win64:')) Or $(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':linux-Win64:'))) ">
290+
<_LlvmRuntime Include="llvmwin64" Condition=" '$(_LlvmNeededWindows64)' != '' ">
291291
<BuildDir>build-win64</BuildDir>
292292
<Prefix>$(_LlvmPrefixWin64)</Prefix>
293293
<ConfigureFlags>$(_LlvmConfigureFlagsWin64)</ConfigureFlags>

build-tools/mono-runtimes/mono-runtimes.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
<!-- LLVM -->
2828
<_LlvmNeeded Condition=" '$(AndroidSupportedTargetAotAbis)' != '' ">yes</_LlvmNeeded>
2929
<_LlvmCanBuild64 Condition=" '$(HostBits)' == '64' ">yes</_LlvmCanBuild64>
30+
<_LlvmNeededWindows32></_LlvmNeededWindows32>
31+
<_LlvmNeededWindows64></_LlvmNeededWindows64>
32+
<_LlvmHaveWindowsAOT></_LlvmHaveWindowsAOT>
33+
<_LlvmHaveWindowsAOT Condition=" $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-armeabi:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-arm64:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-x86:')) Or $(AndroidSupportedTargetAotAbisForConditionalChecks.Contains (':win-x86_64:'))">yes</_LlvmHaveWindowsAOT>
34+
<_LlvmNeededWindows32 Condition=" '$(_LlvmNeeded)' != '' And '$(_LlvmHaveWindowsAOT)' == 'yes' And ($(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':mxe-Win32:')) Or $(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))) ">yes</_LlvmNeededWindows32>
35+
<_LlvmNeededWindows64 Condition=" '$(_LlvmNeeded)' != '' And '$(_LlvmHaveWindowsAOT)' == 'yes' And '$(_LlvmCanBuild64And)' == 'yes' And ($(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':mxe-Win64:')) Or $(AndroidSupportedHostJitAbisForConditionalChecks.Contains (':Linux:'))) ">yes</_LlvmNeededWindows64>
3036
<_LlvmOutputDirTop>$(_CrossOutputDirTop)\llvm</_LlvmOutputDirTop>
3137

3238
<_LlvmBuildDir32>$(_LlvmOutputDirTop)\build-32</_LlvmBuildDir32>

0 commit comments

Comments
 (0)