Просмотр исходного кода

* some ansistring fixes for calling ar, but not yet complete
(cmdlines > 255 chars are still cut off)

git-svn-id: trunk@5325 -

Jonas Maebe 19 лет назад
Родитель
Сommit
636cb3beef
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      compiler/link.pas

+ 2 - 3
compiler/link.pas

@@ -656,7 +656,7 @@ Implementation
 
     Function TExternalLinker.MakeStaticLibrary:boolean;
 
-        function GetNextFiles(const maxCmdLength : AInt; var item : TStringListItem) : string;
+        function GetNextFiles(const maxCmdLength : AInt; var item : TStringListItem) : ansistring;
           begin
             result := '';
             while (assigned(item) and ((length(result) + length(item.str) + 1) < maxCmdLength)) do begin
@@ -710,12 +710,11 @@ Implementation
             Replace(cmdstr,'$LIB',maybequoted(current_module.staticlibfilename^));
             { create AR commands }
             success := true;
-            nextcmd := cmdstr;
             current := TStringListItem(SmartLinkOFiles.First);
             repeat
+              nextcmd := cmdstr;
               Replace(nextcmd,'$FILES',GetNextFiles(240 - length(nextcmd) + 6 - length(binstr) - 1, current));
               success:=DoExec(binstr,nextcmd,false,true);
-              nextcmd := cmdstr;
             until (not assigned(current)) or (not success);
           end;