cpubench: add ldflags config
This commit is contained in:
@@ -91,7 +91,7 @@ CXXFLAGS = ${OPTIMIZE}
|
|||||||
CLD = # Example: ${CC}
|
CLD = # Example: ${CC}
|
||||||
CXXLD = # Example: ${CXX}
|
CXXLD = # Example: ${CXX}
|
||||||
FLD = # Example: ${FC}
|
FLD = # Example: ${FC}
|
||||||
LD_FLAGS =
|
LD_FLAGS = @@LDFLAGS@@
|
||||||
|
|
||||||
#=============================LIBS Flags==============================
|
#=============================LIBS Flags==============================
|
||||||
LIBS = # Example: -lpthread
|
LIBS = # Example: -lpthread
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ export interface CPUBenchConfigOptions {
|
|||||||
llvmInstall: string;
|
llvmInstall: string;
|
||||||
optimize: string[];
|
optimize: string[];
|
||||||
benchmarks: 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
|
return `# Rendered from TypeScript ${new Date().toLocaleString()}, do not edit!\n` + cpuBenchTemplate
|
||||||
.replace('@@LLVM_INSTALL@@', llvmInstall)
|
.replace('@@LLVM_INSTALL@@', llvmInstall)
|
||||||
.replace('@@OPTIMIZE@@', optimize.join(' '))
|
.replace('@@OPTIMIZE@@', optimize.join(' '))
|
||||||
|
.replace('@@LDFLAGS@@', ldflags.join(' '))
|
||||||
.replace('@@BENCHMARKS@@', benchmarks.join(','));
|
.replace('@@BENCHMARKS@@', benchmarks.join(','));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user