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
Showing the changes to scripts (2 of 12 files). Show all
Unified · Split
| @@ -79,8 +79,8 @@ ld-option = $(call try-run, $(LD) $(KBUILD_LDFLAGS) $(1) -v,$(1),$(2),$(3)) · 78 unmodified lines | ||
| 79 | 79 | # Usage: MY_RUSTFLAGS += $(call __rustc-option,$(RUSTC),$(MY_RUSTFLAGS),-Cinstrument-coverage,-Zinstrument-coverage) |
| 80 | 80 | # TODO: remove RUSTC_BOOTSTRAP=1 when we raise the minimum GNU Make version to 4.4 |
| 81 | 81 | __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)\ | |
| 84 | 84 | --crate-type=rlib --out-dir=$(TMPOUT) --emit=obj=- - >/dev/null,$(3),$(4)) |
| 85 | 85 | |
| 86 | 86 | # rustc-option |
| @@ -112,6 +112,12 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs): · 111 unmodified lines | ||
| 112 | 112 | cfg=["kernel"], |
| 113 | 113 | ) |
| 114 | 114 | |
| 115 | + append_crate( | |
| 116 | + "ffi", | |
| 117 | + srctree / "rust" / "ffi.rs", | |
| 118 | + ["core", "compiler_builtins"], | |
| 119 | + ) | |
| 120 | + | |
| 115 | 121 | def append_crate_with_generated( |
| 116 | 122 | display_name, |
| 117 | 123 | deps, |
| @@ -131,9 +137,9 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs): · 13 unmodified lines | ||
| 131 | 137 | "exclude_dirs": [], |
| 132 | 138 | } |
| 133 | 139 | |
| 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"]) | |
| 137 | 143 | |
| 138 | 144 | def is_root_crate(build_file, target): |
| 139 | 145 | try: |