From b1077dded73b31fbdac5908eac289edc6aad0f86 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sat, 18 Jun 2016 00:54:43 +0530 Subject: [PATCH] vs backends: Translate unix link and compile flags (#603) --- mesonbuild/backend/vs2010backend.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 540dd045d..d262e6bc3 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -495,7 +495,7 @@ class Vs2010Backend(backends.Backend): extra_args[l] += args for l, args in target.extra_args.items(): if l in extra_args: - extra_args[l] += args + extra_args[l] += compiler.unix_compile_flags_to_native(args) general_args = compiler.get_buildtype_args(self.buildtype).copy() # FIXME all the internal flags of VS (optimization etc) are represented # by their own XML elements. In theory we should split all flags to those @@ -575,11 +575,8 @@ class Vs2010Backend(backends.Backend): extra_link_args = compiler.get_option_link_args(self.environment.coredata.compiler_options) extra_link_args += compiler.get_buildtype_linker_args(self.buildtype) for l in self.environment.coredata.external_link_args.values(): - for a in l: - extra_link_args.append(a) - for l in target.link_args: - for a in l: - extra_link_args.append(a) + extra_link_args += compiler.unix_link_flags_to_native(l) + extra_link_args += compiler.unix_link_flags_to_native(target.link_args) if len(extra_link_args) > 0: extra_link_args.append('%(AdditionalOptions)') ET.SubElement(link, "AdditionalOptions").text = ' '.join(extra_link_args)