Skip to content

Commit 04ebdb0

Browse files
author
Timmy Silesmo
committed
reverted macos changes and moved to separate pr
1 parent 691a89e commit 04ebdb0

2 files changed

Lines changed: 6 additions & 23 deletions

File tree

crates/csharp/src/csproj.rs

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use anyhow::Result;
2-
use std::{env, fs, path::PathBuf};
2+
use std::{fs, path::PathBuf};
33

44
use 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

crates/test/src/csharp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ impl LanguageMethods for Csharp {
9999
let os = match std::env::consts::OS {
100100
"windows" => "win",
101101
"linux" => std::env::consts::OS,
102-
"macos" => "osx",
103102
other => todo!("OS {} not supported", other),
104103
};
105104

0 commit comments

Comments
 (0)