Browse Source

In FindObjectFile check the assembly file if cs_assemble_on_target is in globlaswitches

git-svn-id: trunk@47489 -
pierre 4 years ago
parent
commit
152208c0be
1 changed files with 3 additions and 2 deletions
  1. 3 2
      compiler/link.pas

+ 3 - 2
compiler/link.pas

@@ -216,10 +216,11 @@ Implementation
          exit;
          exit;
 
 
         {When linking on target, the units has not been assembled yet,
         {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
          so there is no object files to look for at
          the host. Look for the corresponding assembler file instead,
          the host. Look for the corresponding assembler file instead,
          because it will be assembled to object file on the target.}
          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);
           s:=ChangeFileExt(s,target_info.asmext);
 
 
         { when it does not belong to the unit then check if
         { when it does not belong to the unit then check if
@@ -266,7 +267,7 @@ Implementation
          Message1(exec_w_objfile_not_found,s);
          Message1(exec_w_objfile_not_found,s);
 
 
         {Restore file extension}
         {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);
           foundfile:= ChangeFileExt(foundfile,target_info.objext);
 
 
         findobjectfile:=ScriptFixFileName(foundfile);
         findobjectfile:=ScriptFixFileName(foundfile);