11use anyhow:: Result ;
2- use std:: { env , fs, path:: PathBuf } ;
2+ use std:: { fs, path:: PathBuf } ;
33
44use heck:: ToUpperCamelCase ;
55
@@ -103,36 +103,21 @@ impl CSProjectLLVMBuilder {
103103 let os = match std:: env:: consts:: OS {
104104 "windows" => "win" ,
105105 "linux" => std:: env:: consts:: OS ,
106- "macos" => "osx" ,
107106 other => todo ! ( "OS {} not supported" , other) ,
108107 } ;
109108
110- let arch = match std:: env:: consts:: ARCH {
111- "aarch64" => "arm64" ,
112- "x86_64" => "x64" ,
113- other => todo ! ( "ARCH {} not supported" , other) ,
114- } ;
115-
116- let ilc_version = env:: var ( "ILC_VERSION" ) . unwrap_or_else ( |_| "10.0.0-*" . to_string ( ) ) ;
117-
118109 csproj. push_str (
119110 & format ! (
120111 r#"
121112 <ItemGroup>
122- <PackageReference Include="Microsoft.DotNet.ILCompiler.LLVM" Version="{ilc_version} " />
123- <PackageReference Include="runtime.{os}-{arch} .Microsoft.DotNet.ILCompiler.LLVM" Version="{ilc_version} " />
113+ <PackageReference Include="Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-* " />
114+ <PackageReference Include="runtime.{os}-x64 .Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-* " />
124115 </ItemGroup>"# ) ,
125116 ) ;
126117
127- let local_source = match env:: var ( "ILC_PACKAGES_PATH" ) {
128- Ok ( path) => format ! ( r#"<add key="local-ilc" value="{path}" />"# ) ,
129- Err ( _) => String :: new ( ) ,
130- } ;
131-
132118 fs:: write (
133119 self . dir . join ( "nuget.config" ) ,
134- format ! (
135- r#"<?xml version="1.0" encoding="utf-8"?>
120+ r#"<?xml version="1.0" encoding="utf-8"?>
136121 <configuration>
137122 <config>
138123 <!-- Store the packages where they can be shared between tests -->
@@ -141,12 +126,11 @@ impl CSProjectLLVMBuilder {
141126 <packageSources>
142127 <!--To inherit the global NuGet package sources remove the <clear/> line below -->
143128 <clear />
144- {local_source}
145129 <add key="nuget" value="https://api.nuget.org/v3/index.json" />
146130 <add key="dotnet-experimental" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json" />
131+ <!--<add key="dotnet-experimental" value="C:\github\runtimelab\artifacts\packages\Debug\Shipping" />-->
147132 </packageSources>
148- </configuration>"#
149- ) ,
133+ </configuration>"# ,
150134 ) ?;
151135 }
152136
0 commit comments