(replying to https://lore.kernel.org/bpf/20210328064121.2062927-1-yhs@xxxxxx/) Thanks for the patch! > +# gcc emits compilation flags in dwarf DW_AT_producer by default > +# while clang needs explicit flag. Add this flag explicitly. > +ifdef CONFIG_CC_IS_CLANG > +DEBUG_CFLAGS += -grecord-gcc-switches > +endif > + This adds ~5MB/1% to vmlinux of an x86_64 defconfig built with clang. Do we want to add additional guards for CONFIG_DEBUG_INFO_BTF, so that we don't have to pay that cost if that config is not set?