]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
kbuild: remove unnecessary export of RUST_LIB_SRC
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 13 Sep 2024 18:06:20 +0000 (03:06 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 23 Sep 2024 18:06:52 +0000 (03:06 +0900)
If RUST_LIB_SRC is defined in the top-level Makefile (via an environment
variable or command line), it is already exported.

The only situation where it is defined but not exported is when the
top-level Makefile is wrapped by another Makefile (e.g., GNUmakefile).
I cannot think of any other use cases.

I know some people use this tip to define custom variables. However,
even in that case, you can export it directly in the wrapper Makefile.

Example GNUmakefile:

    export RUST_LIB_SRC = /path/to/your/sysroot/lib/rustlib/src/rust/library
    include Makefile

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Makefile

index b4a941a30c73439d71c02cfe068405279a3bf037..0d3d45a88a71da2b5196e5ef6b343d23a4756da2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -578,10 +578,6 @@ else
        RUSTC_OR_CLIPPY = $(RUSTC)
 endif
 
-ifdef RUST_LIB_SRC
-       export RUST_LIB_SRC
-endif
-
 # Allows the usage of unstable features in stable compilers.
 export RUSTC_BOOTSTRAP := 1