osdep: drop atomic fallback

even msvc (which mpv apparently doesn't support) supports C11 atomics
now. no need to carry around fallback with subtle semantic differences.
This commit is contained in:
NRK
2023-10-18 20:32:16 +06:00
committed by sfan5
parent 3fb4eb2ba4
commit 2fa695c3f9
5 changed files with 4 additions and 94 deletions

View File

@@ -333,6 +333,9 @@ if features['libdl']
dependencies += libdl
endif
# C11 atomics are mandatory but linking to the library is not always required.
dependencies += cc.find_library('atomic', required: false)
cplugins = get_option('cplugins').require(
win32 or (features['libdl'] and cc.has_link_argument('-rdynamic')),
error_message: 'cplugins not supported by the os or compiler!',
@@ -731,13 +734,6 @@ if features['sdl2-gamepad']
sources += files('input/sdl_gamepad.c')
endif
stdatomic_dep = cc.find_library('atomic', required: false)
features += {'stdatomic': cc.has_header_symbol('stdatomic.h', 'atomic_int', dependencies: stdatomic_dep,
required: get_option('stdatomic'))}
if features['stdatomic']
dependencies += stdatomic_dep
endif
uchardet_opt = get_option('uchardet').require(
features['iconv'],
error_message: 'iconv was not found!',