mirror of
https://github.com/torvalds/linux.git
synced 2025-11-30 23:16:01 +07:00
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>
This commit is contained in:
committed by
Miguel Ojeda
parent
4710b47988
commit
3c847e1722
@@ -199,12 +199,12 @@ rusttestlib-kernel: $(src)/kernel/lib.rs rusttestlib-bindings rusttestlib-uapi \
|
||||
$(obj)/bindings.o FORCE
|
||||
+$(call if_changed,rustc_test_library)
|
||||
|
||||
rusttestlib-bindings: private rustc_target_flags = --extern ffi
|
||||
rusttestlib-bindings: $(src)/bindings/lib.rs rusttestlib-ffi FORCE
|
||||
rusttestlib-bindings: private rustc_target_flags = --extern ffi --extern pin_init
|
||||
rusttestlib-bindings: $(src)/bindings/lib.rs rusttestlib-ffi rusttestlib-pin_init FORCE
|
||||
+$(call if_changed,rustc_test_library)
|
||||
|
||||
rusttestlib-uapi: private rustc_target_flags = --extern ffi
|
||||
rusttestlib-uapi: $(src)/uapi/lib.rs rusttestlib-ffi FORCE
|
||||
rusttestlib-uapi: private rustc_target_flags = --extern ffi --extern pin_init
|
||||
rusttestlib-uapi: $(src)/uapi/lib.rs rusttestlib-ffi rusttestlib-pin_init FORCE
|
||||
+$(call if_changed,rustc_test_library)
|
||||
|
||||
quiet_cmd_rustdoc_test = RUSTDOC T $<
|
||||
@@ -530,17 +530,19 @@ $(obj)/ffi.o: private skip_gendwarfksyms = 1
|
||||
$(obj)/ffi.o: $(src)/ffi.rs $(obj)/compiler_builtins.o FORCE
|
||||
+$(call if_changed_rule,rustc_library)
|
||||
|
||||
$(obj)/bindings.o: private rustc_target_flags = --extern ffi
|
||||
$(obj)/bindings.o: private rustc_target_flags = --extern ffi --extern pin_init
|
||||
$(obj)/bindings.o: $(src)/bindings/lib.rs \
|
||||
$(obj)/ffi.o \
|
||||
$(obj)/pin_init.o \
|
||||
$(obj)/bindings/bindings_generated.rs \
|
||||
$(obj)/bindings/bindings_helpers_generated.rs FORCE
|
||||
+$(call if_changed_rule,rustc_library)
|
||||
|
||||
$(obj)/uapi.o: private rustc_target_flags = --extern ffi
|
||||
$(obj)/uapi.o: private rustc_target_flags = --extern ffi --extern pin_init
|
||||
$(obj)/uapi.o: private skip_gendwarfksyms = 1
|
||||
$(obj)/uapi.o: $(src)/uapi/lib.rs \
|
||||
$(obj)/ffi.o \
|
||||
$(obj)/pin_init.o \
|
||||
$(obj)/uapi/uapi_generated.rs FORCE
|
||||
+$(call if_changed_rule,rustc_library)
|
||||
|
||||
|
||||
@@ -139,8 +139,8 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit
|
||||
"exclude_dirs": [],
|
||||
}
|
||||
|
||||
append_crate_with_generated("bindings", ["core", "ffi"])
|
||||
append_crate_with_generated("uapi", ["core", "ffi"])
|
||||
append_crate_with_generated("bindings", ["core", "ffi", "pin_init"])
|
||||
append_crate_with_generated("uapi", ["core", "ffi", "pin_init"])
|
||||
append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin_init", "ffi", "bindings", "uapi"])
|
||||
|
||||
def is_root_crate(build_file, target):
|
||||
|
||||
Reference in New Issue
Block a user