浏览代码

Fix compilation for x86_64 llvm variant

git-svn-id: trunk@49477 -
pierre 4 年之前
父节点
当前提交
04ebdf8df8
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/llvm/agllvm.pas

+ 3 - 1
compiler/llvm/agllvm.pas

@@ -1601,7 +1601,9 @@ implementation
         if fputypestrllvm[current_settings.fputype]<>'' then
           optstr:=optstr+' -m'+fputypestrllvm[current_settings.fputype];
 
-        if cputypestr[current_settings.cputype]<>'' then
+        { restrict march to aarch64 for now to fix x86_64 compilation failure }
+        if (cputypestr[current_settings.cputype]<>'')
+           and (target_info.system in [system_aarch64_darwin, system_aarch64_linux]) then
           optstr:=optstr+' -march='+cputypestr[current_settings.cputype];
 
         replace(result,'$OPT',optstr);