deinterlace: Enable x86 assembly with nasm on MSVC
authorNirbheek Chauhan <nirbheek@centricular.com>
Tue, 24 Nov 2020 16:41:50 +0000 (22:11 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Tue, 24 Nov 2020 16:41:50 +0000 (22:11 +0530)
We need to remove x86inc.asm from the list of compiled assembly files
because it is not supposed to be compiled separately. It is directly
included by yadif.asm, and it exports no symbols.

The object file was getting ignored on all platforms except on msvc
where it was causing a linker hang when building with debugging
enabled because the object file had no debug symbols (or similar).
We've seen this before in FFmpeg too, which uses nasm:
https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg/-/merge_requests/46

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/825>

gst/deinterlace/meson.build
meson.build

index 49c915c..4c747b7 100644 (file)
@@ -65,8 +65,7 @@ if have_nasm and host_cpu == 'x86_64'
   else
     asm_outformat = 'elf64'
   endif
-  asm_x = files('x86/yadif.asm',
-                'x86/x86inc.asm')
+  asm_x = files('x86/yadif.asm')
 
   asm_stackalign_def = '-DSTACK_ALIGNMENT=64'
   asm_incdir = 'x86'
index 583082e..97f76a4 100644 (file)
@@ -373,9 +373,7 @@ have_nasm = false
 # FIXME: nasm path needs testing on non-Linux, esp. Windows
 host_cpu = host_machine.cpu_family()
 if host_cpu == 'x86_64'
-  if cc.get_id() == 'msvc'
-    message('Nasm disabled on MSVC')
-  elif cc.get_define('__ILP32__') == '1'
+  if cc.get_define('__ILP32__') == '1'
     message('Nasm disabled on x32')
   else
     asm_option = get_option('asm')