meson: only require libatomic if the test program doesn't link
95448347 made lix require libatomic if the platform is able to link a
simple program using atomics, but it should actually be the other way
around. We need to require libatomic if it fails.
Change-Id: I6a6a6964ca6ee90a59314ddf1865753e83713772
This commit is contained in:
+1
-1
@@ -396,7 +396,7 @@ libatomic = dependency('atomic', required : false)
|
||||
# Some platforms like 32-Bit PowerPC need libatomic because they're lacking 64-Bit hardware atomic instructions
|
||||
# and compilers don't handle this automatically (yet).
|
||||
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358 and https://clang.llvm.org/docs/Toolchain.html#atomics-library
|
||||
if cxx.links(libatomic_test_program, name : 'test if simple atomic program links')
|
||||
if not cxx.links(libatomic_test_program, name : 'test if simple atomic program links')
|
||||
libatomic = dependency('atomic', required : true)
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user