Skip to content

Commit 5b37677

Browse files
committed
lldb: Link with libatomic on x86
cmake atomic check is not sufficient for i686 target where clang14 still generates __atomic_store calls but the check does not entail this function and happily thinks that compiler can resolve all atomic via intrinsics on i686, but thats not the case, ideally the check for determining atomic operation should be make more robust but until then lets ask to link with libatomic on i686/linux Upstream-Status: Inappropriate [OE-Specific] Signed-off-by: Khem Raj <[email protected]>
1 parent d307bf5 commit 5b37677

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lldb/source/Utility/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows")
1919
list(APPEND LLDB_SYSTEM_LIBS ws2_32 rpcrt4)
2020
endif ()
2121

22+
if (CMAKE_SYSTEM_PROCESSOR MATCHES "i686" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
23+
list(APPEND LLDB_SYSTEM_LIBS atomic)
24+
endif()
25+
2226
if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
2327
list(APPEND LLDB_SYSTEM_LIBS atomic)
2428
endif()

0 commit comments

Comments
 (0)