Bug 208377

Summary: Fix issue in cmake build for checking ccache
Product: WebKit Reporter: Keith Miller <keith_miller>
Component: New BugsAssignee: Keith Miller <keith_miller>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, clopez, commit-queue, ews-watchlist, gyuyoung.kim, ryuan.choi, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=208007
Attachments:
Description Flags
Patch
none
Patch none

Description Keith Miller 2020-02-28 10:12:24 PST
Fix issue in cmake build for checking ccache
Comment 1 Keith Miller 2020-02-28 10:18:05 PST
Created attachment 391987 [details]
Patch
Comment 2 Keith Miller 2020-02-28 10:21:25 PST
Created attachment 391988 [details]
Patch
Comment 3 Carlos Alberto Lopez Perez 2020-02-28 10:44:17 PST
Comment on attachment 391988 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=391988&action=review

> Source/cmake/WebKitCCache.cmake:17
>              if (NOT DEFINED ENV{CCACHE_SLOPPINESS})
>                  set(ENV{CCACHE_SLOPPINESS} time_macros)
>              endif ()
> +            # FIXME: readlink -f isn't supported on macOS. https://bugs.webkit.org/show_bug.cgi?id=208379
>              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})
> +            if (${WHICH_RETCODE} EQUAL 0 AND ${READLINK_RETCODE} EQUAL 0 AND "${REAL_CXX_PATH}" STREQUAL "${REAL_CCACHE_PATH}")

This codeblock should not execute on Mac.
Its inside a if (!PORT STREQUAL "Mac")
Comment 4 Keith Miller 2020-02-28 11:11:53 PST
Comment on attachment 391988 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=391988&action=review

>> Source/cmake/WebKitCCache.cmake:17
>> +            if (${WHICH_RETCODE} EQUAL 0 AND ${READLINK_RETCODE} EQUAL 0 AND "${REAL_CXX_PATH}" STREQUAL "${REAL_CCACHE_PATH}")
> 
> This codeblock should not execute on Mac.
> Its inside a if (!PORT STREQUAL "Mac")

If you build JSCOnly you'll hit it.
Comment 5 Keith Miller 2020-02-28 11:13:08 PST
(In reply to Keith Miller from comment #4)
> Comment on attachment 391988 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=391988&action=review
> 
> >> Source/cmake/WebKitCCache.cmake:17
> >> +            if (${WHICH_RETCODE} EQUAL 0 AND ${READLINK_RETCODE} EQUAL 0 AND "${REAL_CXX_PATH}" STREQUAL "${REAL_CCACHE_PATH}")
> > 
> > This codeblock should not execute on Mac.
> > Its inside a if (!PORT STREQUAL "Mac")
> 
> If you build JSCOnly you'll hit it.

Regardless, you'll have the same problem if either of the command fails on any other platform for some reason.
Comment 6 Carlos Alberto Lopez Perez 2020-02-28 11:26:29 PST
Comment on attachment 391988 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=391988&action=review

>>>> Source/cmake/WebKitCCache.cmake:17
>>>> +            if (${WHICH_RETCODE} EQUAL 0 AND ${READLINK_RETCODE} EQUAL 0 AND "${REAL_CXX_PATH}" STREQUAL "${REAL_CCACHE_PATH}")
>>> 
>>> This codeblock should not execute on Mac.
>>> Its inside a if (!PORT STREQUAL "Mac")
>> 
>> If you build JSCOnly you'll hit it.
> 
> Regardless, you'll have the same problem if either of the command fails on any other platform for some reason.

I see
Comment 7 WebKit Commit Bot 2020-02-28 11:55:25 PST
Comment on attachment 391988 [details]
Patch

Clearing flags on attachment: 391988

Committed r257649: <https://trac.webkit.org/changeset/257649>
Comment 8 WebKit Commit Bot 2020-02-28 11:55:27 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2020-02-28 11:56:14 PST
<rdar://problem/59897121>