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'],
|
choices: ['nobuild', 'rebuild'],
|
||||||
default: 'rebuild',
|
default: 'rebuild',
|
||||||
})
|
})
|
||||||
|
.option('simd', {
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'Use -msimd when compiling benchmarks',
|
||||||
|
demandOption: true,
|
||||||
|
})
|
||||||
.help()
|
.help()
|
||||||
.parse();
|
.parse();
|
||||||
|
|
||||||
const sunwayGeneration = argv.platform === "host" ? sunway.getHostGeneration() : argv.platform as sunway.SunwayGeneration;
|
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";
|
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("sunway generation: " + chalk.red(sunwayGeneration));
|
||||||
console.log(`using sysroot: ${chalk.red(sysroot)}`);
|
console.log(`using sysroot: ${chalk.red(sysroot)}`);
|
||||||
|
|
||||||
@@ -121,7 +127,7 @@ const specConfig = renderConfig({
|
|||||||
gccdir: llvmPrefix,
|
gccdir: llvmPrefix,
|
||||||
optimize: [
|
optimize: [
|
||||||
...optimizeOptions({ optimize: '2' }),
|
...optimizeOptions({ optimize: '2' }),
|
||||||
...sw64TargetOptions({ simd: true }),
|
...sw64TargetOptions({ simd: argv.simd }),
|
||||||
sunway.mcpu(sunwayGeneration),
|
sunway.mcpu(sunwayGeneration),
|
||||||
],
|
],
|
||||||
ldflags: [
|
ldflags: [
|
||||||
|
|||||||
Reference in New Issue
Block a user