Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
deps: update ChakraCore to chakra-core/ChakraCore@3e739383a5
Browse files Browse the repository at this point in the history
[MERGE #4396 @obastemur] osx: fix osx binary backward compatibility

Merge pull request #4396 from obastemur:fix_build_osx_bb1

Fixes #4393

Reviewed-By: chakrabot <chakrabot@users.noreply.github.com>
  • Loading branch information
MSLaguana authored and chakrabot committed Dec 13, 2017
1 parent 7bee32c commit 29fed89
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
20 changes: 16 additions & 4 deletions deps/chakrashim/core/pal/src/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,12 @@ check_cxx_source_runs("
int main()
{
int ret;
#ifndef __APPLE__
struct timespec ts;
ret = clock_gettime(CLOCK_REALTIME, &ts);
#else
ret = 1; // do not use clock_gettime on osx/ios (backward compatibility)
#endif
exit(ret);
}" HAVE_WORKING_CLOCK_GETTIME)
check_cxx_source_runs("
Expand All @@ -355,9 +358,12 @@ check_cxx_source_runs("
int main()
{
int ret;
#ifndef __APPLE__
struct timespec ts;
ret = clock_gettime(CLOCK_MONOTONIC, &ts);
#else
ret = 1; // do not use clock_gettime on osx/ios (backward compatibility)
#endif
exit(ret);
}" HAVE_CLOCK_MONOTONIC)
check_cxx_source_runs("
Expand All @@ -368,9 +374,12 @@ check_cxx_source_runs("
int main()
{
int ret;
#ifndef __APPLE__
struct timespec ts;
ret = clock_gettime(CLOCK_MONOTONIC_COARSE, &ts);
#else
ret = 1; // do not use clock_gettime on osx/ios (backward compatibility)
#endif
exit(ret);
}" HAVE_CLOCK_MONOTONIC_COARSE)
check_cxx_source_runs("
Expand All @@ -393,9 +402,12 @@ check_cxx_source_runs("
int main()
{
int ret;
#ifndef __APPLE__
struct timespec ts;
ret = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
#else
ret = 1; // do not use clock_gettime on osx/ios (backward compatibility)
#endif
exit(ret);
}" HAVE_CLOCK_THREAD_CPUTIME)
check_cxx_source_runs("
Expand Down
5 changes: 4 additions & 1 deletion deps/chakrashim/core/pal/src/misc/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@ GetTickCount64Fallback()
{
ULONGLONG retval = 0;

#if HAVE_CLOCK_MONOTONIC_COARSE || HAVE_CLOCK_MONOTONIC
// The `__APPLE__` below is unlikely. However, if osx future version
// supports one of the clock types below, we may miss that and
// break backward compatibility.
#if !defined(__APPLE__) && (HAVE_CLOCK_MONOTONIC_COARSE || HAVE_CLOCK_MONOTONIC)
{
clockid_t clockType =
#if HAVE_CLOCK_MONOTONIC_COARSE
Expand Down

0 comments on commit 29fed89

Please sign in to comment.