Bug 1370296 - Ensure rust libraries are fully in the compile graph. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 14 Jun 2017 15:02:18 +0900
changeset 363987 052b55f072ac01ac33e3eb7bf6cd289b3da562bf
parent 363902 ad3f1138ce6f199408ad58d65c7476636e924909
child 363988 40895af8a56f1bc0290ba46a32e8a143a2fe40df
push id91467
push userarchaeopteryx@coole-files.de
push dateThu, 15 Jun 2017 09:17:43 +0000
treeherdermozilla-inbound@4bb2da0c73a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1370296
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1370296 - Ensure rust libraries are fully in the compile graph. r=gps This was not strictly necessary because they would appear as dependencies of other things in the compile graph, but it makes it easier to iterate the compile graph for all the node. Incidentally, this makes the rust libraries on par with rust programs.
python/mozbuild/mozbuild/backend/recursivemake.py
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -610,16 +610,20 @@ class RecursiveMakeBackend(CommonBackend
                 return False
 
         elif isinstance(obj, RustLibrary):
             self.backend_input_files.add(obj.cargo_file)
             self._process_rust_library(obj, backend_file)
             # No need to call _process_linked_libraries, because Rust
             # libraries are self-contained objects at this point.
 
+            # Hook the library into the compile graph.
+            build_target = self._build_target_for_obj(obj)
+            self._compile_graph[build_target]
+
         elif isinstance(obj, SharedLibrary):
             self._process_shared_library(obj, backend_file)
             self._process_linked_libraries(obj, backend_file)
             self._no_skip['syms'].add(backend_file.relobjdir)
 
         elif isinstance(obj, StaticLibrary):
             self._process_static_library(obj, backend_file)
             self._process_linked_libraries(obj, backend_file)