summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-03-12 12:52:51 +0100
committerwm4 <wm4@nowhere>2020-03-13 13:47:11 +0100
commit06718da79c79a98d5524f42d034b0d406b14e04c (patch)
treeef8131864069f94383002ac29b9b3700e84d3214 /wscript
parent5105a3b05ae7707f89bc269af7d8321e5ddb4fed (diff)
downloadmpv-06718da79c79a98d5524f42d034b0d406b14e04c.tar.bz2
mpv-06718da79c79a98d5524f42d034b0d406b14e04c.tar.xz
build: make C11 atomics mandatory
The emulation is pretty bad, and C11 compilers are everywhere now. It's time to retire the emulation, which was always meant as temporary hack for transition. In theory, a user can still use --disable-stdatomic to enable the emulation code, but that's sort of hidden. Actual support will be removed after the next release or so.
Diffstat (limited to 'wscript')
-rw-r--r--wscript19
1 files changed, 5 insertions, 14 deletions
diff --git a/wscript b/wscript
index 523e7b25b1..a2451e8009 100644
--- a/wscript
+++ b/wscript
@@ -206,28 +206,20 @@ main_dependencies = [
'req': True,
'fmsg': 'Unable to find pthreads support.'
}, {
- 'name': 'gnuc',
- 'desc': 'GNU C extensions',
- 'func': check_statement([], "__GNUC__"),
- }, {
- 'name': 'stdatomic',
- 'desc': 'stdatomic.h',
+ 'name': '--stdatomic',
+ 'desc': 'C11 stdatomic.h',
'func': check_libs(['atomic'],
check_statement('stdatomic.h',
'atomic_int_least64_t test = ATOMIC_VAR_INIT(123);'
- 'atomic_fetch_add(&test, 1)'))
+ 'atomic_fetch_add(&test, 1)')),
+ 'req': True,
+ 'fmsg': 'C11 atomics are required; you may need a newer compiler',
}, {
# C11; technically we require C11, but aligned_alloc() is not in MinGW
'name': 'aligned_alloc',
'desc': 'C11 aligned_alloc()',
'func': check_statement('stdlib.h', 'aligned_alloc(1, 1)'),
}, {
- 'name': 'atomics',
- 'desc': 'stdatomic.h support or slow emulation',
- 'func': check_true,
- 'req': True,
- 'deps': 'stdatomic || gnuc',
- }, {
'name': 'librt',
'desc': 'linking with -lrt',
'deps': 'pthreads',
@@ -500,7 +492,6 @@ audio_output_features = [
}, {
'name': '--audiounit',
'desc': 'AudioUnit output for iOS',
- 'deps': 'atomics',
'func': check_cc(
fragment=load_fragment('audiounit.c'),
framework_name=['Foundation', 'AudioToolbox'])