<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[163193] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/163193">163193</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2014-01-31 13:26:26 -0800 (Fri, 31 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Allow more flexibility for copy-webkitlibraries-to-product-directory
https://bugs.webkit.org/show_bug.cgi?id=128010

Reviewed by Oliver Hunt.
        
It's now the case that copy-webkitlibraries-to-product-directory does nothing by
default, but you can tell it to either copy WebKitSystemInterface (--wksi) or LLVM
(--llvm). You can also tell it where to get LLVM from.

* Scripts/build-jsc:
* Scripts/build-webkit:
* Scripts/copy-webkitlibraries-to-product-directory:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptsbuildjsc">trunk/Tools/Scripts/build-jsc</a></li>
<li><a href="#trunkToolsScriptsbuildwebkit">trunk/Tools/Scripts/build-webkit</a></li>
<li><a href="#trunkToolsScriptscopywebkitlibrariestoproductdirectory">trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (163192 => 163193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-01-31 21:17:47 UTC (rev 163192)
+++ trunk/Tools/ChangeLog        2014-01-31 21:26:26 UTC (rev 163193)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-01-31  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        Allow more flexibility for copy-webkitlibraries-to-product-directory
+        https://bugs.webkit.org/show_bug.cgi?id=128010
+
+        Reviewed by Oliver Hunt.
+        
+        It's now the case that copy-webkitlibraries-to-product-directory does nothing by
+        default, but you can tell it to either copy WebKitSystemInterface (--wksi) or LLVM
+        (--llvm). You can also tell it where to get LLVM from.
+
+        * Scripts/build-jsc:
+        * Scripts/build-webkit:
+        * Scripts/copy-webkitlibraries-to-product-directory:
+
</ins><span class="cx"> 2014-01-31  David Farler  &lt;dfarler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         DumpRenderTree iOS fails to link: missing rowHeaders and columnHeaders in AccessibilityUIElement
</span></span></pre></div>
<a id="trunkToolsScriptsbuildjsc"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/build-jsc (163192 => 163193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/build-jsc        2014-01-31 21:17:47 UTC (rev 163192)
+++ trunk/Tools/Scripts/build-jsc        2014-01-31 21:26:26 UTC (rev 163193)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> my $ftlJIT = 0;
</span><span class="cx"> my $forceCLoop = 0;
</span><span class="cx"> my $makeArgs = &quot;&quot;;
</span><ins>+my $copyLibraries = 1;
</ins><span class="cx"> 
</span><span class="cx"> my $programName = basename($0);
</span><span class="cx"> my $usage = &lt;&lt;EOF;
</span><span class="lines">@@ -47,6 +48,7 @@
</span><span class="cx">   --help                        Show this help message
</span><span class="cx">   --[no-]coverage               Toggle code coverage support (default: $coverageSupport)
</span><span class="cx">   --[no-]ftl-jit                Toggle FTL JIT support (default: $ftlJIT)
</span><ins>+  --[no-]copy-libraries         Toggle whether to copy libraries (default: $copyLibraries)
</ins><span class="cx">   --cloop                       Use C Loop interpreter (default: $forceCLoop)
</span><span class="cx">   --makeargs=&lt;arguments&gt;        Optional Makefile flags
</span><span class="cx"> EOF
</span><span class="lines">@@ -89,12 +91,14 @@
</span><span class="cx">     if ($forceCLoop) {
</span><span class="cx">         push @options, &quot;ENABLE_LLINT_C_LOOP=ENABLE_LLINT_C_LOOP&quot;;
</span><span class="cx">     }
</span><del>-    my @copyLibrariesArgs = (&quot;perl&quot;, &quot;Tools/Scripts/copy-webkitlibraries-to-product-directory&quot;);
-    if ($ftlJIT) {
-        push @copyLibrariesArgs, &quot;--ftl-jit&quot;;
</del><ins>+    if ($copyLibraries) {
+        my @copyLibrariesArgs = (&quot;perl&quot;, &quot;Tools/Scripts/copy-webkitlibraries-to-product-directory&quot;);
+        if ($ftlJIT) {
+            push @copyLibrariesArgs, &quot;--llvm&quot;;
+        }
+        push @copyLibrariesArgs, productDir();
+        (system(@copyLibrariesArgs) == 0) or die;
</ins><span class="cx">     }
</span><del>-    push @copyLibrariesArgs, productDir();
-    (system(@copyLibrariesArgs) == 0) or die;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub buildMyProject
</span></span></pre></div>
<a id="trunkToolsScriptsbuildwebkit"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/build-webkit (163192 => 163193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/build-webkit        2014-01-31 21:17:47 UTC (rev 163192)
+++ trunk/Tools/Scripts/build-webkit        2014-01-31 21:26:26 UTC (rev 163193)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> #!/usr/bin/perl -w
</span><span class="cx"> 
</span><del>-# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
</del><ins>+# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> # Copyright (C) 2009 Google Inc. All rights reserved.
</span><span class="cx"> # Copyright (C) 2010 moiji-mobile.com All rights reserved.
</span><span class="cx"> # Copyright (C) 2011 Research In Motion Limited. All rights reserved.
</span><span class="lines">@@ -216,11 +216,12 @@
</span><span class="cx">         unshift @projects, (&quot;Source/WebInspectorUI&quot;);
</span><span class="cx"> 
</span><span class="cx">         # Copy library and header from WebKitLibraries to a findable place in the product directory.
</span><del>-        my @copyLibrariesArgs = (&quot;perl&quot;, &quot;Tools/Scripts/copy-webkitlibraries-to-product-directory&quot;);
</del><ins>+        my @copyLibrariesArgs = (&quot;perl&quot;, &quot;Tools/Scripts/copy-webkitlibraries-to-product-directory&quot;, &quot;--wksi&quot;);
</ins><span class="cx">         if ($hasFTLJIT) {
</span><del>-            push @copyLibrariesArgs, &quot;--ftl-jit&quot;;
</del><ins>+            push @copyLibrariesArgs, &quot;--llvm&quot;;
</ins><span class="cx">         }
</span><span class="cx">         push @copyLibrariesArgs, productDir();
</span><ins>+        print(join(&quot; &quot;, @copyLibrariesArgs) . &quot;\n&quot;);
</ins><span class="cx">         (system(@copyLibrariesArgs) == 0) or die;
</span><span class="cx">     } else {
</span><span class="cx">         push @projects, (&quot;Source/WebKit2&quot;) if !$noWebKit2;
</span></span></pre></div>
<a id="trunkToolsScriptscopywebkitlibrariestoproductdirectory"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory (163192 => 163193)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory        2014-01-31 21:17:47 UTC (rev 163192)
+++ trunk/Tools/Scripts/copy-webkitlibraries-to-product-directory        2014-01-31 21:26:26 UTC (rev 163193)
</span><span class="lines">@@ -30,18 +30,27 @@
</span><span class="cx"> use webkitdirs;
</span><span class="cx"> 
</span><span class="cx"> my $showHelp = 0;
</span><del>-my $ftlJIT = 0;
</del><ins>+my $llvm = 0;
+my $wksi = 0;
+my $llvmIncludePackage = &quot;&quot;;
+my $llvmLibraryPackage = &quot;&quot;;
</ins><span class="cx"> 
</span><span class="cx"> my $programName = basename($0);
</span><span class="cx"> my $usage = &lt;&lt;EOF;
</span><span class="cx"> Usage: $programName [options]
</span><span class="cx">   --help                        Show this help message
</span><del>-  --[no-]ftl-jit                Toggle FTL JIT support (default: $ftlJIT)
</del><ins>+  --[no-]llvm                   Toggle copying LLVM drops (default: $llvm)
+  --[no-]wksi                   Toggle copying WebKitSystemInterface drops (default: $wksi)
+  --use-llvm-includes=&lt;path&gt;    Get the LLVM inludes package from &lt;path&gt;
+  --use-llvm-libraries=&lt;path&gt;   Get the LLVM libraries package from &lt;path&gt;
</ins><span class="cx"> EOF
</span><span class="cx"> 
</span><span class="cx"> GetOptions(
</span><span class="cx">     'help' =&gt; \$showHelp,
</span><del>-    'ftl-jit!' =&gt; \$ftlJIT,
</del><ins>+    'llvm!' =&gt; \$llvm,
+    'wksi!' =&gt; \$wksi,
+    'use-llvm-includes=s' =&gt; \$llvmIncludePackage,
+    'use-llvm-libraries=s' =&gt; \$llvmLibraryPackage,
</ins><span class="cx"> );
</span><span class="cx"> 
</span><span class="cx"> if ($showHelp) {
</span><span class="lines">@@ -54,26 +63,9 @@
</span><span class="cx"> 
</span><span class="cx"> chdirWebKit();
</span><span class="cx"> 
</span><del>-my @librariesToCopy = (
-    &quot;libWebKitSystemInterfaceLion.a&quot;,
-    &quot;libWebKitSystemInterfaceMountainLion.a&quot;,
-    &quot;libWebKitSystemInterfaceMavericks.a&quot;,
-);
-
</del><span class="cx"> my $ranlib = `xcrun -find ranlib`;
</span><span class="cx"> chomp $ranlib;
</span><del>-foreach my $libName (@librariesToCopy) {
-    my $srcLib = &quot;WebKitLibraries/&quot; . $libName;
-    my $lib = &quot;$productDir/&quot; . $libName;
-    if (!-e $lib || -M $lib &gt; -M $srcLib) {
-        print &quot;Updating $lib\n&quot;;
-        (system(&quot;ditto&quot;, $srcLib, $lib) == 0) or die;
-        (system($ranlib, $lib) == 0) or die;
-    }
-}
</del><span class="cx"> 
</span><del>-(system(&quot;mkdir&quot;, &quot;-p&quot;, &quot;$productDir/usr/local/include&quot;) == 0) or die;
-
</del><span class="cx"> sub unpackIfNecessary
</span><span class="cx"> {
</span><span class="cx">     my ($targetDir, $sampleFile, $package, $hasLibraries) = @_;
</span><span class="lines">@@ -101,38 +93,64 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-dittoHeaders(&quot;WebKitLibraries/WebKitSystemInterface.h&quot;, &quot;$productDir/usr/local/include/WebKitSystemInterface.h&quot;);
</del><ins>+if ($llvm || $wksi) {
+    (system(&quot;mkdir&quot;, &quot;-p&quot;, &quot;$productDir/usr/local/include&quot;) == 0) or die;
+}
</ins><span class="cx"> 
</span><del>-if ($ftlJIT) {
</del><ins>+if ($wksi) {
+    my @librariesToCopy = (
+        &quot;libWebKitSystemInterfaceLion.a&quot;,
+        &quot;libWebKitSystemInterfaceMountainLion.a&quot;,
+        &quot;libWebKitSystemInterfaceMavericks.a&quot;,
+    );
+    
+    foreach my $libName (@librariesToCopy) {
+        my $srcLib = &quot;WebKitLibraries/&quot; . $libName;
+        my $lib = &quot;$productDir/&quot; . $libName;
+        if (!-e $lib || -M $lib &gt; -M $srcLib) {
+            print &quot;Updating $lib\n&quot;;
+            (system(&quot;ditto&quot;, $srcLib, $lib) == 0) or die;
+            (system($ranlib, $lib) == 0) or die;
+        }
+    }
+    
+    dittoHeaders(&quot;WebKitLibraries/WebKitSystemInterface.h&quot;, &quot;$productDir/usr/local/include/WebKitSystemInterface.h&quot;);
+}
+
+if ($llvm) {
</ins><span class="cx">     # Determine where to get LLVM binaries and headers.
</span><span class="cx">     my $majorDarwinVersion = (split /\./, `uname -r`)[0];
</span><del>-    my $llvmLibraryPackage;
-    my $llvmIncludePackage;
</del><span class="cx">     my $useOwnLLVM = 0;
</span><span class="cx">     my $ownLLVMDirectory;
</span><del>-    if (defined($ENV{LLVM_SOURCE_PATH})) {
-        $useOwnLLVM = 1;
-        $ownLLVMDirectory = $ENV{LLVM_SOURCE_PATH};
-    } elsif (-d &quot;llvm&quot; &amp;&amp; -e &quot;llvm/LLVMBuild.txt&quot;) {
-        $useOwnLLVM = 1;
-        $ownLLVMDirectory = sourceDir() . &quot;/llvm&quot;;
-    } elsif (defined($ENV{LLVM_LIBRARY_PACKAGE}) &amp;&amp; defined($ENV{LLVM_INCLUDE_PACKAGE})) {
-        $llvmLibraryPackage = $ENV{LLVM_LIBRARY_PACKAGE};
-        $llvmIncludePackage = $ENV{LLVM_INCLUDE_PACKAGE};
-    } elsif ($majorDarwinVersion == 11) {
-        $llvmLibraryPackage = &quot;WebKitLibraries/LLVMLibrariesLion.tar.bz2&quot;;
-        $llvmIncludePackage = &quot;WebKitLibraries/LLVMIncludesLion.tar.bz2&quot;;
-    } elsif ($majorDarwinVersion == 12) {
-        $llvmLibraryPackage = &quot;WebKitLibraries/LLVMLibrariesMountainLion.tar.bz2&quot;;
-        $llvmIncludePackage = &quot;WebKitLibraries/LLVMIncludesMountainLion.tar.bz2&quot;;
-    } else {
-        print &quot;Don't know where to find LLVM!\n&quot;;
-        print &quot;\n&quot;;
-        print &quot;Try defining LLVM_LIBRARY_PACKAGE and LLVM_INCLUDE_PACKAGE.\n&quot;;
-        print &quot;\n&quot;;
-        print &quot;Alternatively, you can check out llvm trunk into the WebKit directory:\n&quot;;
-        print &quot;svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm\n&quot;;
-        exit 1;
</del><ins>+    if ($llvmLibraryPackage eq &quot;&quot; &amp;&amp; $llvmIncludePackage eq &quot;&quot;) {
+        if (defined($ENV{LLVM_SOURCE_PATH})) {
+            $useOwnLLVM = 1;
+            $ownLLVMDirectory = $ENV{LLVM_SOURCE_PATH};
+        } elsif (-d &quot;llvm&quot; &amp;&amp; -e &quot;llvm/LLVMBuild.txt&quot;) {
+            $useOwnLLVM = 1;
+            $ownLLVMDirectory = sourceDir() . &quot;/llvm&quot;;
+        } elsif (defined($ENV{LLVM_LIBRARY_PACKAGE}) &amp;&amp; defined($ENV{LLVM_INCLUDE_PACKAGE})) {
+            $llvmLibraryPackage = $ENV{LLVM_LIBRARY_PACKAGE};
+            $llvmIncludePackage = $ENV{LLVM_INCLUDE_PACKAGE};
+        } elsif ($majorDarwinVersion == 11) {
+            $llvmLibraryPackage = &quot;WebKitLibraries/LLVMLibrariesLion.tar.bz2&quot;;
+            $llvmIncludePackage = &quot;WebKitLibraries/LLVMIncludesLion.tar.bz2&quot;;
+        } elsif ($majorDarwinVersion == 12) {
+            $llvmLibraryPackage = &quot;WebKitLibraries/LLVMLibrariesMountainLion.tar.bz2&quot;;
+            $llvmIncludePackage = &quot;WebKitLibraries/LLVMIncludesMountainLion.tar.bz2&quot;;
+        } elsif ($majorDarwinVersion == 13) {
+            $llvmLibraryPackage = &quot;WebKitLibraries/LLVMLibrariesMavericks.tar.bz2&quot;;
+            $llvmIncludePackage = &quot;WebKitLibraries/LLVMIncludesMavericks.tar.bz2&quot;;
+        } else {
+            print &quot;Don't know where to find LLVM!\n&quot;;
+            print &quot;\n&quot;;
+            print &quot;Try defining LLVM_LIBRARY_PACKAGE and LLVM_INCLUDE_PACKAGE or setting the\n&quot;;
+            print &quot;--use-llvm-includes and --use-llvm-libraries options.\n&quot;;
+            print &quot;\n&quot;;
+            print &quot;Alternatively, you can check out llvm trunk into the WebKit directory:\n&quot;;
+            print &quot;svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm\n&quot;;
+            exit 1;
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     sub fileContains
</span><span class="lines">@@ -226,6 +244,5 @@
</span><span class="cx">         print {$fileHandle} &quot;/* This file fools WebKit's build system into relinking JavaScriptCore if the LLVM libraries changed. */\n&quot;;
</span><span class="cx">         close $fileHandle;
</span><span class="cx">     }
</span><del>-
</del><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>