aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-08-15 23:57:50 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-08-24 23:49:14 -0400
commit27748f9cd16908f7806328cc0ffb6ba34f04588e (patch)
treec9ad701cab8e439d9b76a3cb5cffc6ee3cbf60f7 /mesonbuild/compilers/compilers.py
parent9e2d4994c4d8795619a8e0e819936cd48e4ebebf (diff)
downloadmeson-27748f9cd16908f7806328cc0ffb6ba34f04588e.zip
meson-27748f9cd16908f7806328cc0ffb6ba34f04588e.tar.gz
meson-27748f9cd16908f7806328cc0ffb6ba34f04588e.tar.bz2
fix linker regression for compilers that don't accept LDFLAGS directly
e.g. ldc -- the compiler needs to process args before consuming them. Fixes #10693
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 5aab9c1..fab9fc1 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -692,10 +692,14 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
"""
raise EnvironmentException('Language %s does not support function checks.' % self.get_display_language())
- def unix_args_to_native(self, args: T.List[str]) -> T.List[str]:
+ @classmethod
+ def _unix_args_to_native(cls, args: T.List[str], info: MachineInfo) -> T.List[str]:
"Always returns a copy that can be independently mutated"
return args.copy()
+ def unix_args_to_native(self, args: T.List[str]) -> T.List[str]:
+ return self._unix_args_to_native(args, self.info)
+
@classmethod
def native_args_to_unix(cls, args: T.List[str]) -> T.List[str]:
"Always returns a copy that can be independently mutated"