diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-07-01 18:46:18 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-07-05 22:27:10 +0300 |
commit | 74611ecb1f06203fdd08357b3d8cc23af0f897cd (patch) | |
tree | 0c6a458c4c3886e5349a1f9f2776deaeae4fffb7 /mesonbuild/compilers/clike.py | |
parent | 5badc3912d266dc0d619812429f3d8d411c83b54 (diff) | |
download | meson-74611ecb1f06203fdd08357b3d8cc23af0f897cd.zip meson-74611ecb1f06203fdd08357b3d8cc23af0f897cd.tar.gz meson-74611ecb1f06203fdd08357b3d8cc23af0f897cd.tar.bz2 |
Fix unittests.
Diffstat (limited to 'mesonbuild/compilers/clike.py')
-rw-r--r-- | mesonbuild/compilers/clike.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/compilers/clike.py b/mesonbuild/compilers/clike.py index 9cadfdc..507bed7 100644 --- a/mesonbuild/compilers/clike.py +++ b/mesonbuild/compilers/clike.py @@ -396,7 +396,10 @@ class CLikeCompiler: if mode == 'link': # Add LDFLAGS from the env - args += env.coredata.get_external_link_args(self.for_machine, self.language) + sys_ld_args = env.coredata.get_external_link_args(self.for_machine, self.language) + # CFLAGS and CXXFLAGS go to both linking and compiling, but we want them + # to only appear on the command line once. Remove dupes. + args += [x for x in sys_ld_args if x not in sys_args] args += self.get_compiler_args_for_mode(mode) return args |