1 |
On Tue, 14 May 2019 11:47:04 -0700 Georgy Yakovlev wrote: |
2 |
> On Tuesday, May 14, 2019 9:15:52 AM PDT Andrew Savchenko wrote: |
3 |
> > Hi all! |
4 |
> > |
5 |
> > Looks like rustc supports target CPU and optlevel options, e.g. |
6 |
> > rustc -C target-cpu=skylake -C opt-level=3 |
7 |
> > as well as more fine-grade optimizations. |
8 |
> > |
9 |
> > But I see no way to specify them when building rust software. |
10 |
> > Am I missing something? Is there any reason for not providing |
11 |
> > something like RUSTFLAGS? |
12 |
> > |
13 |
> > Best regards, |
14 |
> > Andrew Savchenko |
15 |
> Hi, |
16 |
> |
17 |
> I have this in make.conf for quite some time. |
18 |
> |
19 |
> RUSTFLAGS="-Ctarget-cpu=native -v" |
20 |
> |
21 |
> it just works(tm) as you expect it to. |
22 |
|
23 |
Well, it does not, at least for me. Right now I'm building |
24 |
torbrowser from mozilla overlay and content of RUSTFLAGS from |
25 |
make.conf doesn't show up in rustc arguments. |
26 |
|
27 |
Moreover there is no mention of RUSTFLAGS in either man rustc or |
28 |
rust/cargo eclasses. |
29 |
|
30 |
> I remember earlier rustc/cargo were failing if same options specified twice, |
31 |
> for example once in toml files and second time via RUSTFLAGS, but I can't |
32 |
> reproduce anymore. |
33 |
> Maybe it got smarter and RUSTFLAGS actually override whatever is set in toml |
34 |
> files. |
35 |
> |
36 |
> |
37 |
> - |
38 |
> Regards, Georgy |
39 |
|
40 |
|
41 |
Best regards, |
42 |
Andrew Savchenko |