Skip to content

Commit

Permalink
Do not use the linker in cross C++ sanity check to make bare metal pr…
Browse files Browse the repository at this point in the history
…ojects work.
  • Loading branch information
jpakkane committed Nov 22, 2015
1 parent 78e2cf0 commit e33cf31
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion compilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,13 @@ def sanity_check(self, work_dir):
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()
Expand Down

0 comments on commit e33cf31

Please sign in to comment.