Use Ninja on Windows.
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jul 2015 00:32:53 +0000 (00:32 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jul 2015 00:32:53 +0000 (00:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=147228

Reviewed by Martin Robinson.

.:

* Source/cmake/OptionsWindows.cmake:
Only use /MP when using generated Visual Studio solution files to build.
It makes compiling parallel in MSVC, but Ninja doesn't like it.

Source/JavaScriptCore:

* CMakeLists.txt:
Set the working directory when generating LowLevelInterpreterWin.asm to put LowLevelInterpreterWin.asm.sym in the right place.

Source/WebKit:

* PlatformWin.cmake:
Added /NODEFAULTLIB:LIBCMT to link WebKit.dll successfully with Ninja.

Source/WebKit/win:

* WebView.h:
Add more #if USE(CA) to protect the CACFLayer code.

Tools:

* WinLauncher/CMakeLists.txt:
WinLauncherLib must make WinLauncher.dll, not WinLauncherLib.dll.
* Scripts/build-webkit:
Use Ninja to build WinCairo by default, but fall back to Visual Studio if Ninja is not on the system.

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

ChangeLog
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/WebKit/ChangeLog
Source/WebKit/PlatformWin.cmake
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.h
Source/cmake/OptionsWindows.cmake
Tools/ChangeLog
Tools/Scripts/build-webkit
Tools/WinLauncher/CMakeLists.txt

index fbf018f..e22c357 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2015-07-27  Alex Christensen  <achristensen@webkit.org>
 
+        Use Ninja on Windows.
+        https://bugs.webkit.org/show_bug.cgi?id=147228
+
+        Reviewed by Martin Robinson.
+
+        * Source/cmake/OptionsWindows.cmake:
+        Only use /MP when using generated Visual Studio solution files to build.
+        It makes compiling parallel in MSVC, but Ninja doesn't like it.
+
+2015-07-27  Alex Christensen  <achristensen@webkit.org>
+
         Progress towards building AppleWin with CMake
         https://bugs.webkit.org/show_bug.cgi?id=147325
 
index 519fcaf..9770918 100644 (file)
@@ -750,6 +750,7 @@ add_custom_command(
     DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb -I${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
     COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
+    WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
     VERBATIM)
 
 # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of
index a2c0710..b5c33c0 100644 (file)
@@ -1,3 +1,13 @@
+2015-07-27  Alex Christensen  <achristensen@webkit.org>
+
+        Use Ninja on Windows.
+        https://bugs.webkit.org/show_bug.cgi?id=147228
+
+        Reviewed by Martin Robinson.
+
+        * CMakeLists.txt:
+        Set the working directory when generating LowLevelInterpreterWin.asm to put LowLevelInterpreterWin.asm.sym in the right place.
+
 2015-07-27  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         SparseValueMap check is skipped when the butterfly's vectorLength is larger than the access-requested index
index 035babf..def2695 100644 (file)
@@ -1,5 +1,15 @@
 2015-07-27  Alex Christensen  <achristensen@webkit.org>
 
+        Use Ninja on Windows.
+        https://bugs.webkit.org/show_bug.cgi?id=147228
+
+        Reviewed by Martin Robinson.
+
+        * PlatformWin.cmake:
+        Added /NODEFAULTLIB:LIBCMT to link WebKit.dll successfully with Ninja.
+
+2015-07-27  Alex Christensen  <achristensen@webkit.org>
+
         Progress towards building AppleWin with CMake
         https://bugs.webkit.org/show_bug.cgi?id=147325
 
index d35389e..8108498 100644 (file)
@@ -406,6 +406,8 @@ string(REPLACE " " "\;" CXX_LIBS ${CMAKE_CXX_STANDARD_LIBRARIES})
 list(APPEND WebKit_LIBRARIES ${CXX_LIBS})
 set(CMAKE_CXX_STANDARD_LIBRARIES "")
 
+set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "/NODEFAULTLIB:LIBCMT")
+
 # If this directory isn't created before midl runs and attempts to output WebKit.tlb,
 # It fails with an unusual error - midl failed - failed to save all changes
 file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
index 52ae609..fcebc34 100644 (file)
@@ -1,5 +1,15 @@
 2015-07-27  Alex Christensen  <achristensen@webkit.org>
 
+        Use Ninja on Windows.
+        https://bugs.webkit.org/show_bug.cgi?id=147228
+
+        Reviewed by Martin Robinson.
+
+        * WebView.h:
+        Add more #if USE(CA) to protect the CACFLayer code.
+
+2015-07-27  Alex Christensen  <achristensen@webkit.org>
+
         Progress towards building AppleWin with CMake
         https://bugs.webkit.org/show_bug.cgi?id=147325
 
index 6b79fce..0911fec 100644 (file)
@@ -31,7 +31,6 @@
 #include "WebKit.h"
 #include "WebFrame.h"
 #include "WebPreferences.h"
-#include <WebCore/CACFLayerTreeHostClient.h>
 #include <WebCore/COMPtr.h>
 #include <WebCore/DragActions.h>
 #include <WebCore/GraphicsLayer.h>
 #include <wtf/HashSet.h>
 #include <wtf/RefPtr.h>
 
+#if USE(CA)
+#include <WebCore/CACFLayerTreeHostClient.h>
+#endif
+
 #if ENABLE(FULLSCREEN_API)
 #include <WebCore/FullScreenControllerClient.h>
 #endif
@@ -89,7 +92,9 @@ class WebView
     , public IDropTarget
     , WebCore::WindowMessageListener
     , WebCore::GraphicsLayerClient
+#if USE(CA)
     , WebCore::CACFLayerTreeHostClient
+#endif
 #if ENABLE(FULLSCREEN_API)
     , WebCore::FullScreenControllerClient
 #endif
index 69ba250..c179e0c 100644 (file)
@@ -23,8 +23,10 @@ if (MSVC)
         /wd4018 /wd4068 /wd4099 /wd4100 /wd4127 /wd4138 /wd4146 /wd4180 /wd4189 /wd4201 /wd4244 /wd4251 /wd4267 /wd4275 /wd4288
         /wd4291 /wd4305 /wd4309 /wd4344 /wd4355 /wd4389 /wd4396 /wd4481 /wd4503 /wd4505 /wd4510 /wd4512 /wd4530 /wd4610 /wd4702
         /wd4706 /wd4800 /wd4819 /wd4951 /wd4952 /wd4996 /wd6011 /wd6031 /wd6211 /wd6246 /wd6255 /wd6387
-        /MP
     )
+    if (NOT ${CMAKE_GENERATOR} MATCHES "Ninja")
+        add_definitions(/MP)
+    endif ()
     if (NOT ${CMAKE_CXX_FLAGS} STREQUAL "")
         string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable C++ exceptions
         string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
index 25d08e6..6297b04 100644 (file)
@@ -1,3 +1,15 @@
+2015-07-27  Alex Christensen  <achristensen@webkit.org>
+
+        Use Ninja on Windows.
+        https://bugs.webkit.org/show_bug.cgi?id=147228
+
+        Reviewed by Martin Robinson.
+
+        * WinLauncher/CMakeLists.txt:
+        WinLauncherLib must make WinLauncher.dll, not WinLauncherLib.dll.
+        * Scripts/build-webkit:
+        Use Ninja to build WinCairo by default, but fall back to Visual Studio if Ninja is not on the system.
+
 2015-07-24  Jon Honeycutt  <jhoneycutt@apple.com>
 
         Test for bug #147164 "[iOS] Keyboard bold/italic/underline keys don't
index 6d63359..208b12f 100755 (executable)
@@ -260,8 +260,15 @@ for my $dir (@projects) {
     } elsif (isAppleWinWebKit() || isWinCairo()) {
         chdirWebKit();
         if (isWinCairo()) {
-            generateBuildSystemFromCMakeProject("WinCairo");
-            $result = buildVisualStudioProject("WebKitBuild/" . configuration() . "/WebKit.sln", $clean);
+            if (exitStatus(generateBuildSystemFromCMakeProject("WinCairo"))) {
+                die "Run \"C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/vcvarsall.bat\" before build-webkit when using ninja";
+            }
+            if (canUseNinja()) {
+                chdir "WebKitBuild/" . configuration();
+                $result = system("ninja");
+            } else {
+                $result = buildVisualStudioProject("WebKitBuild/" . configuration() . "/WebKit.sln", $clean);
+            }
         } else {
             my $webkitSolutionPath = "Source/WebKit/WebKit.vcxproj/WebKit.sln";
             $result = buildVisualStudioProject($webkitSolutionPath, $clean);
index 212dc45..c5e0407 100644 (file)
@@ -46,6 +46,7 @@ include_directories(${WinLauncher_INCLUDE_DIRECTORIES})
 add_library(WinLauncherLib SHARED ${WinLauncher_SOURCES})
 target_link_libraries(WinLauncherLib ${WinLauncher_LIBRARIES})
 set_target_properties(WinLauncherLib PROPERTIES FOLDER "Tools")
+set_target_properties(WinLauncherLib PROPERTIES OUTPUT_NAME "WinLauncher")
 
 add_executable(WinLauncher WIN32 ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp WinLauncher.vcxproj/WinLauncher.rc)
 target_link_libraries(WinLauncher shlwapi)