labath created this revision.
labath added reviewers: stella.stamenova, zturner.

This should enable the compiler to find the system linker for the link
step.


https://reviews.llvm.org/D55736

Files:
  lit/helper/build.py


Index: lit/helper/build.py
===================================================================
--- lit/helper/build.py
+++ lit/helper/build.py
@@ -153,6 +153,9 @@
     return result
 
 def print_environment(env):
+    if env is None:
+        print('    Inherited')
+        return
     for e in env:
         value = env[e]
         lines = value.split(os.pathsep)
@@ -633,7 +636,7 @@
         args.extend(['-o', obj])
         args.append(source)
 
-        return ('compiling', [source], obj, {}, args)
+        return ('compiling', [source], obj, None, args)
 
     def _get_link_command(self):
         args = []
@@ -649,7 +652,7 @@
         args.extend(['-o', self._exe_file_name()])
         args.extend(self._obj_file_names())
 
-        return ('linking', self._obj_file_names(), self._exe_file_name(), {}, 
args)
+        return ('linking', self._obj_file_names(), self._exe_file_name(), 
None, args)
 
 
     def output_files(self):


Index: lit/helper/build.py
===================================================================
--- lit/helper/build.py
+++ lit/helper/build.py
@@ -153,6 +153,9 @@
     return result
 
 def print_environment(env):
+    if env is None:
+        print('    Inherited')
+        return
     for e in env:
         value = env[e]
         lines = value.split(os.pathsep)
@@ -633,7 +636,7 @@
         args.extend(['-o', obj])
         args.append(source)
 
-        return ('compiling', [source], obj, {}, args)
+        return ('compiling', [source], obj, None, args)
 
     def _get_link_command(self):
         args = []
@@ -649,7 +652,7 @@
         args.extend(['-o', self._exe_file_name()])
         args.extend(self._obj_file_names())
 
-        return ('linking', self._obj_file_names(), self._exe_file_name(), {}, args)
+        return ('linking', self._obj_file_names(), self._exe_file_name(), None, args)
 
 
     def output_files(self):
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to