mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 21:29:26 -06:00
dont execute arm on windows amd64
This commit is contained in:
@@ -123,11 +123,11 @@ export class BinaryInfoLinux {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
static async readFile(filepath: string): Promise<BinaryInfo | undefined> {
|
||||
static async readFile(filepath: string, instructionSetHint?: InstructionSet): Promise<BinaryInfo | undefined> {
|
||||
if (os.platform() === 'win32') {
|
||||
return {
|
||||
os: OSType.windows,
|
||||
instructionSet: 'amd64',
|
||||
instructionSet: instructionSetHint || 'amd64',
|
||||
};
|
||||
}
|
||||
const info = await executeDirect('/usr/bin/file', ['-b', filepath], {});
|
||||
|
||||
@@ -76,7 +76,7 @@ export class RemoteExecutionQuery {
|
||||
const triple = new BaseExecutionTriple();
|
||||
|
||||
if (result.executableFilename) {
|
||||
const info = await BinaryInfoLinux.readFile(result.executableFilename);
|
||||
const info = await BinaryInfoLinux.readFile(result.executableFilename, result.instructionSet);
|
||||
if (info) {
|
||||
triple.instructionSet = info.instructionSet;
|
||||
triple.os = info.os;
|
||||
|
||||
Reference in New Issue
Block a user