From 1c1ce7e6e0854b4155b85e66f290eb6a02be80b1 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Tue, 20 Sep 2016 12:31:35 +0000 Subject: [PATCH] Build wtf/Atomics.cpp only if needed =================================================================== Gbp-Pq: Name fix-ftbfs-armel.patch --- Source/WTF/wtf/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/WTF/wtf/CMakeLists.txt b/Source/WTF/wtf/CMakeLists.txt index 867999ea92..ea6932250d 100644 --- a/Source/WTF/wtf/CMakeLists.txt +++ b/Source/WTF/wtf/CMakeLists.txt @@ -171,7 +171,6 @@ set(WTF_HEADERS set(WTF_SOURCES Assertions.cpp - Atomics.cpp BitVector.cpp CompilationThread.cpp CrossThreadCopier.cpp @@ -276,6 +275,15 @@ if (NOT USE_SYSTEM_MALLOC) list(APPEND WTF_LIBRARIES bmalloc) endif () +file(WRITE ${CMAKE_BINARY_DIR}/test_atomics.cpp + "int main(void)\n" + "{ long long x = 1; return (int) __sync_add_and_fetch_8(&x, 1); }\n") +try_compile(ATOMICS_BUILD_SUCCEEDED ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_atomics.cpp) +if (NOT ATOMICS_BUILD_SUCCEEDED) + list(APPEND WTF_SOURCES Atomics.cpp) +endif () +file(REMOVE ${CMAKE_BINARY_DIR}/test_atomics.cpp) + list(APPEND WTF_SOURCES unicode/icu/CollatorICU.cpp ) -- 2.30.2