llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Gary Guo <gary@garyguo.net>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Alice Ryhl" <aliceryhl@google.com>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"kernel test robot" <lkp@intel.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"WANG Xuerui" <kernel@xen0n.name>
Subject: Re: [linux-next:master 9676/10599] ld.lld: error: undefined symbol: rust_build_error
Date: Fri, 21 Nov 2025 14:30:08 +0000	[thread overview]
Message-ID: <20251121143008.2f5acc33.gary@garyguo.net> (raw)
In-Reply-To: <CANiq72=P8AS_XeMdkakuGeTQ5SGb4wvH8qyVoY32FR+PLQu+zQ@mail.gmail.com>

On Fri, 21 Nov 2025 15:21:45 +0100
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:

> On Fri, Nov 21, 2025 at 3:10 PM Alice Ryhl <aliceryhl@google.com> wrote:
> >
> > This kind of thing is why I keep saying build_error() is too fragile to
> > be used at all.  

The case here I think is a perfectly fine use case of `build_error` as
it's completely by-value and does involve references. If compiler can't
figure out, it's either a compiler bug or a source bug.

> Adding `unsafe` blocks for things that should be able to be statically
> known isn't great.
> 
> `build_assert!` is just too useful, so it is best to try to understand
> what can be done, or find an equivalent solution. Gary et al. may have
> some input here.

I'd argue that these build issues actually helps us catch missed
optimisations opportunities :)

For this particular issue, I noticed that none of the functions
involved here (`from_expr` and `fits_within`) are marked as `#[inline]`.
I suspect after marking them as inline this case should be resolved.

Best,
Gary


  reply	other threads:[~2025-11-21 14:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20 16:41 [linux-next:master 9676/10599] ld.lld: error: undefined symbol: rust_build_error kernel test robot
2025-11-21  6:13 ` Alexandre Courbot
2025-11-21  9:08   ` Alice Ryhl
2025-11-21 13:41     ` Alexandre Courbot
2025-11-21 14:10       ` Alice Ryhl
2025-11-21 14:21         ` Miguel Ojeda
2025-11-21 14:30           ` Gary Guo [this message]
2025-11-21 14:39             ` Alexandre Courbot
2025-11-21 14:44             ` Alice Ryhl
2025-11-21 15:53               ` Miguel Ojeda
2025-11-21 15:27             ` Alexandre Courbot
2025-11-21 15:30               ` Miguel Ojeda
2025-11-22  2:12                 ` Alexandre Courbot
2025-11-21 14:19       ` Miguel Ojeda

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=20251121143008.2f5acc33.gary@garyguo.net \
    --to=gary@garyguo.net \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=chenhuacai@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=tmgross@umich.edu \
    /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;
as well as URLs for NNTP newsgroup(s).