aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-12-27 10:32:13 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-12-27 10:32:13 +0200
commitd92e6c4595db9e27428096eaf40c56a2691e98e7 (patch)
treec3c6b718cd4b6c81d6f4df383d0617c251ccf5b8
parent489ca238c57a6246ce8867cfd9c611322abd7e5d (diff)
downloadmeson-d92e6c4595db9e27428096eaf40c56a2691e98e7.zip
meson-d92e6c4595db9e27428096eaf40c56a2691e98e7.tar.gz
meson-d92e6c4595db9e27428096eaf40c56a2691e98e7.tar.bz2
Boost win detection tuning.
-rw-r--r--compilers.py18
-rw-r--r--dependencies.py5
-rw-r--r--ninjabackend.py1
3 files changed, 19 insertions, 5 deletions
diff --git a/compilers.py b/compilers.py
index 00b2ecf..eea79d0 100644
--- a/compilers.py
+++ b/compilers.py
@@ -177,6 +177,9 @@ class Compiler():
def has_function(self, *args, **kwargs):
raise EnvironmentException('Language %s does not support function checks.' % self.language)
+ def unixtype_flags_to_native(self, args):
+ return args
+
class CCompiler(Compiler):
def __init__(self, exelist, version, is_cross, exe_wrapper=None):
super().__init__(exelist, version)
@@ -1055,7 +1058,6 @@ class VisualStudioCCompiler(CCompiler):
vs2010_always_args = ['/nologo', '/showIncludes']
vs2013_always_args = ['/nologo', '/showIncludes', '/FS']
-
def __init__(self, exelist, version, is_cross, exe_wrap):
CCompiler.__init__(self, exelist, version, is_cross, exe_wrap)
self.id = 'msvc'
@@ -1157,6 +1159,14 @@ class VisualStudioCCompiler(CCompiler):
def get_option_link_args(self, options):
return options['c_winlibs'].value
+ def unixtype_flags_to_native(self, args):
+ result = []
+ for i in args:
+ if i.startswith('-L'):
+ i = '/LIBPATH:' + i[2:]
+ result.append(i)
+ return result
+
class VisualStudioCPPCompiler(VisualStudioCCompiler):
def __init__(self, exelist, version, is_cross, exe_wrap):
VisualStudioCCompiler.__init__(self, exelist, version, is_cross, exe_wrap)
@@ -1768,6 +1778,9 @@ class VisualStudioLinker():
def get_option_link_args(self, options):
return []
+ def unixtype_flags_to_native(self, args):
+ return args
+
class ArLinker():
std_args = ['csr']
@@ -1804,3 +1817,6 @@ class ArLinker():
def get_option_link_args(self, options):
return []
+
+ def unixtype_flags_to_native(self, args):
+ return args
diff --git a/dependencies.py b/dependencies.py
index 165fd2f..7aa2464 100644
--- a/dependencies.py
+++ b/dependencies.py
@@ -539,10 +539,7 @@ class BoostDependency(Dependency):
def get_win_link_args(self):
args = []
if self.boost_root:
- # FIXME, these are in gcc format, not msvc.
- # On the other hand, so are the args that
- # pkg-config returns.
- args.append('/LIBPATH:' + self.libdir)
+ args.append('-L' + self.libdir)
for module in self.requested_modules:
module = BoostDependency.name2lib.get(module, module)
if module in self.lib_modules_mt:
diff --git a/ninjabackend.py b/ninjabackend.py
index 749f35d..c465f7c 100644
--- a/ninjabackend.py
+++ b/ninjabackend.py
@@ -1675,6 +1675,7 @@ rule FORTRAN_DEP_HACK
if self.environment.coredata.get_builtin_option('coverage'):
commands += linker.get_coverage_link_args()
commands += extra_args
+ commands = linker.unixtype_flags_to_native(commands)
dep_targets = [self.get_dependency_filename(t) for t in dependencies]
dep_targets += [os.path.join(self.environment.source_dir,
target.subdir, t) for t in target.link_depends]