Gentoo Archives: gentoo-dev

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Rust flags
Date: Tue, 14 May 2019 18:47:20
Message-Id: 3542196.tV9Kn2uSVQ@ws
In Reply to: [gentoo-dev] Rust flags by Andrew Savchenko
1 On Tuesday, May 14, 2019 9:15:52 AM PDT Andrew Savchenko wrote:
2 > Hi all!
3 >
4 > Looks like rustc supports target CPU and optlevel options, e.g.
5 > rustc -C target-cpu=skylake -C opt-level=3
6 > as well as more fine-grade optimizations.
7 >
8 > But I see no way to specify them when building rust software.
9 > Am I missing something? Is there any reason for not providing
10 > something like RUSTFLAGS?
11 >
12 > Best regards,
13 > Andrew Savchenko
14 Hi,
15
16 I have this in make.conf for quite some time.
17
18 RUSTFLAGS="-Ctarget-cpu=native -v"
19
20 it just works(tm) as you expect it to.
21
22 I remember earlier rustc/cargo were failing if same options specified twice,
23 for example once in toml files and second time via RUSTFLAGS, but I can't
24 reproduce anymore.
25 Maybe it got smarter and RUSTFLAGS actually override whatever is set in toml
26 files.
27
28
29 -
30 Regards, Georgy

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Re: Rust flags Andrew Savchenko <bircoph@g.o>