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

Method runCompiler

lib/base-compiler.ts:589–610  ·  view source on GitHub ↗
(
        compiler: string,
        options: string[],
        inputFilename: string,
        execOptions: ExecutionOptionsWithEnv,
        filters?: ParseFiltersAndOutputOptions,
    )

Source from the content-addressed store, hash-verified

587 }
588
589 async runCompiler(
590 compiler: string,
591 options: string[],
592 inputFilename: string,
593 execOptions: ExecutionOptionsWithEnv,
594 filters?: ParseFiltersAndOutputOptions,
595 ): Promise<CompilationResult> {
596 if (!execOptions) {
597 execOptions = this.getDefaultExecOptions();
598 }
599
600 if (!execOptions.customCwd) {
601 execOptions.customCwd = path.dirname(inputFilename);
602 }
603
604 const result = await this.exec(compiler, options, execOptions);
605 return {
606 ...this.transformToCompilationResult(result, inputFilename),
607 languageId: this.getCompilerResultLanguageId(filters),
608 instructionSet: this.getInstructionSetFromCompilerArgs(options),
609 };
610 }
611
612 async runCompilerRawOutput(
613 compiler: string,

Callers 7

generateASTMethod · 0.95
generateIRMethod · 0.95
generateClangirMethod · 0.95
generateOptPipelineMethod · 0.95
buildExecutableMethod · 0.95
doCompilationMethod · 0.95

Calls 5

getDefaultExecOptionsMethod · 0.95
execMethod · 0.95

Tested by

no test coverage detected