Bug 208377 - Fix issue in cmake build for checking ccache
Summary: Fix issue in cmake build for checking ccache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Miller
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-28 10:12 PST by Keith Miller
Modified: 2020-02-28 11:56 PST (History)
8 users (show)

See Also:


Attachments
Patch (2.30 KB, patch)
2020-02-28 10:18 PST, Keith Miller
no flags Details | Formatted Diff | Diff
Patch (2.30 KB, patch)
2020-02-28 10:21 PST, Keith Miller
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>