Title: [179136] trunk/Tools
Revision
179136
Author
[email protected]
Date
2015-01-26 12:56:02 -0800 (Mon, 26 Jan 2015)

Log Message

copy-webkitlibraries-to-product-directory's hack to build LLVM from source should be hardened for Xcode deciding it needs SDKROOT set
https://bugs.webkit.org/show_bug.cgi?id=140896

Reviewed by Michael Saboff.
        
I've encountered some Xcode setups where you need to set SDKROOT to get llvm to build. This
makes our script do this.
        
Note that an alternative would be to run clang via "xcrun clang" rather than directly, but
this would be harder given llvm's autoconf setup.

* Scripts/copy-webkitlibraries-to-product-directory:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (179135 => 179136)


--- trunk/Tools/ChangeLog	2015-01-26 20:51:59 UTC (rev 179135)
+++ trunk/Tools/ChangeLog	2015-01-26 20:56:02 UTC (rev 179136)
@@ -1,3 +1,18 @@
+2015-01-26  Filip Pizlo  <[email protected]>
+
+        copy-webkitlibraries-to-product-directory's hack to build LLVM from source should be hardened for Xcode deciding it needs SDKROOT set
+        https://bugs.webkit.org/show_bug.cgi?id=140896
+
+        Reviewed by Michael Saboff.
+        
+        I've encountered some Xcode setups where you need to set SDKROOT to get llvm to build. This
+        makes our script do this.
+        
+        Note that an alternative would be to run clang via "xcrun clang" rather than directly, but
+        this would be harder given llvm's autoconf setup.
+
+        * Scripts/copy-webkitlibraries-to-product-directory:
+
 2015-01-26  Alexey Proskuryakov  <[email protected]>
 
         Update bot assignments.

Modified: trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory (179135 => 179136)


--- trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory	2015-01-26 20:51:59 UTC (rev 179135)
+++ trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory	2015-01-26 20:56:02 UTC (rev 179136)
@@ -240,11 +240,20 @@
     my $shouldUpdateLLVMLibraryToken = 0;
 
     if ($useOwnLLVM) {
+        my $sdkArg;
+        if (xcodeSDK()) {
+            $sdkArg = "--sdk " . xcodeSDK();
+        } else {
+            $sdkArg = "";
+        }
+        my $sdkRoot = `xcrun $sdkArg --show-sdk-path`;
+        chomp $sdkRoot;
+    
         if (!-e "$ownLLVMDirectory/wkLLVMBuild/Makefile.config") {
             print("Configuring LLVM.\n");
             (system("mkdir -p $ownLLVMDirectory/wkLLVMBuild"));
             my $flags = "--enable-optimized=yes --enable-backtraces=no --enable-targets=x86_64 --enable-libcpp=yes --enable-zlib=no --enable-terminfo=no --enable-crash-overrides=no";
-            (system("(cd $ownLLVMDirectory/wkLLVMBuild && ../configure $flags)") == 0) or die;
+            (system("(cd $ownLLVMDirectory/wkLLVMBuild && SDKROOT=$sdkRoot ../configure $flags)") == 0) or die;
         }
 
         print("Building LLVM.\n");
@@ -257,7 +266,7 @@
             print "Detected binaries directory; prepending to path: $binariesPath\n";
             $pathCommand = "PATH=\\\$PWD/$binariesDirectory:\\\$PATH";
         }
-        my $makeCommand = "env -i bash -l -c \"$pathCommand make -j `sysctl -n hw.activecpu`\"";
+        my $makeCommand = "env -i bash -l -c \"$pathCommand SDKROOT=$sdkRoot make -j `sysctl -n hw.activecpu`\"";
         print $makeCommand . "\n";
         (system($makeCommand) == 0) or die;
         $ENV{"PATH"} = $oldPath;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to