From 30b77d380e2c44233975426e39cb378e5c244555 Mon Sep 17 00:00:00 2001 From: Steve Date: Tue, 1 Oct 2024 21:32:19 +0900 Subject: [PATCH] IL: Fixes include path for Linux (#6922) --- examples/il/default.il | 1 + lib/compilers/dotnet.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/il/default.il b/examples/il/default.il index 255791b7d..2e506e2f2 100644 --- a/examples/il/default.il +++ b/examples/il/default.il @@ -1,4 +1,5 @@ .assembly extern System.Console { } +.assembly extern System.Runtime { } .class private auto ansi beforefieldinit Program extends [System.Runtime]System.Object { diff --git a/lib/compilers/dotnet.ts b/lib/compilers/dotnet.ts index a2f62c063..c1cdca0a9 100644 --- a/lib/compilers/dotnet.ts +++ b/lib/compilers/dotnet.ts @@ -164,7 +164,7 @@ class DotNetCompiler extends BaseCompiler { .ver 1:0:0:0 } .module CompilerExplorer.dll - #include "${path.join(programDir, sourceFile)}" + #include "${sourceFile}" `; const ilFilePath = path.join(programDir, `${AssemblyName}.il`); @@ -265,6 +265,7 @@ class DotNetCompiler extends BaseCompiler { options.push( buildToBinary ? '-exe' : '-dll', path.join(programDir, `${AssemblyName}.il`), + `-include:${programDir}`, `-output:${path.join(programOutputPath, 'CompilerExplorer.dll')}`, ); await fs.mkdirs(programOutputPath);