Gentoo Archives: gentoo-dev

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: Rust flags
Date: Tue, 14 May 2019 22:02:01
In Reply to: [gentoo-dev] Re: Rust flags by Georgy Yakovlev
On Tue, 14 May 2019 11:47:04 -0700 Georgy Yakovlev wrote:
> On Tuesday, May 14, 2019 9:15:52 AM PDT Andrew Savchenko wrote: > > Hi all! > > > > Looks like rustc supports target CPU and optlevel options, e.g. > > rustc -C target-cpu=skylake -C opt-level=3 > > as well as more fine-grade optimizations. > > > > But I see no way to specify them when building rust software. > > Am I missing something? Is there any reason for not providing > > something like RUSTFLAGS? > > > > Best regards, > > Andrew Savchenko > Hi, > > 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. Moreover there is no mention of RUSTFLAGS in either man rustc or rust/cargo eclasses.
> I remember earlier rustc/cargo were failing if same options specified twice, > for example once in toml files and second time via RUSTFLAGS, but I can't > reproduce anymore. > Maybe it got smarter and RUSTFLAGS actually override whatever is set in toml > files. > > > - > Regards, Georgy
Best regards, Andrew Savchenko


Subject Author
Re: [gentoo-dev] Re: Rust flags Georgy Yakovlev <gyakovlev@g.o>