summaryrefslogtreecommitdiffstats
path: root/tools/compile_test/compile_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/compile_test/compile_test.py')
-rwxr-xr-xtools/compile_test/compile_test.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/compile_test/compile_test.py b/tools/compile_test/compile_test.py
index a52c072..79371a1f 100755
--- a/tools/compile_test/compile_test.py
+++ b/tools/compile_test/compile_test.py
@@ -21,6 +21,7 @@ import tempfile
def DoMain(argv):
parser = optparse.OptionParser()
parser.add_option('--code')
+ parser.add_option('--run-linker', action='store_true')
parser.add_option('--on-success', default='')
parser.add_option('--on-failure', default='')
@@ -39,7 +40,12 @@ def DoMain(argv):
o_path = os.path.join(tmpdir, 'test.o')
- cxx_popen = subprocess.Popen([cxx, cxx_path, '-o', o_path, '-c'],
+ cxx_cmdline = [cxx, cxx_path, '-o', o_path]
+ if not options.run_linker:
+ cxx_cmdline.append('-c')
+ # Pass remaining arguments to the compiler.
+ cxx_cmdline += args
+ cxx_popen = subprocess.Popen(cxx_cmdline,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
cxx_stdout, cxx_stderr = cxx_popen.communicate()