MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / buildToDll

Method buildToDll

lib/compilers/dotnet.ts:178–250  ·  view source on GitHub ↗
(
        dotnetPath: string,
        compilerInfo: DotNetCompilerInfo,
        inputFilename: string,
        execOptions: ExecutionOptionsWithEnv,
        compilerOptions: string[],
        buildToBinary?: boolean,
    )

Source from the content-addressed store, hash-verified

176 }
177
178 async buildToDll(
179 dotnetPath: string,
180 compilerInfo: DotNetCompilerInfo,
181 inputFilename: string,
182 execOptions: ExecutionOptionsWithEnv,
183 compilerOptions: string[],
184 buildToBinary?: boolean,
185 ): Promise<CompilationResult> {
186 const programDir = path.dirname(inputFilename);
187 const programOutputPath = path.join(programDir, 'bin', this.buildConfig, compilerInfo.targetFramework);
188 await fs.mkdir(programOutputPath, {recursive: true});
189 const outputFilename = path.join(programOutputPath, 'CompilerExplorer.dll');
190 this.setCompilerExecOptions(execOptions, programDir);
191 let compilerResult: CompilationResult;
192
193 switch (this.lang.id) {
194 case 'csharp': {
195 compilerResult = await this.runCsc(
196 dotnetPath,
197 compilerInfo,
198 inputFilename,
199 outputFilename,
200 execOptions,
201 compilerOptions,
202 buildToBinary,
203 );
204 break;
205 }
206 case 'vb': {
207 compilerResult = await this.runVbc(
208 dotnetPath,
209 compilerInfo,
210 inputFilename,
211 outputFilename,
212 execOptions,
213 compilerOptions,
214 buildToBinary,
215 );
216 break;
217 }
218 case 'fsharp': {
219 compilerResult = await this.runFsc(
220 dotnetPath,
221 compilerInfo,
222 inputFilename,
223 outputFilename,
224 execOptions,
225 compilerOptions,
226 buildToBinary,
227 );
228 break;
229 }
230 case 'il': {
231 compilerResult = await this.runIlAsm(
232 compilerInfo.compilerPath,
233 inputFilename,
234 outputFilename,
235 execOptions,

Callers 2

buildExecutableMethod · 0.95
runCompilerMethod · 0.95

Calls 6

runCscMethod · 0.95
runVbcMethod · 0.95
runFscMethod · 0.95
runIlAsmMethod · 0.95
getOutputFilenameMethod · 0.65

Tested by

no test coverage detected