Files
compiler-explorer/lib/compilers/c3c.ts
Ofek 9ef46fbafe Binge of (mostly) mindless tsification (#6838)
Turned on `noImplicitAny` in tsconfig, then went around fixing some
random easy stuff.
Hopefully tsification-PRs with more real content coming up.
2024-09-07 14:36:43 +03:00

27 lines
948 B
TypeScript

import path from 'path';
import type {PreliminaryCompilerInfo} from '../../types/compiler.interfaces.js';
import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces.js';
import {BaseCompiler} from '../base-compiler.js';
import {CompilationEnvironment} from '../compilation-env.js';
export class C3Compiler extends BaseCompiler {
static get key() {
return 'c3c';
}
constructor(info: PreliminaryCompilerInfo, env: CompilationEnvironment) {
super(info, env);
this.compiler.supportsIrView = true;
this.compiler.irArg = ['--emit-llvm'];
}
override optionsForFilter(filters: ParseFiltersAndOutputOptions, outputFilename: string) {
return ['compile-only', '-g', '-l', 'pthread', '--no-obj', '--emit-asm'];
}
override getIrOutputFilename(inputFilename: string): string {
return this.filename(path.dirname(inputFilename) + '/output.ll');
}
}