aboutsummaryrefslogtreecommitdiff
path: root/compilers.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-11-22 14:50:52 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-11-22 14:50:52 +0200
commite33cf3134768e180ab76df91d9a00c28f1915231 (patch)
tree4462dd7ce0e39193a389290c71490064d8da30dd /compilers.py
parent78e2cf064131fc155b9529e383c95ca6a225a6a7 (diff)
downloadmeson-e33cf3134768e180ab76df91d9a00c28f1915231.zip
meson-e33cf3134768e180ab76df91d9a00c28f1915231.tar.gz
meson-e33cf3134768e180ab76df91d9a00c28f1915231.tar.bz2
Do not use the linker in cross C++ sanity check to make bare metal projects work.
Diffstat (limited to 'compilers.py')
-rw-r--r--compilers.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/compilers.py b/compilers.py
index f211760..46797c9 100644
--- a/compilers.py
+++ b/compilers.py
@@ -553,7 +553,13 @@ class CPPCompiler(CCompiler):
ofile = open(source_name, 'w')
ofile.write('class breakCCompiler;int main(int argc, char **argv) { return 0; }\n')
ofile.close()
- cmdlist = self.exelist + [source_name, '-o', binary_name]
+ if self.is_cross and self.exe_wrapper is None:
+ # Skipping link because of the same reason as for C.
+ # The comment in CCompiler explains why this is done.
+ extra_flags = ['-c']
+ else:
+ extra_flags = []
+ cmdlist = self.exelist + extra_flags + [source_name, '-o', binary_name]
pc = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(stdo, stde) = pc.communicate()
stdo = stdo.decode()