Skip to content

Commit 2a3cf1f

Browse files
agockeCopilot
andcommitted
Enable shared compilation with DOTNET_ROOT fix
Update bxl_rules and bxl_rules_dotnet pins to versions that set DOTNET_ROOT when shared compilation is enabled. This allows the VBCSCompiler server to find the correct runtime in the extracted SDK. Without this fix, VBCSCompiler's apphost inherits the host environment's DOTNET_ROOT, fails to load the runtime, and each csc invocation wastes 20 seconds on a connection timeout before falling back to in-process. With the fix: build time drops from ~56 min to ~2 min (with partial cache), as the persistent compiler server handles all compilations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0155faa commit 2a3cf1f

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

config.dsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ config({
2121
moduleName: "bxl_rules_repo",
2222
owner: "agocke",
2323
repository: "bxl_rules",
24-
commit: "931bf68ee4383082c9d41a60e285cb09098c2271",
24+
commit: "3ca4b303bfa7f761544dde16e0234761f457c9ce",
2525
},
2626
{
2727
moduleName: "bxl_rules_dotnet_repo",
2828
owner: "agocke",
2929
repository: "bxl_rules_dotnet",
30-
commit: "2a84ec46d7a92984fe58529eb57d2d9bb81a2e9c",
30+
commit: "b2219e5a626a802cfbf21058aa94ac8df711259b",
3131
},
3232
],
3333
},

src/tests/Common/BUILD.dsc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const csharpToolchain = CSharp.csharpToolchainFromContents({
1717
export const testLibrary = CSharp.csharp_library({
1818
name: "TestLibrary",
1919
toolchain: csharpToolchain,
20+
useSharedCompilation: true,
2021
srcs: [
2122
"CoreCLRTestLibrary/AssertExtensions.cs",
2223
"CoreCLRTestLibrary/CoreclrTestWrapperLib.cs",
@@ -52,6 +53,7 @@ export const testLibrary = CSharp.csharp_library({
5253
export const xunitWrapperLibrary = CSharp.csharp_library({
5354
name: "XUnitWrapperLibrary",
5455
toolchain: csharpToolchain,
56+
useSharedCompilation: true,
5557
srcs: [
5658
"XUnitWrapperLibrary/Help.cs",
5759
"XUnitWrapperLibrary/TestFilter.cs",
@@ -70,6 +72,7 @@ export const xunitWrapperLibrary = CSharp.csharp_library({
7072
export const xunitWrapperGenerator = CSharp.csharp_library({
7173
name: "XUnitWrapperGenerator",
7274
toolchain: csharpToolchain,
75+
useSharedCompilation: true,
7376
srcs: [
7477
"XUnitWrapperGenerator/CodeBuilder.cs",
7578
"XUnitWrapperGenerator/Descriptors.cs",

src/tests/coreclr_test/coreclr_test.dsc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ export function coreclr_test(args: CoreClrTestArguments): CoreClrTestResult {
208208
allowUnsafe: args.allowUnsafe !== undefined ? args.allowUnsafe : true,
209209
defines: args.defines,
210210
nowarn: allNowarn,
211+
useSharedCompilation: true,
211212
analyzers: referenceXunitWrapperGenerator ? [Rules.sourceArtifact(Common.xunitWrapperGenerator.binary)] : undefined,
212213
analyzerConfigs: analyzerConfigs,
213214
});

0 commit comments

Comments
 (0)