bin/runcpu: support --simd / --no-simd options
This commit is contained in:
@@ -62,12 +62,18 @@ const argv = await yargs(hideBin(process.argv))
|
||||
choices: ['nobuild', 'rebuild'],
|
||||
default: 'rebuild',
|
||||
})
|
||||
.option('simd', {
|
||||
type: 'boolean',
|
||||
description: 'Use -msimd when compiling benchmarks',
|
||||
demandOption: true,
|
||||
})
|
||||
.help()
|
||||
.parse();
|
||||
|
||||
const sunwayGeneration = argv.platform === "host" ? sunway.getHostGeneration() : argv.platform as sunway.SunwayGeneration;
|
||||
const sysroot = sunwayGeneration == "6b" ? "/usr/sw/standard-830-6b-test/" : "/usr/sw/swgcc1030_native_tools-8a";
|
||||
|
||||
console.log("simd: " + chalk.red(argv.simd));
|
||||
console.log("sunway generation: " + chalk.red(sunwayGeneration));
|
||||
console.log(`using sysroot: ${chalk.red(sysroot)}`);
|
||||
|
||||
@@ -121,7 +127,7 @@ const specConfig = renderConfig({
|
||||
gccdir: llvmPrefix,
|
||||
optimize: [
|
||||
...optimizeOptions({ optimize: '2' }),
|
||||
...sw64TargetOptions({ simd: true }),
|
||||
...sw64TargetOptions({ simd: argv.simd }),
|
||||
sunway.mcpu(sunwayGeneration),
|
||||
],
|
||||
ldflags: [
|
||||
|
||||
Reference in New Issue
Block a user