Skip to content

Commit 11ffcdc

Browse files
authored
[mono] Use $(HostArch) for LLVM packages (#34322)
* Use HostArch for LLVM packages * define HostArch for mono
1 parent aa032a0 commit 11ffcdc

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/mono/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
<!-- Set default Platform -->
88
<PropertyGroup>
9+
<HostArch>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant)</HostArch>
910
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
1011
<Platform>$(TargetArchitecture)</Platform>
1112

src/mono/llvm/llvm-init.proj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Condition="'$(TargetOS)' == 'Linux'" Include="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)" />
9-
<PackageReference Condition="'$(TargetOS)' == 'Linux'" Include="runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)" />
10-
<PackageReference Condition="'$(TargetOS)' == 'Windows_NT'" Include="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="$(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)" />
11-
<PackageReference Condition="'$(TargetOS)' == 'Windows_NT'" Include="runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="$(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)" />
12-
<PackageReference Condition="'$(TargetOS)' == 'OSX'" Include="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="$(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)" />
13-
<PackageReference Condition="'$(TargetOS)' == 'OSX'" Include="runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="$(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)" />
8+
<PackageReference Condition="'$(TargetOS)' == 'Linux'" Include="runtime.linux-$(HostArch).Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)" />
9+
<PackageReference Condition="'$(TargetOS)' == 'Linux'" Include="runtime.linux-$(HostArch).Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)" />
10+
<PackageReference Condition="'$(TargetOS)' == 'Windows_NT'" Include="runtime.win-$(HostArch).Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="$(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)" />
11+
<PackageReference Condition="'$(TargetOS)' == 'Windows_NT'" Include="runtime.win-$(HostArch).Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="$(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)" />
12+
<PackageReference Condition="'$(TargetOS)' == 'OSX'" Include="runtime.osx.10.12-$(HostArch).Microsoft.NETCore.Runtime.Mono.LLVM.Sdk" Version="$(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)" />
13+
<PackageReference Condition="'$(TargetOS)' == 'OSX'" Include="runtime.osx.10.12-$(HostArch).Microsoft.NETCore.Runtime.Mono.LLVM.Tools" Version="$(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)" />
1414
</ItemGroup>
1515

1616
<Target Name="CopyLLVMToTree" AfterTargets="Restore">
1717
<ItemGroup>
18-
<LLVMFiles Condition="'$(TargetOS)' == 'Linux'" Include="$(NuGetPackageRoot)\runtime.linux-x64.microsoft.netcore.runtime.mono.llvm.sdk\$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)\tools\linux-x64\**" />
19-
<LLVMFiles Condition="'$(TargetOS)' == 'Linux'" Include="$(NuGetPackageRoot)\runtime.linux-x64.microsoft.netcore.runtime.mono.llvm.tools\$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)\tools\linux-x64\**" />
20-
<LLVMFiles Condition="'$(TargetOS)' == 'Windows_NT'" Include="$(NuGetPackageRoot)\runtime.win-x64.microsoft.netcore.runtime.mono.llvm.sdk\$(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)\tools\win-x64\**" />
21-
<LLVMFiles Condition="'$(TargetOS)' == 'Windows_NT'" Include="$(NuGetPackageRoot)\runtime.win-x64.microsoft.netcore.runtime.mono.llvm.tools\$(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)\tools\win-x64\**" />
22-
<LLVMFiles Condition="'$(TargetOS)' == 'OSX'" Include="$(NuGetPackageRoot)\runtime.osx.10.12-x64.microsoft.netcore.runtime.mono.llvm.sdk\$(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)\tools\osx.10.12-x64\**" />
23-
<LLVMFiles Condition="'$(TargetOS)' == 'OSX'" Include="$(NuGetPackageRoot)\runtime.osx.10.12-x64.microsoft.netcore.runtime.mono.llvm.tools\$(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)\tools\osx.10.12-x64\**" />
18+
<LLVMFiles Condition="'$(TargetOS)' == 'Linux'" Include="$(NuGetPackageRoot)\runtime.linux-$(HostArch).microsoft.netcore.runtime.mono.llvm.sdk\$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)\tools\linux-$(HostArch)\**" />
19+
<LLVMFiles Condition="'$(TargetOS)' == 'Linux'" Include="$(NuGetPackageRoot)\runtime.linux-$(HostArch).microsoft.netcore.runtime.mono.llvm.tools\$(runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)\tools\linux-$(HostArch)\**" />
20+
<LLVMFiles Condition="'$(TargetOS)' == 'Windows_NT'" Include="$(NuGetPackageRoot)\runtime.win-$(HostArch).microsoft.netcore.runtime.mono.llvm.sdk\$(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)\tools\win-$(HostArch)\**" />
21+
<LLVMFiles Condition="'$(TargetOS)' == 'Windows_NT'" Include="$(NuGetPackageRoot)\runtime.win-$(HostArch).microsoft.netcore.runtime.mono.llvm.tools\$(runtimewinx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)\tools\win-$(HostArch)\**" />
22+
<LLVMFiles Condition="'$(TargetOS)' == 'OSX'" Include="$(NuGetPackageRoot)\runtime.osx.10.12-$(HostArch).microsoft.netcore.runtime.mono.llvm.sdk\$(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion)\tools\osx.10.12-$(HostArch)\**" />
23+
<LLVMFiles Condition="'$(TargetOS)' == 'OSX'" Include="$(NuGetPackageRoot)\runtime.osx.10.12-$(HostArch).microsoft.netcore.runtime.mono.llvm.tools\$(runtimeosx1012x64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion)\tools\osx.10.12-$(HostArch)\**" />
2424
</ItemGroup>
2525

2626
<Copy SourceFiles="@(LLVMFiles)" DestinationFolder="$(MonoLLVMDir)\%(RecursiveDir)">

0 commit comments

Comments
 (0)