diff options
author | pierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-11-20 15:14:14 +0000 |
---|---|---|
committer | pierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-11-20 15:14:14 +0000 |
commit | 0b094cbdb6c51d7ab6c5eb95108eb79038de2c08 (patch) | |
tree | 0139944de10ad68e83d92b0619e34408fece6981 /compiler | |
parent | a2d0b4f1211425d198562b57a5cf195e0d302765 (diff) | |
download | fpc-0b094cbdb6c51d7ab6c5eb95108eb79038de2c08.tar.gz |
In FindObjectFile check the assembly file if cs_assemble_on_target is in globlaswitches
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47489 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/link.pas | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/link.pas b/compiler/link.pas index 7930ddbda4..9d4d45c9bc 100644 --- a/compiler/link.pas +++ b/compiler/link.pas @@ -216,10 +216,11 @@ Implementation exit; {When linking on target, the units has not been assembled yet, + if assembling is also done on target, so there is no object files to look for at the host. Look for the corresponding assembler file instead, because it will be assembled to object file on the target.} - if isunit and (cs_link_on_target in current_settings.globalswitches) then + if isunit and (cs_assemble_on_target in current_settings.globalswitches) then s:=ChangeFileExt(s,target_info.asmext); { when it does not belong to the unit then check if @@ -266,7 +267,7 @@ Implementation Message1(exec_w_objfile_not_found,s); {Restore file extension} - if isunit and (cs_link_on_target in current_settings.globalswitches) then + if isunit and (cs_assemble_on_target in current_settings.globalswitches) then foundfile:= ChangeFileExt(foundfile,target_info.objext); findobjectfile:=ScriptFixFileName(foundfile); |