[CMake] Properly detect compiler flags, needed libs, and fallbacks for usage of 64...
authorberto@igalia.com <berto@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2018 15:54:48 +0000 (15:54 +0000)
committerberto@igalia.com <berto@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2018 15:54:48 +0000 (15:54 +0000)
commit7e08a5ed87d90809dbc2aa32b0fa37278c58e012
treea7cc5bbfb447c7ad60403d18eb0cf277dbe4761c
parentee3bdee5542923248f006668df2ee644b0bed986
[CMake] Properly detect compiler flags, needed libs, and fallbacks for usage of 64-bit atomic operations
https://bugs.webkit.org/show_bug.cgi?id=182622
<rdar://problem/40292317>

Reviewed by Michael Catanzaro.

.:

* Source/cmake/WebKitCompilerFlags.cmake:
Move the test to detect whether we need to link against libatomic
to a common CMake file so it can be used from both JavaScriptCore
and WebKit.

Source/JavaScriptCore:

We were linking JavaScriptCore against libatomic in MIPS because
in that architecture __atomic_fetch_add_8() is not a compiler
intrinsic and is provided by that library instead. However other
architectures (e.g armel) are in the same situation, so we need a
generic test.

That test already exists in WebKit/CMakeLists.txt, so we just have
to move it to a common file (WebKitCompilerFlags.cmake) and use
its result (ATOMIC_INT64_REQUIRES_LIBATOMIC) here.

* CMakeLists.txt:

Source/WebKit:

Move the test to determine whether we need to link against
libatomic to the common file WebKitCompilerFlags.cmake so it can
also be used for JavaScriptCore.

* CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ChangeLog
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/cmake/WebKitCompilerFlags.cmake