Skip to content

Commit 19cd7b5

Browse files
Andrea Righiojeda
Andrea Righi
authored andcommitted
btf, scripts: rust: drop is_rust_module.sh
With commit c117797 ("btf, scripts: Exclude Rust CUs with pahole") we are now able to use pahole directly to identify Rust compilation units (CUs) and exclude them from generating BTF debugging information (when DEBUG_INFO_BTF is enabled). And if pahole doesn't support the --lang-exclude flag, we can't enable both RUST and DEBUG_INFO_BTF at the same time. So, in any case, the script is_rust_module.sh is just redundant and we can drop it. NOTE: we may also be able to drop the "Rust loadable module" mark inside Rust modules, but it seems safer to keep it for now to make sure we are not breaking any external tool that may potentially rely on it. Signed-off-by: Andrea Righi <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Tested-by: Eric Curtin <[email protected]> Reviewed-by: Eric Curtin <[email protected]> Reviewed-by: Neal Gompa <[email protected]> Reviewed-by: Masahiro Yamada <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Acked-by: Daniel Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Picked the `Reviewed-by`s from the old patch too. ] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 1137eed commit 19cd7b5

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

rust/macros/module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
199199
/// Used by the printing macros, e.g. [`info!`].
200200
const __LOG_PREFIX: &[u8] = b\"{name}\\0\";
201201
202-
/// The \"Rust loadable module\" mark, for `scripts/is_rust_module.sh`.
202+
/// The \"Rust loadable module\" mark.
203203
//
204204
// This may be best done another way later on, e.g. as a new modinfo
205205
// key or a new section. For the moment, keep it simple.

scripts/Makefile.modfinal

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ quiet_cmd_btf_ko = BTF [M] $@
4141
cmd_btf_ko = \
4242
if [ ! -f vmlinux ]; then \
4343
printf "Skipping BTF generation for %s due to unavailability of vmlinux\n" $@ 1>&2; \
44-
elif [ -n "$(CONFIG_RUST)" ] && $(srctree)/scripts/is_rust_module.sh $@; then \
45-
printf "Skipping BTF generation for %s because it's a Rust module\n" $@ 1>&2; \
4644
else \
4745
LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) --btf_base vmlinux $@; \
4846
$(RESOLVE_BTFIDS) -b vmlinux $@; \

scripts/is_rust_module.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)