瀏覽代碼

* use $DARWINVERSION functionality to pass Darwin/iOS version to clang when
assembling llvm bitcode

git-svn-id: branches/debug_eh@41909 -

Jonas Maebe 6 年之前
父節點
當前提交
810d0ab2fe
共有 1 個文件被更改,包括 2 次插入12 次删除
  1. 2 12
      compiler/llvm/agllvm.pas

+ 2 - 12
compiler/llvm/agllvm.pas

@@ -1571,17 +1571,7 @@ implementation
           optstr:=optstr+' -static'
           optstr:=optstr+' -static'
         else
         else
           optstr:=optstr+' -mdynamic-no-pic';
           optstr:=optstr+' -mdynamic-no-pic';
-        if target_info.system in (systems_darwin-[system_i386_iphonesim,system_arm_darwin,system_aarch64_darwin,system_x86_64_iphonesim]) then
-          begin
-            if MacOSXVersionMin<>'' then
-              optstr:=optstr+' -mmacosx-version-min='+MacOSXVersionMin
-          end
-        else if target_info.system in [system_i386_iphonesim,system_arm_darwin,system_aarch64_darwin,system_x86_64_iphonesim] then
-          begin
-            if iPhoneOSVersionMin<>'' then
-              optstr:=optstr+' -mios-version-min='+iPhoneOSVersionMin;
-          end
-        else
+        if not(target_info.system in systems_darwin) then
           begin
           begin
             optstr:=optstr+' --target='+llvm_target_name;
             optstr:=optstr+' --target='+llvm_target_name;
           end;
           end;
@@ -1614,7 +1604,7 @@ implementation
 
 
           idtxt  : 'LLVM-CLANG';
           idtxt  : 'LLVM-CLANG';
           asmbin : 'clang';
           asmbin : 'clang';
-          asmcmd: '$OPT -c -o $OBJ $ASM';
+          asmcmd: '$OPT $DARWINVERSION -c -o $OBJ $ASM';
           supported_targets : [system_x86_64_linux,system_x86_64_darwin,system_aarch64_linux,system_arm_linux];
           supported_targets : [system_x86_64_linux,system_x86_64_darwin,system_aarch64_linux,system_arm_linux];
           flags : [af_smartlink_sections];
           flags : [af_smartlink_sections];
           labelprefix : 'L';
           labelprefix : 'L';