Skip to content

Commit

Permalink
Disable diffable asm for dotnet 8.0+ by default (#5739)
Browse files Browse the repository at this point in the history
Since .NET 8.0, the JIT disasm no longer prints encoded bytes of
instructions by default, so we can disable diffable asm by default.
  • Loading branch information
hez2010 committed Nov 14, 2023
1 parent 058dc15 commit 6b94b29
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/compilers/dotnet.ts
Expand Up @@ -326,7 +326,6 @@ class DotNetCompiler extends BaseCompiler {
const normalizedName = name.trim().toUpperCase();
if (
normalizedName === 'DOTNET_JITDISASM' ||
normalizedName === 'DOTNET_JITDUMP' ||
normalizedName === 'DOTNET_JITDISASMASSEMBILES'
) {
continue;
Expand Down Expand Up @@ -366,10 +365,10 @@ class DotNetCompiler extends BaseCompiler {
}

if (!overrideDiffable) {
toolOptions.push('--codegenopt', this.sdkMajorVersion < 8 ? 'JitDiffableDasm=1' : 'JitDisasmDiffable=1');
envVarFileContents.push(
this.sdkMajorVersion < 8 ? 'DOTNET_JitDiffableDasm=1' : 'DOTNET_JitDisasmDiffable=1',
);
if (this.sdkMajorVersion < 8) {
toolOptions.push('--codegenopt', 'JitDiffableDasm=1');
envVarFileContents.push('DOTNET_JitDiffableDasm=1');
}
}

this.setCompilerExecOptions(execOptions, programDir);
Expand Down

0 comments on commit 6b94b29

Please sign in to comment.