Changeset 232067 in webkit
- Timestamp:
- May 22, 2018 8:54:48 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r232062 r232067 1 2018-05-22 Alberto Garcia <berto@igalia.com> 2 3 [CMake] Properly detect compiler flags, needed libs, and fallbacks for usage of 64-bit atomic operations 4 https://bugs.webkit.org/show_bug.cgi?id=182622 5 <rdar://problem/40292317> 6 7 Reviewed by Michael Catanzaro. 8 9 * Source/cmake/WebKitCompilerFlags.cmake: 10 Move the test to detect whether we need to link against libatomic 11 to a common CMake file so it can be used from both JavaScriptCore 12 and WebKit. 13 1 14 2018-05-22 Michael Catanzaro <mcatanzaro@igalia.com> 2 15 -
trunk/Source/JavaScriptCore/CMakeLists.txt
r232062 r232067 125 125 endif () 126 126 127 # Since r228149, on MIPS we need to link with -latomic, because 128 # __atomic_fetch_add_8 is not available as a compiler intrinsic. It is 129 # available on other platforms (including 32-bit Arm), so the link with 130 # libatomic is only neede on MIPS. 131 if (WTF_CPU_MIPS) 132 list(APPEND JavaScriptCore_LIBRARIES 133 -latomic 134 ) 127 if (ATOMIC_INT64_REQUIRES_LIBATOMIC) 128 list(APPEND JavaScriptCore_LIBRARIES atomic) 135 129 endif () 136 130 -
trunk/Source/JavaScriptCore/ChangeLog
r232062 r232067 1 2018-05-22 Alberto Garcia <berto@igalia.com> 2 3 [CMake] Properly detect compiler flags, needed libs, and fallbacks for usage of 64-bit atomic operations 4 https://bugs.webkit.org/show_bug.cgi?id=182622 5 <rdar://problem/40292317> 6 7 Reviewed by Michael Catanzaro. 8 9 We were linking JavaScriptCore against libatomic in MIPS because 10 in that architecture __atomic_fetch_add_8() is not a compiler 11 intrinsic and is provided by that library instead. However other 12 architectures (e.g armel) are in the same situation, so we need a 13 generic test. 14 15 That test already exists in WebKit/CMakeLists.txt, so we just have 16 to move it to a common file (WebKitCompilerFlags.cmake) and use 17 its result (ATOMIC_INT64_REQUIRES_LIBATOMIC) here. 18 19 * CMakeLists.txt: 20 1 21 2018-05-22 Michael Catanzaro <mcatanzaro@igalia.com> 2 22 -
trunk/Source/WebKit/CMakeLists.txt
r232062 r232067 811 811 endif () 812 812 813 if (COMPILER_IS_GCC_OR_CLANG) 814 set(ATOMIC_TEST_SOURCE 815 " 816 #include <atomic> 817 int main() { std::atomic<int64_t> i(0); i++; return 0; } 818 " 819 ) 820 check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMIC_INT64_IS_BUILTIN) 821 if (NOT ATOMIC_INT64_IS_BUILTIN) 822 set(CMAKE_REQUIRED_LIBRARIES atomic) 823 check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMIC_INT64_REQUIRES_LIBATOMIC) 824 if (ATOMIC_INT64_REQUIRES_LIBATOMIC) 825 list(APPEND WebKit_LIBRARIES PRIVATE atomic) 826 endif () 827 unset(CMAKE_REQUIRED_LIBRARIES) 828 endif () 813 if (ATOMIC_INT64_REQUIRES_LIBATOMIC) 814 list(APPEND WebKit_LIBRARIES PRIVATE atomic) 829 815 endif () 830 816 -
trunk/Source/WebKit/ChangeLog
r232062 r232067 1 2018-05-22 Alberto Garcia <berto@igalia.com> 2 3 [CMake] Properly detect compiler flags, needed libs, and fallbacks for usage of 64-bit atomic operations 4 https://bugs.webkit.org/show_bug.cgi?id=182622 5 <rdar://problem/40292317> 6 7 Reviewed by Michael Catanzaro. 8 9 Move the test to determine whether we need to link against 10 libatomic to the common file WebKitCompilerFlags.cmake so it can 11 also be used for JavaScriptCore. 12 13 * CMakeLists.txt: 14 1 15 2018-05-22 Michael Catanzaro <mcatanzaro@igalia.com> 2 16 -
trunk/Source/cmake/WebKitCompilerFlags.cmake
r232062 r232067 231 231 set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS}) 232 232 endif () 233 234 if (COMPILER_IS_GCC_OR_CLANG) 235 set(ATOMIC_TEST_SOURCE " 236 #include <atomic> 237 int main() { std::atomic<int64_t> i(0); i++; return 0; } 238 ") 239 check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMIC_INT64_IS_BUILTIN) 240 if (NOT ATOMIC_INT64_IS_BUILTIN) 241 set(CMAKE_REQUIRED_LIBRARIES atomic) 242 check_cxx_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMIC_INT64_REQUIRES_LIBATOMIC) 243 unset(CMAKE_REQUIRED_LIBRARIES) 244 endif () 245 endif ()
Note: See TracChangeset
for help on using the changeset viewer.