summaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-01-07 10:18:17 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2023-01-22 15:43:33 +0100
commit2185242faddd12a1ba1060be5caf584fe5aba93a (patch)
tree04b90d1a3c03176d0cd8a8201759eac02a163293 /rust
parentfixdep: parse Makefile more correctly to handle comments etc. (diff)
downloadlinux-2185242faddd12a1ba1060be5caf584fe5aba93a.tar.xz
linux-2185242faddd12a1ba1060be5caf584fe5aba93a.zip
kbuild: remove sed commands after rustc rules
rustc may put comments in dep-info, so sed is used to drop them before passing it to fixdep. Now that fixdep can remove comments, Makefiles do not need to run sed. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Tested-by: Miguel Ojeda <ojeda@kernel.org> Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Diffstat (limited to 'rust')
-rw-r--r--rust/Makefile6
1 files changed, 2 insertions, 4 deletions
diff --git a/rust/Makefile b/rust/Makefile
index 865afb87bc9b..f403b79cae5a 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -333,8 +333,7 @@ quiet_cmd_rustc_procmacro = $(RUSTC_OR_CLIPPY_QUIET) P $@
$(RUSTC_OR_CLIPPY) $(rust_common_flags) \
--emit=dep-info=$(depfile) --emit=link=$@ --extern proc_macro \
--crate-type proc-macro \
- --crate-name $(patsubst lib%.so,%,$(notdir $@)) $<; \
- sed -i '/^\#/d' $(depfile)
+ --crate-name $(patsubst lib%.so,%,$(notdir $@)) $<
# Procedural macros can only be used with the `rustc` that compiled it.
# Therefore, to get `libmacros.so` automatically recompiled when the compiler
@@ -350,8 +349,7 @@ quiet_cmd_rustc_library = $(if $(skip_clippy),RUSTC,$(RUSTC_OR_CLIPPY_QUIET)) L
--emit=dep-info=$(depfile) --emit=obj=$@ \
--emit=metadata=$(dir $@)$(patsubst %.o,lib%.rmeta,$(notdir $@)) \
--crate-type rlib -L$(objtree)/$(obj) \
- --crate-name $(patsubst %.o,%,$(notdir $@)) $<; \
- sed -i '/^\#/d' $(depfile) \
+ --crate-name $(patsubst %.o,%,$(notdir $@)) $< \
$(if $(rustc_objcopy),;$(OBJCOPY) $(rustc_objcopy) $@)
rust-analyzer: