LNT Compile Patch for review

Marc Schifer via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 15:22:57 PST 2016



Simple patch to make lnt compile use the target compiler instead of the system compiler for make driven Project tests (non Xcode type). Currently if its not an Xcode target for the projects, it does not export any of the environment variables required to make it use the correct compiler and ends up defaulting to the system compiler.



diff --git a/lnt/tests/compile.py b/lnt/tests/compile.py
index 8e92dd5..13f769d 100644
--- a/lnt/tests/compile.py
+++ b/lnt/tests/compile.py
@@ -320,7 +320,15 @@ def test_build(base_name, run_info, variables, project, build_config, num_jobs,

     # Create an env dict in case the user wants to use it.
     env = dict(os.environ)
-
+
+    # Export the compiler variables to the env
+    compiler_env = {}
+    compiler_env['CC'] = opts.cc
+    compiler_env['CXX'] = opts.cxx
+    compiler_env['LD'] = opts.ld
+    compiler_env['LDXX'] = opts.ldxx
+    env.update(compiler_env)
+
     # Form the test build command.
     build_info = project['build_info']

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160310/024d2e53/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lnt.patch
Type: application/octet-stream
Size: 667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160310/024d2e53/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160310/024d2e53/attachment-0001.html>


More information about the llvm-commits mailing list