File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
# SPDX-License-Identifier: GPL-2.0
2
2
3
- obj-$(CONFIG_RUST) += core.o compiler_builtins.o helpers.o
3
+ obj-$(CONFIG_RUST) += core.o compiler_builtins.o
4
4
always-$(CONFIG_RUST) += exports_core_generated.h
5
5
6
+ # Missing prototypes are expected in the helpers since these are exported
7
+ # for Rust only, thus there is no header nor prototypes.
8
+ obj-$(CONFIG_RUST) += helpers.o
9
+ CFLAGS_REMOVE_helpers.o = -Wmissing-prototypes
10
+
6
11
always-$(CONFIG_RUST) += libmacros.so
7
12
no-clean-files += libmacros.so
8
13
@@ -253,9 +258,11 @@ quiet_cmd_bindgen_helper = BINDGEN $@
253
258
--use-core --with-derive-default --ctypes-prefix c_types \
254
259
--no-debug '.*' \
255
260
--size_t-is-usize -o $@ -- $(bindgen_c_flags_final ) \
256
- -I$(objtree ) /rust/ -DMODULE; \
261
+ -I$(objtree ) /rust/ -DMODULE $( bindgen_target_cflags ) ; \
257
262
sed -Ei 's/pub fn rust_helper_([a-zA-Z0-9_]*)/\# [link_name="rust_helper_\1"]\n pub fn \1/g' $@
258
263
264
+ # See `CFLAGS_REMOVE_helpers.o` above.
265
+ $(objtree ) /rust/bindings_helpers_generated.rs : private bindgen_target_cflags = -Wno-missing-prototypes
259
266
$(objtree ) /rust/bindings_helpers_generated.rs : $(srctree ) /rust/helpers.c FORCE
260
267
$(call if_changed_dep,bindgen_helper)
261
268
You can’t perform that action at this time.
0 commit comments