Gentoo Archives: gentoo-dev

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Rust flags
Date: Wed, 15 May 2019 16:09:38
Message-Id: 20190515190915.2091798eb58c142f7d8c3bd9@gentoo.org
In Reply to: Re: [gentoo-dev] Re: Rust flags by Georgy Yakovlev
On Tue, 14 May 2019 16:58:16 -0700 Georgy Yakovlev wrote:
> On Tuesday, May 14, 2019 3:01:48 PM PDT Andrew Savchenko wrote: > > On Tue, 14 May 2019 11:47:04 -0700 Georgy Yakovlev wrote:
[...]
> > > I have this in make.conf for quite some time. > > > > > > RUSTFLAGS="-Ctarget-cpu=native -v" > > > > > > it just works(tm) as you expect it to. > > > > Well, it does not, at least for me. Right now I'm building > > torbrowser from mozilla overlay and content of RUSTFLAGS from > > make.conf doesn't show up in rustc arguments. > > > That's something about mozbuild, not the variable itself. > check about:buildconfig page of torbrowser. > > RUSTFLAGS show up for me on that page, not 100% sure if they actually get > applied.
Yes, they are showing up, though I don't see them applied in the build log.
> I have no idea how it calls rustc. if it's cargo then to see verbose > invocations you need to find where the build system calls it and add "-vv" > > btw, be careful with -C opt-level=3 for ff or derivatives, it was known to > cause segfaults some time ago. > > for regular packages this variable works fine. > > > Moreover there is no mention of RUSTFLAGS in either man rustc or > > rust/cargo eclasses. > > because it's a variable used by cargo to call rustc with given params, not by > rustc itself. > > This has nothing to do with eclass, it's cargo setting supposed to be set by > user. > > CARGO-RUSTC(1) page does mention it > > more details here: > https://github.com/rust-lang/cargo/blob/master/src/doc/src/reference/ > environment-variables.md
Thanks, it indeed has it. I used to read man pages and man cargo-rustc don't mention it, though github docs does. Best regards, Andrew Savchenko