Skip to content

Commit fcb1a09

Browse files
authored
Merge pull request #835 from YakoYakoYokuYoku/btf-attr-bindgen
rust: Proper bindgen sources for BTF debug builds
2 parents 61926cb + f6bb7cb commit fcb1a09

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/linux/compiler_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#ifndef __ASSEMBLY__
66

77
#if defined(CONFIG_DEBUG_INFO_BTF) && defined(CONFIG_PAHOLE_HAS_BTF_TAG) && \
8-
__has_attribute(btf_type_tag)
8+
__has_attribute(btf_type_tag) && !defined(__BINDGEN__)
99
# define BTF_TYPE_TAG(value) __attribute__((btf_type_tag(#value)))
1010
#else
1111
# define BTF_TYPE_TAG(value) /* nothing */

rust/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ else
297297
bindgen_c_flags_lto = $(bindgen_c_flags)
298298
endif
299299

300-
bindgen_c_flags_final = $(bindgen_c_flags_lto)
300+
bindgen_c_flags_final = $(bindgen_c_flags_lto) -D__BINDGEN__
301301

302302
quiet_cmd_bindgen = BINDGEN $@
303303
cmd_bindgen = \

0 commit comments

Comments
 (0)