From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org, Miguel Ojeda <ojeda@kernel.org>,
Alex Gaynor <alex.gaynor@gmail.com>,
Wedson Almeida Filho <wedsonaf@gmail.com>,
rust-for-linux@vger.kernel.org
Cc: "Finn Behrens" <me@kloenk.de>,
linux-kernel@vger.kernel.org,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Andreas Hindborg" <a.hindborg@samsung.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nicolas Schier" <nicolas@fjasle.eu>
Subject: [PATCH] kbuild: remove unnecessary export of RUST_LIB_SRC
Date: Sat, 14 Sep 2024 03:06:20 +0900 [thread overview]
Message-ID: <20240913180622.1327656-1-masahiroy@kernel.org> (raw)
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>
---
This code was added by this commit:
https://github.com/Rust-for-Linux/linux/commit/3f46885dc03ed2d750085b2237078a1628323964
Please me know if I am missing something.
Makefile | 4 ----
1 file changed, 4 deletions(-)
diff --git a/Makefile b/Makefile
index d57cfc6896b8..b194b7702a2e 100644
--- 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
--
2.43.0
next reply other threads:[~2024-09-13 18:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 18:06 Masahiro Yamada [this message]
2024-09-14 7:14 ` [PATCH] kbuild: remove unnecessary export of RUST_LIB_SRC Nicolas Schier
2024-09-23 9:17 ` Alice Ryhl
2024-09-24 18:42 ` Miguel Ojeda
2024-09-24 19:23 ` Fiona Behrens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240913180622.1327656-1-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=a.hindborg@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=me@kloenk.de \
--cc=nathan@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=wedsonaf@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).