Modified: branches/dfgFourthTier/Tools/ChangeLog (148560 => 148561)
--- branches/dfgFourthTier/Tools/ChangeLog 2013-04-16 22:58:03 UTC (rev 148560)
+++ branches/dfgFourthTier/Tools/ChangeLog 2013-04-16 22:58:04 UTC (rev 148561)
@@ -1,3 +1,18 @@
+2013-04-15 Filip Pizlo <[email protected]>
+
+ fourthTier: Update LLVM-related build scripts to copy generated headers as well
+ https://bugs.webkit.org/show_bug.cgi?id=114551
+
+ Reviewed by Oliver Hunt.
+
+ Also added the ability to use something other than bzip2 compression, since although
+ it is great for checking things into the tree, it increases turn-around times when
+ experimenting.
+
+ * Scripts/copy-webkitlibraries-to-product-directory:
+ (unpackIfNecessary):
+ * Scripts/export-llvm-build:
+
2013-04-03 Filip Pizlo <[email protected]>
fourthTier: Include LLVM headers with surrounding #pragmas instead of using my #define
Modified: branches/dfgFourthTier/Tools/Scripts/copy-webkitlibraries-to-product-directory (148560 => 148561)
--- branches/dfgFourthTier/Tools/Scripts/copy-webkitlibraries-to-product-directory 2013-04-16 22:58:03 UTC (rev 148560)
+++ branches/dfgFourthTier/Tools/Scripts/copy-webkitlibraries-to-product-directory 2013-04-16 22:58:04 UTC (rev 148561)
@@ -77,9 +77,9 @@
my ($targetDir, $sampleFile, $package, $hasLibraries) = @_;
if (!-e $sampleFile || -M $sampleFile > -M $package) {
print "Unpacking $package into $targetDir\n";
- (system("tar -C $targetDir -xmyf $package") == 0) or die;
+ (system("tar -C $targetDir -xmf $package") == 0) or die;
if ($hasLibraries) {
- foreach my $library (`tar -tyf $package`) {
+ foreach my $library (`tar -tf $package`) {
chomp $library;
print " Ranlib $library\n";
system $ranlib, $targetDir . "/" . $library;
Modified: branches/dfgFourthTier/Tools/Scripts/export-llvm-build (148560 => 148561)
--- branches/dfgFourthTier/Tools/Scripts/export-llvm-build 2013-04-16 22:58:03 UTC (rev 148560)
+++ branches/dfgFourthTier/Tools/Scripts/export-llvm-build 2013-04-16 22:58:04 UTC (rev 148561)
@@ -37,6 +37,7 @@
$libraryPackage = Pathname.new("LLVMLibraries.tar.bz2")
$includePackage = Pathname.new("LLVMIncludes.tar.bz2")
$llvmBuild = "Release+Asserts"
+$compression = "bzip2"
def usage
puts "export-llvm-build <LLVM directory>"
@@ -47,13 +48,17 @@
puts " Default is #{$includePackage}."
puts "--llvm-build (-b) Change which LLVM build to use."
puts " Default is #{$llvmBuild}."
+ puts "--compression Change what compression to do. Can be one of gzip,"
+ puts " bzip2, or none."
+ puts " Default is #{$compression}."
exit 1
end
GetoptLong.new(['--help', '-h', GetoptLong::NO_ARGUMENT],
['--library-package', '-l', GetoptLong::REQUIRED_ARGUMENT],
['--include-package', '-i', GetoptLong::REQUIRED_ARGUMENT],
- ['--llvm-build', '-b', GetoptLong::REQUIRED_ARGUMENT]).each {
+ ['--llvm-build', '-b', GetoptLong::REQUIRED_ARGUMENT],
+ ['--compression', GetoptLong::REQUIRED_ARGUMENT]).each {
| opt, arg |
case opt
when '--help'
@@ -64,6 +69,8 @@
$includePackage = Pathname.new(arg)
when '--llvm-build'
$llvmBuild = arg
+ when '--compression'
+ $compression = arg
else
raise
end
@@ -77,8 +84,21 @@
$currentPath = Pathname.pwd
+def compressionChar
+ case $compression
+ when "gzip"
+ "z"
+ when "bzip2"
+ "y"
+ when "none"
+ ""
+ else
+ raise "Bad choice of compression."
+ end
+end
+
Dir.chdir($llvmPath + $llvmBuild + "lib") {
- mysys("tar", "-cyvf", $currentPath + $libraryPackage, *Dir.entries('.').select{|value| value =~ /\.a$/})
+ mysys("tar", "-c#{compressionChar}vf", $currentPath + $libraryPackage, *Dir.entries('.').select{|value| value =~ /\.a$/})
}
Dir.mktmpdir {
@@ -87,6 +107,16 @@
Dir.chdir($llvmPath) {
mysys("svn", "export", "include", directory + "include")
}
+ ["include/llvm/Config"].each {
+ | genDirName |
+ configSrcPath = $llvmPath + genDirName
+ configDstPath = directory + genDirName
+ Dir.foreach(configSrcPath) {
+ | filename |
+ next unless filename =~ /\.def$/ or filename =~ /\.h$/
+ mysys("cp", configSrcPath + filename, configDstPath + filename)
+ }
+ }
Dir.chdir(directory + "include") {
mysys("tar", "-cyvf", $currentPath + $includePackage, ".")
}