aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 4ed7a79..c45b252 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -750,6 +750,11 @@ class Compiler:
'Language {} does not support has_multi_arguments.'.format(
self.get_display_language()))
+ def has_multi_link_arguments(self, args, env):
+ raise EnvironmentException(
+ 'Language {} does not support has_multi_link_arguments.'.format(
+ self.get_display_language()))
+
def get_cross_extra_flags(self, environment, link):
extra_flags = []
if self.is_cross and environment:
@@ -805,7 +810,6 @@ class Compiler:
# Construct the compiler command-line
commands = CompilerArgs(self)
commands.append(srcname)
- commands += extra_args
commands += self.get_always_args()
if mode == 'compile':
commands += self.get_compile_only_args()
@@ -815,6 +819,10 @@ class Compiler:
else:
output = self._get_compile_output(tmpdirname, mode)
commands += self.get_output_args(output)
+ # extra_args must be last because it could contain '/link' to
+ # pass args to VisualStudio's linker. In that case everything
+ # in the command line after '/link' is given to the linker.
+ commands += extra_args
# Generate full command-line with the exelist
commands = self.get_exelist() + commands.to_native()
mlog.debug('Running compile:')