cpubench: allow extra optimization flags
This commit is contained in:
@@ -20,6 +20,7 @@ export interface RunCPUBenchOptions {
|
||||
platform: sunway.SunwayGeneration | "host";
|
||||
allowMisaligned?: boolean;
|
||||
action?: string;
|
||||
extraOptimize?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -27,6 +28,7 @@ export interface RunCPUBenchOptions {
|
||||
* @param options 运行CPUBench所需的配置选项(可选)
|
||||
*/
|
||||
export async function runCPUBench(options: RunCPUBenchOptions): Promise<void> {
|
||||
console.log(`Running CPUBench with options: ${JSON.stringify(options)}`);
|
||||
const defaults: Partial<RunCPUBenchOptions> = {
|
||||
uuid: true,
|
||||
platform: 'host',
|
||||
@@ -55,7 +57,11 @@ export async function runCPUBench(options: RunCPUBenchOptions): Promise<void> {
|
||||
]
|
||||
};
|
||||
|
||||
const optimizeFlags = optimizeProfiles[config.optimizeProfile];
|
||||
let optimizeFlags = optimizeProfiles[config.optimizeProfile];
|
||||
|
||||
if (options.extraOptimize) {
|
||||
optimizeFlags.push(...options.extraOptimize);
|
||||
}
|
||||
|
||||
const sunwayGeneration = config.platform === "host"
|
||||
? sunway.getHostGeneration()
|
||||
|
||||
Reference in New Issue
Block a user