16 lines
549 B
TypeScript
16 lines
549 B
TypeScript
import cpuBenchTemplate from '../../assets/CPUBenchTemplate.ini';
|
|
|
|
|
|
export interface CPUBenchConfigOptions {
|
|
llvmInstall: string;
|
|
optimize: string[];
|
|
benchmarks: string[];
|
|
}
|
|
|
|
export function renderConfig({ llvmInstall, optimize, benchmarks }: CPUBenchConfigOptions) {
|
|
return `# Rendered from TypeScript ${new Date().toLocaleString()}, do not edit!\n` + cpuBenchTemplate
|
|
.replace('@@LLVM_INSTALL@@', llvmInstall)
|
|
.replace('@@OPTIMIZE@@', optimize.join(' '))
|
|
.replace('@@BENCHMARKS@@', benchmarks.join(','));
|
|
}
|