From: Nathan Chancellor <nathan@kernel.org>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: "Nicolas Schier" <nsc@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Matthew Maurer" <mmaurer@google.com>,
"Alice Ryhl" <aliceryhl@google.com>,
"Josh Poimboeuf" <jpoimboe@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
linux-kbuild@vger.kernel.org,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
rust-for-linux@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 2/2] kbuild: rust: keep Rust objects out of Clang LTO with inline helpers
Date: Mon, 17 Aug 2026 11:12:12 -0700 [thread overview]
Message-ID: <20260817181212.GA1249844@ax162> (raw)
In-Reply-To: <20260816133233.197500-2-ojeda@kernel.org>
On Sun, Aug 16, 2026 at 03:32:33PM +0200, Miguel Ojeda wrote:
> Another possible alternative that Gary suggested is to turn the flags on
> globally for C, whether only when inline helpers are enabled or in all
> cases, but it may be intended that in C we expect not to generate the
> `unreachable`s.
I am not sure we can use '-mllvm -trap-unreachable' for C code, as that
would mess with manually inserted calls to __builtin_unreachable(). It
has come up before:
https://lore.kernel.org/CAHk-=wgPCbZv0JgqoNWMOO+p=N772YW16xYk_pmb1GU7aeuPFA@mail.gmail.com/
It is possible the '-no-trap-after-noreturn' avoids that particular
issue but I still think the "compiler inserted" vs. "user inserted"
distinction that Linus comments on is likely still potentially relevant.
--
Cheers,
Nathan
next prev parent reply other threads:[~2026-08-17 18:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 13:32 [PATCH 1/2] kbuild: rust: preserve unreachable traps with inline helpers Miguel Ojeda
2026-08-16 13:32 ` [PATCH 2/2] kbuild: rust: keep Rust objects out of Clang LTO " Miguel Ojeda
2026-08-16 14:05 ` Gary Guo
2026-08-17 18:12 ` Nathan Chancellor [this message]
2026-08-16 14:04 ` [PATCH 1/2] kbuild: rust: preserve unreachable traps " Gary Guo
2026-08-18 3:18 ` Josh Poimboeuf
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=20260817181212.GA1249844@ax162 \
--to=nathan@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=jpoimboe@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=mmaurer@google.com \
--cc=nsc@kernel.org \
--cc=ojeda@kernel.org \
--cc=peterz@infradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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