kbuild: specify output names separately for each emission type from rustc
[linux-block.git] / scripts / Makefile.host
index 4a02b31cd1029a71bc85dd19f23e45d3717c7a14..d812241144d443c0f4883124774e3fa78e537b4d 100644 (file)
@@ -86,7 +86,8 @@ hostc_flags    = -Wp,-MMD,$(depfile) \
 hostcxx_flags  = -Wp,-MMD,$(depfile) \
                  $(KBUILD_HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
                  $(HOSTCXXFLAGS_$(target-stem).o)
-hostrust_flags = $(KBUILD_HOSTRUSTFLAGS) $(HOST_EXTRARUSTFLAGS) \
+hostrust_flags = --emit=dep-info=$(depfile) \
+                 $(KBUILD_HOSTRUSTFLAGS) $(HOST_EXTRARUSTFLAGS) \
                  $(HOSTRUSTFLAGS_$(target-stem))
 
 # $(objtree)/$(obj) for including generated headers from checkin source files
@@ -147,9 +148,7 @@ $(host-cxxobjs): $(obj)/%.o: $(src)/%.cc FORCE
 # host-rust -> Executable
 quiet_cmd_host-rust    = HOSTRUSTC $@
       cmd_host-rust    = \
-       $(HOSTRUSTC) $(hostrust_flags) --emit=dep-info,link \
-               --out-dir=$(obj)/ $<; \
-       mv $(obj)/$(target-stem).d $(depfile); \
+       $(HOSTRUSTC) $(hostrust_flags) --emit=link=$@ $<; \
        sed -i '/^\#/d' $(depfile)
 $(host-rust): $(obj)/%: $(src)/%.rs FORCE
        $(call if_changed_dep,host-rust)