History

Merge tag 'rust-fixes-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux

Pull rust fixes from Miguel Ojeda: "Toolchain and infrastructure: - Fix missing KASAN LLVM flags on first build (and fix spurious rebuilds) by skipping '--target' - Fix Make < 4.3 build error by using '$(pound)' - Fix UML build error by removing 'volatile' qualifier from io helpers - Fix UML build error by adding 'dma_{alloc,free}_attrs()' helpers - Clean gendwarfksyms warnings by avoiding to export '__pfx' symbols - Clean objtool warning by adding a new 'noreturn' function for 1.86.0 - Disable 'needless_continue' Clippy lint due to new 1.86.0 warnings - Add missing 'ffi' crate to 'generate_rust_analyzer.py' 'pin-init' crate: - Import a couple fixes from upstream" * tag 'rust-fixes-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ojeda/linux: rust: helpers: Add dma_alloc_attrs() and dma_free_attrs() rust: helpers: Remove volatile qualifier from io helpers rust: kbuild: use `pound` to support GNU Make < 4.3 objtool/rust: add one more `noreturn` Rust function for Rust 1.86.0 rust: kasan/kbuild: fix missing flags on first build rust: disable `clippy::needless_continue` rust: kbuild: Don't export __pfx symbols rust: pin-init: use Markdown autolinks in Rust comments rust: pin-init: alloc: restrict `impl ZeroableOption` for `Box` to `T: Sized` scripts: generate_rust_analyzer: Add ffi crate

Linus Torvalds committed 1 year ago

Commit 0bd2f262 parents 51c7960 c1b407112 files · +53 −31Browse files

Showing the changes to scripts (2 of 12 files). Show all

Unified · Split

2 files
  1. scripts/Makefile.compiler +2 −2
  2. scripts/generate_rust_analyzer.py +9 −3
scripts/Makefile.compiler+2−2
@@ -79,8 +79,8 @@ ld-option = $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2),$(3)) · 78 unmodified lines
7979 # Usage: MY_RUSTFLAGS += $(call __rustc-option,$(RUSTC),$(MY_RUSTFLAGS),-Cinstrument-coverage,-Zinstrument-coverage)
8080 # TODO: remove RUSTC_BOOTSTRAP=1 when we raise the minimum GNU Make version to 4.4
8181 __rustc-option = $(call try-run,\
82− echo '#![allow(missing_docs)]#![feature(no_core)]#![no_core]' | RUSTC_BOOTSTRAP=1\
83− $(1) --sysroot=/dev/null $(filter-out --sysroot=/dev/null,$(2)) $(3)\
82+ echo '$(pound)![allow(missing_docs)]$(pound)![feature(no_core)]$(pound)![no_core]' | RUSTC_BOOTSTRAP=1\
83+ $(1) --sysroot=/dev/null $(filter-out --sysroot=/dev/null --target=%,$(2)) $(3)\
8484 --crate-type=rlib --out-dir=$(TMPOUT) --emit=obj=- - >/dev/null,$(3),$(4))
8585
8686 # rustc-option
scripts/generate_rust_analyzer.py+9−3
@@ -112,6 +112,12 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs): · 111 unmodified lines
112112 cfg=["kernel"],
113113 )
114114
115+ append_crate(
116+ "ffi",
117+ srctree / "rust" / "ffi.rs",
118+ ["core", "compiler_builtins"],
119+ )
120+
115121 def append_crate_with_generated(
116122 display_name,
117123 deps,
@@ -131,9 +137,9 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs): · 13 unmodified lines
131137 "exclude_dirs": [],
132138 }
133139
134− append_crate_with_generated("bindings", ["core"])
135− append_crate_with_generated("uapi", ["core"])
136− append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin_init", "bindings", "uapi"])
140+ append_crate_with_generated("bindings", ["core", "ffi"])
141+ append_crate_with_generated("uapi", ["core", "ffi"])
142+ append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin_init", "ffi", "bindings", "uapi"])
137143
138144 def is_root_crate(build_file, target):
139145 try: