rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Xu <dxu@dxuuu.xyz>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: rust-for-linux <rust-for-linux@vger.kernel.org>
Subject: Re: How are rustc -Z flags enabled during build?
Date: Thu, 2 Sep 2021 11:41:08 -0700	[thread overview]
Message-ID: <20210902184108.yrxmccpp5ofi4nit@kashmir.localdomain> (raw)
In-Reply-To: <CANiq72nGvGL1qhr-BpEZ=kY_oW5ZDe_nUvuh8tWPKLNq-oVJQA@mail.gmail.com>

Hi Gary, Miguel,

On Thu, Sep 02, 2021 at 07:50:44AM +0200, Miguel Ojeda wrote:
> Hi Daniel,
> 
> On Thu, Sep 2, 2021 at 1:11 AM Daniel Xu <dxu@dxuuu.xyz> wrote:
> >
> > When I try to run it outside of kbuild, I get:
> >
> >     error: the option `Z` is only accepted on the nightly compiler
> >
> > How does kbuild use the -Z features on a stable rustc?
> 
> As Gary points out, it is an environment variable being set in the
> top-level `Makefile` nearby the other flags. I considered adding it to
> the command-line instead so that copy-pasting the lines is easier,
> even if it means being a bit more verbose.
> 
> In any case, note that it is an escape hatch intended to be internal
> to the compiler (which explains the error message not mentioning it)
> and thus should be avoided unless a project has very special
> constraints.
> 
> Our goal is to drop its usage as soon as it is feasible, but it will
> take a while. It is also why we only maintain support for a given
> `rustc` version for the moment.
> 
> Cheers,
> Miguel

Thanks! I knew there must've been some magic somewhere :) .

Daniel

      reply	other threads:[~2021-09-02 18:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 23:07 How are rustc -Z flags enabled during build? Daniel Xu
2021-09-02  0:50 ` Gary Guo
2021-09-02  5:50 ` Miguel Ojeda
2021-09-02 18:41   ` Daniel Xu [this message]

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=20210902184108.yrxmccpp5ofi4nit@kashmir.localdomain \
    --to=dxu@dxuuu.xyz \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=rust-for-linux@vger.kernel.org \
    /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).