summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/compilers/asm.py8
-rw-r--r--test cases/nasm/2 asm language/meson.build12
2 files changed, 20 insertions, 0 deletions
diff --git a/mesonbuild/compilers/asm.py b/mesonbuild/compilers/asm.py
index 6149313ba..231cabccf 100644
--- a/mesonbuild/compilers/asm.py
+++ b/mesonbuild/compilers/asm.py
@@ -47,6 +47,14 @@ class NasmCompiler(Compiler):
def get_output_args(self, outputname: str) -> T.List[str]:
return ['-o', outputname]
+ def unix_args_to_native(self, args: T.List[str]) -> T.List[str]:
+ outargs = []
+ for arg in args:
+ if arg == '-pthread':
+ continue
+ outargs.append(arg)
+ return outargs
+
def get_optimization_args(self, optimization_level: str) -> T.List[str]:
return nasm_optimization_args[optimization_level]
diff --git a/test cases/nasm/2 asm language/meson.build b/test cases/nasm/2 asm language/meson.build
index 21787ff1c..390ffed3f 100644
--- a/test cases/nasm/2 asm language/meson.build
+++ b/test cases/nasm/2 asm language/meson.build
@@ -43,3 +43,15 @@ exe = executable('hello', 'hello.asm',
link_args: link_args,
)
test('hello', exe)
+
+#Test whether pthread dependency gets filtered out
+threads = dependency('threads')
+
+exe2 = executable('hello_w_threads', 'hello.asm',
+ config_file,
+ nasm_args: '-DFOO',
+ link_args: link_args,
+ dependencies: [threads]
+)
+
+test('hello_w_threads', exe2)