summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-12-29 17:34:31 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-12-29 17:39:18 +0100
commitf06a870b88bd99fa770839763736c01c4c51dc07 (patch)
tree462f6fb89eda846645323ada701e311db0544220
parent392856ed4d86c71ecfb9b8036351ba2acd825a32 (diff)
downloadmpv-f06a870b88bd99fa770839763736c01c4c51dc07.tar.bz2
mpv-f06a870b88bd99fa770839763736c01c4c51dc07.tar.xz
build: add flag for inline assembly
This is used to disable inline assembly (useful for old version of binutils like the one in OpenBSD).
-rw-r--r--waftools/detections/cpu.py10
-rw-r--r--wscript5
2 files changed, 10 insertions, 5 deletions
diff --git a/waftools/detections/cpu.py b/waftools/detections/cpu.py
index ce342fdd73..3a8615f259 100644
--- a/waftools/detections/cpu.py
+++ b/waftools/detections/cpu.py
@@ -19,10 +19,10 @@ def configure(ctx):
ctx.define('ARCH_X86_64', 0)
ctx.define('HAVE_FAST_64BIT', 0)
- ctx.define('HAVE_MMX', 'ARCH_X86', quote=False)
- ctx.define('HAVE_MMX2', 'ARCH_X86', quote=False)
- ctx.define('HAVE_SSE', 'ARCH_X86', quote=False)
- ctx.define('HAVE_SSE2', 'ARCH_X86', quote=False)
- ctx.define('HAVE_SSSE3', 'ARCH_X86', quote=False)
+ ctx.define('HAVE_MMX', 'HAVE_ASM && ARCH_X86', quote=False)
+ ctx.define('HAVE_MMX2', 'HAVE_ASM && ARCH_X86', quote=False)
+ ctx.define('HAVE_SSE', 'HAVE_ASM && ARCH_X86', quote=False)
+ ctx.define('HAVE_SSE2', 'HAVE_ASM && ARCH_X86', quote=False)
+ ctx.define('HAVE_SSSE3', 'HAVE_ASM && ARCH_X86', quote=False)
globals().get(ctx.env.DEST_CPU, default)(ctx)
diff --git a/wscript b/wscript
index 3624185664..0e23e57560 100644
--- a/wscript
+++ b/wscript
@@ -59,6 +59,11 @@ build_options = [
'desc': 'w32 executable',
'deps_any': [ 'os-win32', 'os-cygwin'],
'func': check_ctx_vars('WINDRES')
+ }, {
+ 'name': '--asm',
+ 'desc': 'inline assembly',
+ 'default': 'enable',
+ 'func': check_true,
}
]