Sfoglia il codice sorgente

* it makes no sense to search the windows dirs for dlls when cross compiling

git-svn-id: trunk@17687 -
florian 14 anni fa
parent
commit
81bd7867b3
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      compiler/link.pas

+ 3 - 1
compiler/link.pas

@@ -249,7 +249,9 @@ Implementation
         Found:=FindFile(s,'.'+source_info.DirSep,false,founddll);
         if (not found) then
          Found:=librarysearchpath.FindFile(s,false,founddll);
-        if (not found) then
+
+        { when cross compiling, it is pretty useless to search windir etc. for dlls }
+        if (not found) and (source_info.system=target_info.system) then
          begin
            sysdir:=FixPath(GetEnvironmentVariable('windir'),false);
            Found:=FindFile(s,sysdir+';'+sysdir+'system'+source_info.DirSep+';'+sysdir+'system32'+source_info.DirSep,false,founddll);