Skip to content

Commit

Permalink
[mono] Allow the use of an override directory for LLVM. (dotnet#32070)
Browse files Browse the repository at this point in the history
With this change, a custom LLVM directory can be set via the `MonoLLVMDir` property. When using a custom LLVM directory, llvm-init.proj will be ignored.

`--enable--llvm` (with two dashes) is not a valid mono configure argument, and `--enable-llvm` is implied by `--with-llvm`.
  • Loading branch information
imhameed authored Feb 11, 2020
1 parent 02b829c commit 447e111
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<MonoObjDir>$(ArtifactsObjDir)mono/$(PlatformConfigPathPart)/</MonoObjDir>
<MonoEnableLLVM Condition="'$(MonoEnableLLVM)' == ''">false</MonoEnableLLVM>
<MonoLLVMDir Condition="'$(MonoEnableLLVM)' == 'true'">$(MonoObjDir)llvm</MonoLLVMDir>
<MonoLLVMDir Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">$(MonoObjDir)llvm</MonoLLVMDir>
<DotNetExec Condition="'$(OS)' == 'Windows_NT'">dotnet.exe</DotNetExec>
<DotNetExec Condition="'$(DotNetExec)' == ''">dotnet</DotNetExec>
<LocalDotnetDir>..\..\.dotnet</LocalDotnetDir>
Expand Down Expand Up @@ -33,7 +33,7 @@
<_MonoExtraCXXFLAGS>-O2 -g</_MonoExtraCXXFLAGS>
</PropertyGroup>
<PropertyGroup>
<_MonoConfigureParams Condition="'$(MonoEnableLLVM)' == 'true'">$(_MonoConfigureParams) --enable--llvm --with-llvm=$(MonoLLVMDir) </_MonoConfigureParams>
<_MonoConfigureParams Condition="'$(MonoEnableLLVM)' == 'true'">$(_MonoConfigureParams) --with-llvm=$(MonoLLVMDir) </_MonoConfigureParams>
<_MonoConfigureParams>$(_MonoConfigureParams) --enable-maintainer-mode --enable-compile-warnings --with-core=only CFLAGS="$(_MonoExtraCFLAGS)" CXXFLAGS="$(_MonoExtraCXXFLAGS)"</_MonoConfigureParams>
</PropertyGroup>

Expand Down Expand Up @@ -89,7 +89,7 @@

<Target Name="Restore">
<MSBuild Projects="$(MonoProjectRoot)netcore\nuget\packages.builds" Targets="Restore" />
<MSBuild Condition="'$(MonoEnableLLVM)' == 'true'" Projects="$(MonoProjectRoot)llvm\llvm-init.proj" Targets="Restore" Properties="MonoObjDir=$(MonoObjDir);MonoLLVMDir=$(MonoLLVMDir)" />
<MSBuild Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == '$(MonoObjDir)llvm'" Projects="$(MonoProjectRoot)llvm\llvm-init.proj" Targets="Restore" Properties="MonoObjDir=$(MonoObjDir);MonoLLVMDir=$(MonoLLVMDir)" />
</Target>

<Target Name="Pack">
Expand Down

0 comments on commit 447e111

Please sign in to comment.