Title: [190698] trunk/Tools
Revision
190698
Author
[email protected]
Date
2015-10-07 17:35:57 -0700 (Wed, 07 Oct 2015)

Log Message

[Win] Support 64-bit Build and Testing
https://bugs.webkit.org/show_bug.cgi?id=149904

Reviewed by Daniel Bates.

Extend our existing scripts to support 64-bit build and test operations on
Windows.

* Scripts/build-dumprendertree: We don't need to build DRT on its own;
Windows always builds the whole stack.
* Scripts/webkit-build-directory: Add an option to return the location of
the executable files produced by a specific configuration. This change is
actually useful for Gtk and EFL, too.
* Scripts/webkitdirs.pm:
(executableProductDir): Added. This function appends the proper binary
path to the productDir. This is useful for Windows, Gtk, and EFL ports.
(jscProductDir): Use the new 'executableProductDir' method.
(setPathForRunningWebKitApp): Ditto.
(runSafari): Ditto.
(runMiniBrowser): Ditto.
* Scripts/webkitpy/port/factory.py:
(configuration_options): Add a 64-bit option, used on Windows to specify
which binary target should be used for testing.
* Scripts/webkitpy/port/win.py:
(WinPort._port_flag_for_scripts): Added. Supply the 64-bit flag to child
processes when needed.
(WinPort._build_path): Add the correct binary target path to _build_path.
(WinPort._ntsd_location): Check 32-bit paths when running 32-bit tests,
64-bit paths for 64-bit tests.
(WinPort.setup_crash_log_saving): Remove '-e %ld' argument, since the
NTSD debugger does not understand this argument.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (190697 => 190698)


--- trunk/Tools/ChangeLog	2015-10-08 00:33:55 UTC (rev 190697)
+++ trunk/Tools/ChangeLog	2015-10-08 00:35:57 UTC (rev 190698)
@@ -1,3 +1,37 @@
+2015-10-07  Brent Fulgham  <[email protected]>
+
+        [Win] Support 64-bit Build and Testing
+        https://bugs.webkit.org/show_bug.cgi?id=149904
+
+        Reviewed by Daniel Bates.
+
+        Extend our existing scripts to support 64-bit build and test operations on
+        Windows.
+
+        * Scripts/build-dumprendertree: We don't need to build DRT on its own;
+        Windows always builds the whole stack.
+        * Scripts/webkit-build-directory: Add an option to return the location of
+        the executable files produced by a specific configuration. This change is
+        actually useful for Gtk and EFL, too.
+        * Scripts/webkitdirs.pm:
+        (executableProductDir): Added. This function appends the proper binary
+        path to the productDir. This is useful for Windows, Gtk, and EFL ports.
+        (jscProductDir): Use the new 'executableProductDir' method.
+        (setPathForRunningWebKitApp): Ditto.
+        (runSafari): Ditto.
+        (runMiniBrowser): Ditto.
+        * Scripts/webkitpy/port/factory.py:
+        (configuration_options): Add a 64-bit option, used on Windows to specify
+        which binary target should be used for testing.
+        * Scripts/webkitpy/port/win.py:
+        (WinPort._port_flag_for_scripts): Added. Supply the 64-bit flag to child
+        processes when needed.
+        (WinPort._build_path): Add the correct binary target path to _build_path.
+        (WinPort._ntsd_location): Check 32-bit paths when running 32-bit tests,
+        64-bit paths for 64-bit tests.
+        (WinPort.setup_crash_log_saving): Remove '-e %ld' argument, since the
+        NTSD debugger does not understand this argument.
+
 2015-10-07  Myles C. Maxfield  <[email protected]>
 
         Test font-variant-* and font-feature-settings with TrueType fonts

Modified: trunk/Tools/Scripts/build-dumprendertree (190697 => 190698)


--- trunk/Tools/Scripts/build-dumprendertree	2015-10-08 00:33:55 UTC (rev 190697)
+++ trunk/Tools/Scripts/build-dumprendertree	2015-10-08 00:35:57 UTC (rev 190698)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
+# Copyright (C) 2005-2009, 2013, 2015 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -61,17 +61,14 @@
 chdirWebKit();
 
 # Build
-chdir "Tools/DumpRenderTree" or die;
+chdir File::Spec->catdir("Tools", "DumpRenderTree") or die;
 
 my $result;
 if (isAppleMacWebKit()) {
     my @target = isIOSWebKit() ? ("-target", "DumpRenderTree.app") : ();
     $result = buildXCodeProject("DumpRenderTree", $clean, XcodeOptions(), (@ARGV, @target));
-} elsif (isAppleWinWebKit()) {
-    my $drtSolutionPath = "DumpRenderTree.vcxproj/DumpRenderTree.sln";
-    $result = buildVisualStudioProject($drtSolutionPath, $clean);
-} elsif (isGtk() || isEfl()) {
-    # Gtk and EFL build everything in one shot. No need to build anything here.
+} elsif (isGtk() || isEfl() || isAnyWindows()) {
+    # Gtk, EFL, and Windows build everything in one shot. No need to build anything here.
     $result = 0;
 } else {
     die "Building not defined for this platform!\n";

Modified: trunk/Tools/Scripts/webkit-build-directory (190697 => 190698)


--- trunk/Tools/Scripts/webkit-build-directory	2015-10-08 00:33:55 UTC (rev 190697)
+++ trunk/Tools/Scripts/webkit-build-directory	2015-10-08 00:35:57 UTC (rev 190698)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 # Copyright (C) 2010 Google Inc. All rights reserved.
-# Copyright (C) 2013 Apple Inc. All rights reserved.
+# Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -36,6 +36,7 @@
 use webkitdirs;
 
 my $showConfigurationDirectory = 0;
+my $showExecutablePath = 0;
 my $showHelp = 0;
 my $showTopLevelDirectory = 0;
 
@@ -44,6 +45,7 @@
 my $usage = <<EOF;
 Usage: $programName [options]
   --configuration       Show the build directory for a specific configuration (e.g. Debug, Release.  Defaults to the active configuration set by set-webkit-configuration)
+  --executablePath      Show the path to the executables produced by a specific build configuration. This differs from --configuration on Windows.
   -h|--help             Show this help message
   --top-level           Show the top-level build directory
 
@@ -60,6 +62,7 @@
 Getopt::Long::Configure('pass_through'); # Let --blackberry, etc... be handled by webkitdirs
 my $getOptionsResult = GetOptions(
     'configuration' => \$showConfigurationDirectory,
+    'executablePath' => \$showExecutablePath,
     'top-level' => \$showTopLevelDirectory,
     'help|h' => \$showHelp,
 );
@@ -69,11 +72,13 @@
     exit 1;
 }
 
-if (!$showConfigurationDirectory && !$showTopLevelDirectory) {
+if (!$showConfigurationDirectory && !$showTopLevelDirectory && !$showExecutablePath) {
     print baseProductDir() . "\n";
     print productDir() . "\n";
 } elsif ($showTopLevelDirectory) {
     print baseProductDir() . "\n";
+} elsif ($showExecutablePath) {
+    print executableProductDir() . "\n";
 } else {
     print productDir() . "\n";
 }

Modified: trunk/Tools/Scripts/webkitdirs.pm (190697 => 190698)


--- trunk/Tools/Scripts/webkitdirs.pm	2015-10-08 00:33:55 UTC (rev 190697)
+++ trunk/Tools/Scripts/webkitdirs.pm	2015-10-08 00:35:57 UTC (rev 190698)
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2007, 2010-2014 Apple Inc. All rights reserved.
+# Copyright (C) 2005-2007, 2010-2015 Apple Inc. All rights reserved.
 # Copyright (C) 2009 Google Inc. All rights reserved.
 # Copyright (C) 2011 Research In Motion Limited. All rights reserved.
 # Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
@@ -65,6 +65,7 @@
        &cmakeBasedPortName
        &currentSVNRevision
        &debugSafari
+       &executableProductDir
        &findOrCreateSimulatorForIOSDevice
        &iosSimulatorDeviceByName
        &nmPath
@@ -614,18 +615,27 @@
     return $configurationProductDir;
 }
 
-sub jscProductDir
+sub executableProductDir
 {
-    my $productDir = productDir();
-    $productDir .= "/bin" if (isEfl() || isGtk());
-    if (isAnyWindows()) {
-        my $binDir = isWin64() ? "bin64" : "bin32";
-        $productDir = File::Spec->catdir($productDir, $binDir);
+    my $productDirectory = productDir();
+
+    my $binaryDirectory;
+    if (isEfl() || isGtk()) {
+        $binaryDirectory = "bin";
+    } elsif (isAnyWindows()) {
+        $binaryDirectory = isWin64() ? "bin64" : "bin32";
+    } else {
+        return $productDirectory;
     }
 
-    return $productDir;
+    return File::Spec->catdir($productDirectory, $binaryDirectory);
 }
 
+sub jscProductDir
+{
+    return executableProductDir();
+}
+
 sub configuration()
 {
     determineConfiguration();
@@ -2032,8 +2042,7 @@
     my ($env) = @_;
 
     if (isAnyWindows()) {
-        my $binDir = isWin64() ? "bin64" : "bin32";
-        my $productBinaryDir = File::Spec->catdir(productDir(), $binDir);
+        my $productBinaryDir = executableProductDir();
         if (isAppleWinWebKit()) {
             $env->{PATH} = join(':', $productBinaryDir, appleApplicationSupportPath(), $env->{PATH} || "");
         } elsif (isWinCairo()) {
@@ -2440,9 +2449,7 @@
 
     if (isAppleWinWebKit()) {
         my $result;
-        my $productDir = productDir();
-        my $binDir = isWin64() ? "bin64" : "bin32";
-        my $webKitLauncherPath = File::Spec->catfile(productDir(), $binDir, "MiniBrowser.exe");
+        my $webKitLauncherPath = File::Spec->catfile(executableProductDir(), "MiniBrowser.exe");
         return system { $webKitLauncherPath } $webKitLauncherPath, @ARGV;
     }
 
@@ -2455,9 +2462,7 @@
         return runMacWebKitApp(File::Spec->catfile(productDir(), "MiniBrowser.app", "Contents", "MacOS", "MiniBrowser"));
     } elsif (isAppleWinWebKit()) {
         my $result;
-        my $productDir = productDir();
-        my $binDir = isWin64() ? "bin64" : "bin32";
-        my $webKitLauncherPath = File::Spec->catfile(productDir(), $binDir, "MiniBrowser.exe");
+        my $webKitLauncherPath = File::Spec->catfile(executableProductDir(), "MiniBrowser.exe");
         return system { $webKitLauncherPath } $webKitLauncherPath, @ARGV;
     }
 

Modified: trunk/Tools/Scripts/webkitpy/port/factory.py (190697 => 190698)


--- trunk/Tools/Scripts/webkitpy/port/factory.py	2015-10-08 00:33:55 UTC (rev 190697)
+++ trunk/Tools/Scripts/webkitpy/port/factory.py	2015-10-08 00:35:57 UTC (rev 190698)
@@ -63,6 +63,8 @@
             help='Set the configuration to Debug'),
         optparse.make_option('--release', action='', const='Release', dest="configuration",
             help='Set the configuration to Release'),
+        optparse.make_option('--64-bit', action='', const='x86_64', default=None, dest="architecture",
+            help='use 64-bit binaries by default (x86_64 instead of x86)'),
         optparse.make_option('--32-bit', action='', const='x86', default=None, dest="architecture",
             help='use 32-bit binaries by default (x86 instead of x86_64)'),
         ]

Modified: trunk/Tools/Scripts/webkitpy/port/win.py (190697 => 190698)


--- trunk/Tools/Scripts/webkitpy/port/win.py	2015-10-08 00:33:55 UTC (rev 190697)
+++ trunk/Tools/Scripts/webkitpy/port/win.py	2015-10-08 00:35:57 UTC (rev 190698)
@@ -101,6 +101,11 @@
     def default_child_processes(self):
         return 1
 
+    def _port_flag_for_scripts(self):
+        if self.get_option('architecture') == 'x86_64':
+            return '--64-bit'
+        return None
+
     def show_results_html_file(self, results_filename):
         self._run_script('run-safari', [abspath_to_uri(SystemHost().platform, results_filename)])
 
@@ -123,7 +128,10 @@
         root_directory = self.get_option('root')
         if not root_directory:
             ApplePort._build_path(self, *comps)
-            root_directory = self._filesystem.join(self.get_option('root'), "bin32")
+            binary_directory = 'bin32'
+            if self.get_option('architecture') == 'x86_64':
+                binary_directory = 'bin64'
+            root_directory = self._filesystem.join(self.get_option('root'), binary_directory)
             self.set_option('root', root_directory)
 
         return self._filesystem.join(self._filesystem.abspath(root_directory), *comps)
@@ -155,12 +163,16 @@
     def _ntsd_location(self):
         if 'PROGRAMFILES' not in os.environ:
             return None
-        possible_paths = [self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "8.1", "Debuggers", "x86", "ntsd.exe"),
-            self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "8.1", "Debuggers", "x64", "ntsd.exe"),
-            self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "8.0", "Debuggers", "x86", "ntsd.exe"),
-            self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "8.0", "Debuggers", "x64", "ntsd.exe"),
-            self._filesystem.join(os.environ['PROGRAMFILES'], "Debugging Tools for Windows (x86)", "ntsd.exe"),
-            self._filesystem.join(os.environ['SYSTEMROOT'], "system32", "ntsd.exe")]
+        if self.get_option('architecture') == 'x86_64':
+            possible_paths = [self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "10", "Debuggers", "x64", "ntsd.exe"),
+                self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "8.1", "Debuggers", "x64", "ntsd.exe"),
+                self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "8.0", "Debuggers", "x64", "ntsd.exe")]
+        else:
+            possible_paths = [self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "10", "Debuggers", "x86", "ntsd.exe"),
+                self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "8.1", "Debuggers", "x86", "ntsd.exe"),
+                self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "8.0", "Debuggers", "x86", "ntsd.exe"),
+                self._filesystem.join(os.environ['PROGRAMFILES'], "Debugging Tools for Windows (x86)", "ntsd.exe")]
+        possible_paths.append(self._filesystem.join(os.environ['SYSTEMROOT'], "system32", "ntsd.exe"))
         if 'ProgramW6432' in os.environ:
             possible_paths.append(self._filesystem.join(os.environ['ProgramW6432'], "Debugging Tools for Windows (x64)", "ntsd.exe"))
         for path in possible_paths:
@@ -233,7 +245,7 @@
         command_file = self.create_debugger_command_file()
         if not command_file:
             return None
-        debugger_options = '"{0}" -p %ld -e %ld -g -noio -lines -cf "{1}"'.format(cygpath(ntsd_path), cygpath(command_file))
+        debugger_options = '"{0}" -p %ld -g -noio -lines -cf "{1}"'.format(cygpath(ntsd_path), cygpath(command_file))
         registry_settings = {'Debugger': debugger_options, 'Auto': "1"}
         for key in registry_settings:
             for arch in ["--wow32", "--wow64"]:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to