-
Notifications
You must be signed in to change notification settings - Fork 14
Upgrade to support LLVM 4.0 (development) #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Coming from RustWrapper.cpp:
From
|
Hard coding that to
appears to be coming from:
|
temporarily removing the error check and I've gotten back to compiling stage2. That seems to indicate that the end of this set of upgrades is in sight! |
This is way more work that I remember it being last time lol |
@dylanmckay heads up - I'm going to do a rebase on Rust master and squash some things together. I want to post something to upstreams issue tracker about upgrading to 4.0 because it seems so difficult. Do you have any outstanding work? |
shepmaster: "temporarily removing the error check and I've gotten back to compiling stage2" I'm looking into this issue, but I'm not sure if anybody settled a solution for this. |
@nateozem it's tricky 😈 There are two competing projects to keep up with: Rust and (AVR-)LLVM. Working against any given "older" version is potentially a waste of time; things might have changed between then and the present and there would be wasted work. On my laptop (and not pushed anywhere yet), I am attempting to integrate avr-llvm/llvm@3fa7cf1 and rust-lang/rust@cae6ab1, which are the latest commits in each repository at this point in time. This also means that I am getting a new error, different from the others above. 😸 Generally, my approach has been "quickly hack up Rust to get it to compile, then go back and tease out each fix to prepare a proper PR". I'm still in the "quickly hack up" part, so saying whether any given hack will be preserved is difficult at best. |
I've also created rust-lang#37609 to potentially get suggestions and guidance from people more familiar with the marriage of Rust + LLVM, as well as a way to ease getting the changes upstreamed. |
No outstanding work @shepmaster. Your description on rust-lang#37609 sounds 💯 |
Ok, I've rebased, cleaned up, and force-pushed to avr-support-4.0 (de6eefe581ae70452324110cea534a970639b9f0). I was able to completely build the compiler with this branch and an out-of-tree build of AVR-LLVM with Rust support (avr-llvm/llvm@d93e840). I have not attempted to actually compile any AVR code with it 😇 |
Sorry to add noise here, but I'm super excited about the AVR support and just tried to build with |
Not updated, and the code isn't really ready yet. I'm working on it, I swear! |
By the way @shepmaster, there is technically one difference between the downstream and upstream versions of the AVR backend. In downstream, the backend is setup in CMake to be a first-class backend (enabled by default), but upstream it is set up as an "experimental" backend, which must be enabled by We will need to add this flag when we add AVR support to Rust properly. |
From a bystander perspective, the only checklist item in rust-lang#37609 not merged is "powidf2 / powisf2", and the LLVM change mentioned in the comments that's not in the checklist. Does this mean the world is near having rustc generating AVR binaries, or is there more work left that hasn't been mentioned yet? Anywhere near a timeframe guess? (like days, weeks, months) |
@dylanmckay So, since Rust is getting close to supporting LLVM 4.0, I decided to give compiling over here another shot. Strangely, it looks like LLVM is half-building the AVR support:
You can see my horrible hacks in progress at https://github.com/avr-rust/rust/tree/avr-support-4.0-wip |
Very weird. It looks like you haven't pushed some changes - when I open your |
@dylanmckay ah yes, I don't deal with submodules frequently so I tend to forget them. I've just pulled in the emscripten |
(pushed the submodule change now) |
Here's what I see:
Perhaps there was a mishap when LLVM 4.0 got merged into there? Maybe I've got the wrong branch? |
Oh, maybe I should be using |
Yep, that was it. I've updated the |
Well, maybe I should try to compile something first ;-) |
lol Definitely replace |
Perhaps I'm missing something, but this fork still contains all of the AVR-specific changes to Rust, which is distinct from the LLVM 4 changes. Do you foresee those being merged into Rust proper in the near future? |
Historically the 16-bit specific patches were pretty welcome into Rust proper. On top of this, my impression of the MSP430 backend:
I feel like if the MSP430 target could get used, surely the AVR backend (with a much bigger userbase to my knowledge) would also get merged. Also, in my experience, updating this repo is normally easier to just start from Rust master, |
Wew. Done in avr-support as 1db0bbf |
I get this in the tip of avr-support-4.0
This triggers it
The text was updated successfully, but these errors were encountered: