<http://webkit.org/b/56781> Add --dsym switch to enable dsym generation when building...
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Mar 2011 20:13:46 +0000 (20:13 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Mar 2011 20:13:46 +0000 (20:13 +0000)
Reviewed by Joseph Pecoraro.

* Scripts/build-webkit: Updated usage statement to include
--dsym.
* Scripts/webkitdirs.pm: Added $generateDsym variable.
(generateDsym): Added. Call determineGenerateDsym() and
return $generateDsym.
(determineGenerateDsym): Added.  Parse @ARGV for --dsym and set
$generateDsym.
(argumentsForXcode): Added.  Returns additional arguments for
xcodebuild based on command-line switches.
(XcodeOptions): Updated to include argumentsForXcode() in the
array returned.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81690 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/build-webkit
Tools/Scripts/webkitdirs.pm

index 0d0dcd8..ec89870 100644 (file)
@@ -1,3 +1,21 @@
+2011-03-22  David Kilzer  <ddkilzer@apple.com>
+
+        <http://webkit.org/b/56781> Add --dsym switch to enable dsym generation when building with Xcode
+
+        Reviewed by Joseph Pecoraro.
+
+        * Scripts/build-webkit: Updated usage statement to include
+        --dsym.
+        * Scripts/webkitdirs.pm: Added $generateDsym variable.
+        (generateDsym): Added. Call determineGenerateDsym() and
+        return $generateDsym.
+        (determineGenerateDsym): Added.  Parse @ARGV for --dsym and set
+        $generateDsym.
+        (argumentsForXcode): Added.  Returns additional arguments for
+        xcodebuild based on command-line switches.
+        (XcodeOptions): Updated to include argumentsForXcode() in the
+        array returned.
+
 2011-03-22  Adam Roben  <aroben@apple.com>
 
         Make Leopard Debug bots and Windows XP Debug (Tests) core builders
index f40d50f..7fa79e1 100755 (executable)
@@ -338,6 +338,7 @@ Usage: $programName [options] [options to pass to build system]
   --help                            Show this help message
   --clean                           Cleanup the build directory
   --debug                           Compile in debug mode
+  --dsym                            Change debugging format to dwarf-with-dsym (Mac only)
 
   --chromium                        Build the Chromium port on Mac/Win/Linux
   --efl                             Build the EFL port
index 49463e8..ef7a2f7 100644 (file)
@@ -60,6 +60,7 @@ my $configurationProductDir;
 my $sourceDir;
 my $currentSVNRevision;
 my $osXVersion;
+my $generateDsym;
 my $isQt;
 my $qmakebin = "qmake"; # Allow override of the qmake binary from $PATH
 my $isSymbian;
@@ -389,12 +390,31 @@ sub currentSVNRevision
     return $currentSVNRevision;
 }
 
+sub generateDsym()
+{
+    determineGenerateDsym();
+    return $generateDsym;
+}
+
+sub determineGenerateDsym()
+{
+    return if defined($generateDsym);
+    $generateDsym = checkForArgumentAndRemoveFromARGV("--dsym");
+}
+
+sub argumentsForXcode()
+{
+    my @args = ();
+    push @args, "DEBUG_INFORMATION_FORMAT=dwarf-with-dsym" if generateDsym();
+    return @args;
+}
+
 sub XcodeOptions
 {
     determineBaseProductDir();
     determineConfiguration();
     determineArchitecture();
-    return (@baseProductDirOption, "-configuration", $configuration, "ARCHS=$architecture");
+    return (@baseProductDirOption, "-configuration", $configuration, "ARCHS=$architecture", argumentsForXcode());
 }
 
 sub XcodeOptionString