cpubench: add ldflags config

This commit is contained in:
2025-05-23 22:16:47 +08:00
parent 345398b8a5
commit 4aa53ef9c7
2 changed files with 4 additions and 2 deletions

View File

@@ -5,11 +5,13 @@ export interface CPUBenchConfigOptions {
llvmInstall: string;
optimize: string[];
benchmarks: string[];
ldflags: string[];
}
export function renderConfig({ llvmInstall, optimize, benchmarks }: CPUBenchConfigOptions) {
export function renderConfig({ llvmInstall, optimize, benchmarks, ldflags }: CPUBenchConfigOptions) {
return `# Rendered from TypeScript ${new Date().toLocaleString()}, do not edit!\n` + cpuBenchTemplate
.replace('@@LLVM_INSTALL@@', llvmInstall)
.replace('@@OPTIMIZE@@', optimize.join(' '))
.replace('@@LDFLAGS@@', ldflags.join(' '))
.replace('@@BENCHMARKS@@', benchmarks.join(','));
}