Title: [257441] releases/WebKitGTK/webkit-2.28
Revision
257441
Author
[email protected]
Date
2020-02-26 02:56:52 -0800 (Wed, 26 Feb 2020)

Log Message

Merge r257067 - [GTK][WPE] Not set ccache compiler prefix if ccache its already the compiler binary in path.
https://bugs.webkit.org/show_bug.cgi?id=208007

Reviewed by Tim Horton.

Detect if the compiler binary already points to the ccache binary and in that case don't
set the ccache compiler prefix. Also export CCACHE_SLOPPINESS=time_macros if its not
defined to other thing on the environment and add a some logging of related messages.

* Source/cmake/WebKitCCache.cmake:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.28/ChangeLog (257440 => 257441)


--- releases/WebKitGTK/webkit-2.28/ChangeLog	2020-02-26 10:56:48 UTC (rev 257440)
+++ releases/WebKitGTK/webkit-2.28/ChangeLog	2020-02-26 10:56:52 UTC (rev 257441)
@@ -1,3 +1,16 @@
+2020-02-20  Carlos Alberto Lopez Perez  <[email protected]>
+
+        [GTK][WPE] Not set ccache compiler prefix if ccache its already the compiler binary in path.
+        https://bugs.webkit.org/show_bug.cgi?id=208007
+
+        Reviewed by Tim Horton.
+
+        Detect if the compiler binary already points to the ccache binary and in that case don't
+        set the ccache compiler prefix. Also export CCACHE_SLOPPINESS=time_macros if its not
+        defined to other thing on the environment and add a some logging of related messages.
+
+        * Source/cmake/WebKitCCache.cmake:
+
 2020-02-19  Philippe Normand  <[email protected]>
 
         [GTK][WPE] Set ccache as compiler launcher, add opt-in sccache support

Modified: releases/WebKitGTK/webkit-2.28/Source/cmake/WebKitCCache.cmake (257440 => 257441)


--- releases/WebKitGTK/webkit-2.28/Source/cmake/WebKitCCache.cmake	2020-02-26 10:56:48 UTC (rev 257440)
+++ releases/WebKitGTK/webkit-2.28/Source/cmake/WebKitCCache.cmake	2020-02-26 10:56:52 UTC (rev 257441)
@@ -1,14 +1,27 @@
-# Enable ccache by default, if installed. Setting WK_USE_CCACHE=NO in your
-# environment will disable it.
+# Enable ccache by default, if installed. To disable it you can:
+# if using script build-webkit: pass --no-use-ccache
+# if using cmake: set environment variable WK_USE_CCACHE=NO
 if (NOT "$ENV{WK_USE_CCACHE}" STREQUAL "NO")
     find_program(CCACHE_FOUND ccache)
     if (CCACHE_FOUND)
         if (PORT STREQUAL "Mac")
             set(CCACHE ${CMAKE_SOURCE_DIR}/Tools/ccache/ccache-wrapper)
+            set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND})
         else ()
-            set(CCACHE ${CCACHE_FOUND})
+            if (NOT DEFINED ENV{CCACHE_SLOPPINESS})
+                set(ENV{CCACHE_SLOPPINESS} time_macros)
+            endif ()
+            execute_process(COMMAND readlink -f ${CMAKE_CXX_COMPILER} RESULT_VARIABLE READLINK_RETCODE OUTPUT_VARIABLE REAL_CXX_PATH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+            execute_process(COMMAND which ${CCACHE_FOUND} RESULT_VARIABLE WHICH_RETCODE OUTPUT_VARIABLE REAL_CCACHE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+            if (${WHICH_RETCODE} EQUAL 0 AND ${READLINK_RETCODE} EQUAL 0 AND ${REAL_CXX_PATH} STREQUAL ${REAL_CCACHE_PATH})
+                message(STATUS "Enabling ccache: Compiler path already pointing to ccache. Not setting ccache prefix.")
+            else ()
+                message(STATUS "Enabling ccache: Setting ccache prefix for compiler.")
+                set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND})
+            endif ()
         endif ()
-        set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
+    else ()
+        message(WARNING "Enabling ccache: Couldn't find ccache program. Not enabling it.")
     endif ()
 endif ()
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to