[92249] trunk/dports/devel/ld64/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Sun Apr 22 14:47:36 PDT 2012


Revision: 92249
          https://trac.macports.org/changeset/92249
Author:   jeremyhu at macports.org
Date:     2012-04-22 14:47:33 -0700 (Sun, 22 Apr 2012)
Log Message:
-----------
ld64: Support the +llvm variants on Tiger, but it can't be the default variant due to a possible dependency cycle.

Modified Paths:
--------------
    trunk/dports/devel/ld64/Portfile

Modified: trunk/dports/devel/ld64/Portfile
===================================================================
--- trunk/dports/devel/ld64/Portfile	2012-04-22 21:04:15 UTC (rev 92248)
+++ trunk/dports/devel/ld64/Portfile	2012-04-22 21:47:33 UTC (rev 92249)
@@ -31,6 +31,10 @@
 
 patchfiles              ld64-pbxproj.patch ld64-version.patch
 
+# We don't set llvmXX as the default variant on Tiger because it would introduce a
+# dependency cycle as llvm requires apple-gcc42 and ld64 to build correctly.  Users
+# wanting LTO support in ld64 on Tiger can install the +llvm variant after llvm
+# has been installed.
 if {![variant_isset llvm29] && ![variant_isset llvm30] && ![variant_isset llvm31] && ${os.major} >= 9} {
     default_variants +llvm30
 
@@ -83,18 +87,16 @@
 }
 
 platform darwin 8 {
-    if {[variant_isset llvm29] || [variant_isset llvm30] || [variant_isset llvm31]} {
-        ui_error "Your platform does not yet support LTO in ld64.  Please disable the llvmXX variant, and try again."
-        return -code error "Your platform does not yet support LTO in ld64.  Please disable the llvmXX variant, and try again."
+    pre-fetch {
+        if {[variant_isset llvm29] || [variant_isset llvm30] || [variant_isset llvm31]} {
+            if {![file exists ${prefix}/bin/llvm-config-mp-${llvm_version}]} {
+                ui_error "You must first install ld64 without llvm support to build llvm.  After llvm is installed, you can reinstall ld64 with the llvm variant."
+                return -code error "You must first install ld64 without llvm support to build llvm.  After llvm is installed, you can reinstall ld64 with the llvm variant."
+            }
+        }
     }
-
-    # No LTO Support until we work around a bootstrapping issue since XCode
-    # won't use the right compiler which results in ld_classic being used to
-    # link, and that spits out warnings... fun times.
-    depends_lib-delete  port:llvm-${llvm_version}
 }
 
-
 xcode.target            all ObjectDump machocheck
 xcode.destroot.path     ${prefix}/bin
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120422/b0c85bc6/attachment.html>


More information about the macports-changes mailing list