under win64 delete the default `-m64` if `-m32` is on the shebang line

This commit is contained in:
Basile Burg 2019-02-02 14:18:27 +01:00
parent 9c6d30f2ea
commit d14afe5e1d
1 changed files with 10 additions and 0 deletions

View File

@ -3118,6 +3118,16 @@ begin
dmdproc.Parameters.AddStrings(fRunnablesOptions.staticSwitches); dmdproc.Parameters.AddStrings(fRunnablesOptions.staticSwitches);
if lst.isNotNil and (lst.Count <> 0) then if lst.isNotNil and (lst.Count <> 0) then
dmdproc.Parameters.AddStrings(lst); dmdproc.Parameters.AddStrings(lst);
{$ifdef WINDOWS}
{$ifdef CPUX86_64}
if lst.isNotNil and (lst.IndexOf('-m32') <> -1) then
begin
i := dmdproc.Parameters.IndexOf('-m64');
if i <> -1 then
dmdproc.Parameters.Delete(i);
end;
{$endif}
{$endif}
if fRunnablesOptions.detectMain then if fRunnablesOptions.detectMain then
begin begin
hasMain := fDoc.implementMain; hasMain := fDoc.implementMain;