mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 18:08:15 +02:00
* fixed linker exit code detection in case of useshell
git-svn-id: trunk@5138 -
This commit is contained in:
parent
aab785d0fc
commit
0909d46626
@ -614,22 +614,23 @@ Implementation
|
||||
begin
|
||||
FlushOutput;
|
||||
if useshell then
|
||||
exitcode := shell(maybequoted(command)+' '+para)
|
||||
exitcode:=shell(maybequoted(command)+' '+para)
|
||||
else
|
||||
try
|
||||
if ExecuteProcess(command,para) <> 0
|
||||
then begin
|
||||
try
|
||||
exitcode:=ExecuteProcess(command,para);
|
||||
except on E:EOSError do
|
||||
begin
|
||||
Message(exec_e_cant_call_linker);
|
||||
current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink];
|
||||
DoExec:=false;
|
||||
end;
|
||||
end;
|
||||
if (exitcode<>0) then
|
||||
begin
|
||||
Message(exec_e_error_while_linking);
|
||||
current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink];
|
||||
DoExec:=false;
|
||||
end;
|
||||
except on E:EOSError do
|
||||
begin
|
||||
Message(exec_e_cant_call_linker);
|
||||
current_settings.globalswitches:=current_settings.globalswitches+[cs_link_nolink];
|
||||
DoExec:=false;
|
||||
end;
|
||||
end
|
||||
end;
|
||||
{ Update asmres when externmode is set }
|
||||
if cs_link_nolink in current_settings.globalswitches then
|
||||
|
Loading…
Reference in New Issue
Block a user