diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2018-03-31 22:44:09 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2018-04-16 19:14:02 -0400 |
commit | bd37afeeea0283dac1051b7d9bedf099252c1d19 (patch) | |
tree | 83c7c1b802dc58d554533739dee935786e6291d5 /mesonbuild/compilers/compilers.py | |
parent | bca2ff6def2db24824ad3d7452cb4c78519560d7 (diff) | |
download | meson-bd37afeeea0283dac1051b7d9bedf099252c1d19.zip meson-bd37afeeea0283dac1051b7d9bedf099252c1d19.tar.gz meson-bd37afeeea0283dac1051b7d9bedf099252c1d19.tar.bz2 |
Add has_link_argument() and friends
Closes: #3335.
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 10 |
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:') |