Linux kbuild/kconfig development
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: yhs@fb.com
Cc: arnaldo.melo@gmail.com, ast@kernel.org, bpf@vger.kernel.org,
	kernel-team@fb.com, linux-kbuild@vger.kernel.org,
	masahiroy@kernel.org, michal.lkml@markovi.net,
	clang-built-linux@googlegroups.com, sedat.dilek@gmail.com,
	morbo@google.com
Subject: Re: [PATCH kbuild] kbuild: add -grecord-gcc-switches to clang build
Date: Mon, 29 Mar 2021 15:52:35 -0700	[thread overview]
Message-ID: <20210329225235.1845295-1-ndesaulniers@google.com> (raw)
In-Reply-To: <20210328064121.2062927-1-yhs@fb.com>

(replying to https://lore.kernel.org/bpf/20210328064121.2062927-1-yhs@fb.com/)

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?

  reply	other threads:[~2021-03-29 22:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28  6:41 [PATCH kbuild] kbuild: add -grecord-gcc-switches to clang build Yonghong Song
2021-03-29 22:52 ` Nick Desaulniers [this message]
2021-03-30 23:54   ` Yonghong Song
2021-03-31  0:25     ` Fangrui Song
2021-03-31  1:47       ` Yonghong Song
2021-03-31  2:39         ` Fāng-ruì Sòng
2021-03-31  2:51           ` David Blaikie
2021-03-31  3:13             ` Yonghong Song
2021-03-31  3:16               ` David Blaikie
2021-03-31  3:26                 ` Yonghong Song
2021-03-31  3:28                   ` David Blaikie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210329225235.1845295-1-ndesaulniers@google.com \
    --to=ndesaulniers@google.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=morbo@google.com \
    --cc=sedat.dilek@gmail.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox