cpubench: don't need to specify --sysroot on 8A (draft version)
This commit is contained in:
@@ -74,25 +74,24 @@ perf_timeout = 60 # Set the collection timeout.
|
||||
#=====================================================================
|
||||
[default]
|
||||
clang_dir = @@LLVM_INSTALL@@
|
||||
SYSROOT = @@SYSROOT@@
|
||||
LD_LIBRARY_PATH = ${clang_dir}/lib
|
||||
|
||||
#==========================Compiler for C=============================
|
||||
CC = ${clang_dir}/bin/clang
|
||||
CC_VERSION = -v
|
||||
OPTIMIZE = @@OPTIMIZE@@
|
||||
CFLAGS = ${OPTIMIZE} --sysroot=${SYSROOT} # Example: -g
|
||||
CFLAGS = ${OPTIMIZE}
|
||||
|
||||
#==========================Compiler for C++===========================
|
||||
CXX = ${clang_dir}/bin/clang++
|
||||
CXX_VERSION = -v
|
||||
CXXFLAGS = ${OPTIMIZE} --sysroot=${SYSROOT} # Example: -fno-strict-aliasing -fgnu89-inline
|
||||
CXXFLAGS = ${OPTIMIZE}
|
||||
|
||||
#=============================LD Flags================================
|
||||
CLD = # Example: ${CC}
|
||||
CXXLD = # Example: ${CXX}
|
||||
FLD = # Example: ${FC}
|
||||
LD_FLAGS = --sysroot=${SYSROOT} -L ${clang_dir}/lib -Wl,-rpath,${clang_dir}/lib -Wl,-rpath,${SYSROOT}/lib -Wl,-rpath-link,${clang_dir}/lib -Wl,-rpath-link,${SYSROOT}/lib -Wl,-dynamic-linker,${SYSROOT}/lib/ld-linux.so.2
|
||||
LD_FLAGS =
|
||||
|
||||
#=============================LIBS Flags==============================
|
||||
LIBS = # Example: -lpthread
|
||||
@@ -102,7 +101,7 @@ RANLIB = ranlib
|
||||
#=========================Compiler for fortran========================
|
||||
FC = ${clang_dir}/bin/flang
|
||||
FC_VERSION = -v
|
||||
FFLAGS = ${OPTIMIZE} --sysroot=${SYSROOT}
|
||||
FFLAGS = ${OPTIMIZE}
|
||||
|
||||
#=============================JAVA Option=============================
|
||||
java_options = # Example: -XX:ParallelGCThreads=1
|
||||
|
||||
@@ -39,11 +39,6 @@ const argv = await yargs(hideBin(process.argv))
|
||||
description: 'List of benchmarks to run',
|
||||
demandOption: true,
|
||||
})
|
||||
.option('sysroot', {
|
||||
type: 'string', // 数组类型参数
|
||||
description: '--sysroot setting',
|
||||
demandOption: true,
|
||||
})
|
||||
.parse();
|
||||
|
||||
|
||||
@@ -56,7 +51,6 @@ const cpubenchConfig = cpubench.renderConfig({
|
||||
...sw64TargetOptions({ simd: argv.simd }),
|
||||
...optimizeOptions({ optimize: argv.optimize as OptimizeOptions["optimize"] })
|
||||
],
|
||||
sysroot: argv.sysroot,
|
||||
benchmarks: argv.benchmarks as cpubench.CPUBenchConfigOptions["benchmarks"],
|
||||
});
|
||||
|
||||
|
||||
@@ -4,14 +4,12 @@ import cpuBenchTemplate from '../../assets/CPUBenchTemplate.ini';
|
||||
export interface CPUBenchConfigOptions {
|
||||
llvmInstall: string;
|
||||
optimize: string[];
|
||||
sysroot: string;
|
||||
benchmarks: string[];
|
||||
}
|
||||
|
||||
export function renderConfig({ llvmInstall, optimize, sysroot, benchmarks }: CPUBenchConfigOptions) {
|
||||
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('@@SYSROOT@@', sysroot)
|
||||
.replace('@@BENCHMARKS@@', benchmarks.join(','));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user