@@ -174,6 +174,8 @@ export class DMD extends Compiler {
174
174
All of the formats /except/ dmd-master come with a signature file.
175
175
*/
176
176
static async initialize ( versionString : string , token : string ) : Promise < DMD > {
177
+ if ( process . arch != 'x64' )
178
+ throw new Error ( `dmd can only be used on x86_64, not on '${ process . arch } '` )
177
179
if ( versionString == 'dmd-master' ) {
178
180
return await DMD . initializeFromMaster ( token )
179
181
}
@@ -520,7 +522,7 @@ export class LDC extends Compiler {
520
522
case "x64" : arch = "x86_64" ; break ;
521
523
case "arm" : arch = "armhf" ; break ; // supported on old LDC releases
522
524
case "arm64" : arch = "aarch64" ; break ;
523
- default : throw new Error ( `Unknown architecture ${ arch } for ldc on linux` )
525
+ default : throw new Error ( `Unknown architecture ${ process . arch } for ldc on linux` )
524
526
}
525
527
return `linux-${ arch } .tar.xz`
526
528
case "darwin" :
@@ -530,7 +532,7 @@ export class LDC extends Compiler {
530
532
case "x64" : arch = "x86_64" ; break ;
531
533
case "arm" :
532
534
case "arm64" : arch = "arm64" ; break ;
533
- default : throw new Error ( `Unknown architecture ${ arch } for ldc on osx` )
535
+ default : throw new Error ( `Unknown architecture ${ process . arch } for ldc on osx` )
534
536
}
535
537
arch = legacyOsx ? arch : 'universal'
536
538
return `osx-${ arch } .tar.xz`
@@ -755,7 +757,7 @@ export class GDC implements ITool {
755
757
756
758
let match = versionString . match ( / ^ g d c ( - \d + ) ? $ / )
757
759
if ( match === null )
758
- throw new Error ( `Unrecognized gdc format '${ versionString } ` )
760
+ throw new Error ( `Unrecognized gdc format '${ versionString } ' ` )
759
761
760
762
return new GDC ( versionString )
761
763
}
0 commit comments