LibJS: Link with libatomic on i*86

Basically, this would be needed on any platform where the compiler
cannot tell at compile time whether or not some atomic size is
lock-free.
This commit is contained in:
Sergey Bugaev 2023-11-04 20:39:10 +03:00 committed by Andreas Kling
parent 9c6c2284d9
commit 21b946791e

View file

@ -271,4 +271,10 @@ target_link_libraries(LibJS PRIVATE LibCore LibCrypto LibFileSystem LibRegex Lib
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
target_link_libraries(LibJS PRIVATE LibX86)
endif()
# TODO: This is probably also needed on RISC-V.
if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "i.86.*")
target_link_libraries(LibJS PRIVATE atomic)
endif()
target_compile_options(LibJS PRIVATE -fno-omit-frame-pointer)