aboutsummaryrefslogtreecommitdiff
path: root/environment.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-08-30 23:07:26 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-08-30 23:07:26 +0300
commit1571bfc6a9462fc4f5f0e8f13c470de2ec3ae1a3 (patch)
tree05fa7f49505c8ac74b916001e82e47d93398fb2b /environment.py
parent29174b669faf684e789e3fe817787e48a7621dd3 (diff)
downloadmeson-1571bfc6a9462fc4f5f0e8f13c470de2ec3ae1a3.zip
meson-1571bfc6a9462fc4f5f0e8f13c470de2ec3ae1a3.tar.gz
meson-1571bfc6a9462fc4f5f0e8f13c470de2ec3ae1a3.tar.bz2
Static cross linking works again.
Diffstat (limited to 'environment.py')
-rw-r--r--environment.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/environment.py b/environment.py
index a29e9e4..8c1e0b4 100644
--- a/environment.py
+++ b/environment.py
@@ -953,13 +953,16 @@ class Environment():
raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"')
def detect_static_linker(self, compiler):
- evar = 'AR'
- if evar in os.environ:
- linker = os.environ[evar].strip()
- if isinstance(compiler, VisualStudioCCompiler):
- linker= self.vs_static_linker
+ if compiler.is_cross:
+ linker = self.cross_info['ar']
else:
- linker = self.default_static_linker
+ evar = 'AR'
+ if evar in os.environ:
+ linker = os.environ[evar].strip()
+ if isinstance(compiler, VisualStudioCCompiler):
+ linker= self.vs_static_linker
+ else:
+ linker = self.default_static_linker
basename = os.path.basename(linker).lower()
if basename == 'lib' or basename == 'lib.exe':
arg = '/?'