Daniel Micay писал 09.03.2014 20:48:
On 09/03/14 11:11 AM, Peter Zotov wrote:
Greetings, fellow rustaceans!
I'm quite interested in having a proper Rust runtime on bare-metal
targets (specifically ARM Cortex-M at this point). 'Proper', in my
view, includes having support for such things as thread-local
variables and stack overflow checking.
Unfortunately, LLVM emits instructions relevant to fetching
thread-local data via a switch over target triple and several chunks
of hardcoded assembly. Of course, that assembly is highly
OS-specific;
as far as I know, only Linux, Windows and Android are supported
today.
I propose to add a set of simple, generic hooks for LLVM to use,
initially to Rust's LLVM fork, eventually to be upstreamed.
I don't think we should add any more patches. The work should be done
upstream, so that there's upstream input for the whole process. It's
not
an issue only relevant to Rust.
In general, I agree. However, roundtrip time on upstream can be in
order
of months. I feel like it would be easier to convince the LLVM team to
integrate patches which are successfully used in Rust rather than
patches only used successfully in someone's private tree.
The changes I propose aren't particularly far-reaching or complex, so
it won't result in a maintenance burden for Rust. Any objections from
upstream would be administrative and not technical, either.
I'll raise this issue on llvm-dev shortly, too.
--
WBR, Peter Zotov.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev