Skip to content

Commit 4471910

Browse files
Revert "PS-9379 Fix problem with "-latomic" on some platorms in uuid_vx component (#5407)" (#5433)
This reverts commit 6bba53b.
1 parent a2188eb commit 4471910

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

components/uuid_vx_udf/CMakeLists.txt

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,6 @@ MYSQL_ADD_COMPONENT(uuid_vx_udf
3333

3434
target_include_directories(component_uuid_vx_udf SYSTEM PRIVATE ${BOOST_PATCHES_DIR} ${BOOST_INCLUDE_DIR})
3535

36-
# Check if -latomic is required or not
37-
if (NOT MSVC)
38-
include(CheckCXXSourceCompiles)
39-
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
40-
# Adding "-w" compiler option to suppres all possible warnings
41-
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -std=c++17 -w)
42-
check_cxx_source_compiles("
43-
#include <atomic>
44-
std::atomic<uint64_t> x(0);
45-
int main() {
46-
uint64_t i = x.load(std::memory_order_relaxed);
47-
bool b = x.is_lock_free();
48-
return 0;
49-
}
50-
" uuid_vx_HAVE_BUILTIN_ATOMICS)
51-
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
52-
if (uuid_vx_HAVE_BUILTIN_ATOMICS)
53-
message(STATUS "Building UUID_VX UDF component without libatomic")
54-
else()
55-
message(STATUS "Building UUID_VX UDF component with libatomic")
56-
target_link_libraries(component_uuid_vx_udf PRIVATE atomic)
57-
endif()
36+
if(NOT APPLE)
37+
target_link_libraries(component_uuid_vx_udf PRIVATE atomic)
5838
endif()

0 commit comments

Comments
 (0)