Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: add `pin-init` as a dependency to `bindings` and `uapi`

This allows `bindings` and `uapi` to implement `Zeroable` and use other
items from pin-init.

Co-developed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://rust-for-linux.zulipchat.com/#narrow/channel/291565-Help/topic/Zeroable.20trait.20for.20C.20structs/near/510264158
Signed-off-by: Benno Lossin <lossin@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Benno Lossin and committed by
Miguel Ojeda
3c847e17 4710b479

+10 -8
+8 -6
rust/Makefile
··· 199 199 $(obj)/bindings.o FORCE 200 200 +$(call if_changed,rustc_test_library) 201 201 202 - rusttestlib-bindings: private rustc_target_flags = --extern ffi 203 - rusttestlib-bindings: $(src)/bindings/lib.rs rusttestlib-ffi FORCE 202 + rusttestlib-bindings: private rustc_target_flags = --extern ffi --extern pin_init 203 + rusttestlib-bindings: $(src)/bindings/lib.rs rusttestlib-ffi rusttestlib-pin_init FORCE 204 204 +$(call if_changed,rustc_test_library) 205 205 206 - rusttestlib-uapi: private rustc_target_flags = --extern ffi 207 - rusttestlib-uapi: $(src)/uapi/lib.rs rusttestlib-ffi FORCE 206 + rusttestlib-uapi: private rustc_target_flags = --extern ffi --extern pin_init 207 + rusttestlib-uapi: $(src)/uapi/lib.rs rusttestlib-ffi rusttestlib-pin_init FORCE 208 208 +$(call if_changed,rustc_test_library) 209 209 210 210 quiet_cmd_rustdoc_test = RUSTDOC T $< ··· 530 530 $(obj)/ffi.o: $(src)/ffi.rs $(obj)/compiler_builtins.o FORCE 531 531 +$(call if_changed_rule,rustc_library) 532 532 533 - $(obj)/bindings.o: private rustc_target_flags = --extern ffi 533 + $(obj)/bindings.o: private rustc_target_flags = --extern ffi --extern pin_init 534 534 $(obj)/bindings.o: $(src)/bindings/lib.rs \ 535 535 $(obj)/ffi.o \ 536 + $(obj)/pin_init.o \ 536 537 $(obj)/bindings/bindings_generated.rs \ 537 538 $(obj)/bindings/bindings_helpers_generated.rs FORCE 538 539 +$(call if_changed_rule,rustc_library) 539 540 540 - $(obj)/uapi.o: private rustc_target_flags = --extern ffi 541 + $(obj)/uapi.o: private rustc_target_flags = --extern ffi --extern pin_init 541 542 $(obj)/uapi.o: private skip_gendwarfksyms = 1 542 543 $(obj)/uapi.o: $(src)/uapi/lib.rs \ 543 544 $(obj)/ffi.o \ 545 + $(obj)/pin_init.o \ 544 546 $(obj)/uapi/uapi_generated.rs FORCE 545 547 +$(call if_changed_rule,rustc_library) 546 548
+2 -2
scripts/generate_rust_analyzer.py
··· 139 139 "exclude_dirs": [], 140 140 } 141 141 142 - append_crate_with_generated("bindings", ["core", "ffi"]) 143 - append_crate_with_generated("uapi", ["core", "ffi"]) 142 + append_crate_with_generated("bindings", ["core", "ffi", "pin_init"]) 143 + append_crate_with_generated("uapi", ["core", "ffi", "pin_init"]) 144 144 append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin_init", "ffi", "bindings", "uapi"]) 145 145 146 146 def is_root_crate(build_file, target):