Stream: t-compiler/help

Topic: target features documentation #63597

nikomatsakis (Aug 29 2019 at 15:32, on Zulip):

Creating this issue to discuss #63597. @Sergey Togi Dashnyam -- feel free to ask some questions here :)

nikomatsakis (Aug 29 2019 at 15:32, on Zulip):

Though I'll try to leave a few more notes about what's expected in the issue itself

nikomatsakis (Aug 29 2019 at 15:33, on Zulip):

One thing you can do btw is ask the triagebot to assign you; I think it's @rustbot claim

Sergey Togi Dashnyam (Aug 29 2019 at 15:34, on Zulip):

Ok, I'm currently reading linked issues

Sergey Togi Dashnyam (Aug 29 2019 at 15:34, on Zulip):

as I have no context atm

Sergey Togi Dashnyam (Aug 29 2019 at 15:36, on Zulip):

Let me read the entire history and
I'll restate what my understanding of this issue is

Sergey Togi Dashnyam (Aug 29 2019 at 16:03, on Zulip):

Rust's Target feature leads to segfaults.

1. Rust has a Target feature for different CPU architectures. Binaries for e.g. ARM, x86 architectures differ, since they have different CPU instruction sets.
2. Using the target feature is atm unsafe, because
floats are compiled to soft-floats (software emulated floats)
-- OR --
native floats (used via ABIs --> goes to Floating Processing Unit)

mixed usage leads to segfault (trying to access reserved memory).
using crates will result in mixed usage, too

There is no quick solution, but documenting stuff is always good.

                (... will come in next posting)
Sergey Togi Dashnyam (Aug 29 2019 at 16:43, on Zulip):

The docfiles to modify are:

RustC Docs

Question @nikomatsakis


@nikomatsakis where do I find the -Chelp files?

nikomatsakis (Aug 30 2019 at 17:28, on Zulip):

@Sergey Togi Dashnyam heh I'm not sure -- there's some macro somewhere

nikomatsakis (Aug 30 2019 at 17:29, on Zulip):

ah, here it is

nikomatsakis (Aug 30 2019 at 17:30, on Zulip):

it looks like --print target-features winds up somewhere around this code

Sergey Togi Dashnyam (Aug 30 2019 at 20:07, on Zulip):

Thanks, will do a draft PR on the weekend.

Sergey Togi Dashnyam (Sep 04 2019 at 13:14, on Zulip):

@nikomatsakis I created a PR

nikomatsakis (Sep 04 2019 at 14:06, on Zulip):

@Sergey Togi Dashnyam awesome! :heart_eyes:

Last update: Jan 23 2020 at 19:55UTC