-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
powerpc support #20980
powerpc support #20980
Conversation
This borrowed entirely from the mips definitions, and should be revisited after it lands while testing.
@@ -55,7 +56,8 @@ fn align_of_basic() { | |||
#[cfg(any(target_arch = "x86", | |||
target_arch = "arm", | |||
target_arch = "mips", | |||
target_arch = "mipsel"))] | |||
target_arch = "mipsel", | |||
target_arch = "powerpc"))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, to stem the flow of these additional target_arch
settings, can you change this to be conditional on target_pointer_width
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. Ignore that other comment if it got emailed. Willfix.
This looks pretty good to me, thanks! I think we're definitely growing a real need for an extension to |
@@ -263,7 +263,7 @@ endif | |||
###################################################################### | |||
|
|||
# FIXME: x86-ism | |||
LLVM_COMPONENTS=x86 arm aarch64 mips ipo bitreader bitwriter linker asmparser mcjit \ | |||
LLVM_COMPONENTS=x86 arm aarch64 mips powerpc ipo bitreader bitwriter linker asmparser mcjit \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to this I think you'll also want to touch the llvm-auto-clean-trigger to ensure LLVM is rebuilt.
As I also requested on #19790, could you analyze the before/after sizes of the compiler? Just want to make sure LLVM isn't bringing too many megabyte wads of powerpc support! |
Awesome! Thanks so much for taking a look. I'll try to get these issues fixed tonight. Regarding the size of the compiler: After: I don't have a before handy, but I can build one before I get home. Comparison numbers from that PR: Before: (I'm not sure what the huge discrepancy with the stage3 rustc and my stage2 are, did a bunch of things move out into libs?) |
I cleaned up the issues in your comments, and grabbed a nightly to check on the sizes of the objects: From the nightly on rust-lang.org: 42M ./lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_llvm-4e7c5e5c.so I guess since I branched, some other LLVM changes must have landed? My librustc_llvm is 7 megs smaller. |
I finally made time to build the tree that I branched from, for comparison:
Is there anything else this needs for an r? @alexcrichton |
Originally, this was going to be discussed and revisted, however I've been working on this for months, and a rebase on top of master was about 1 flight's worth of work so I just went ahead and did it. This gets you as far as being able to target powerpc with, eg: LD_LIBRARY_PATH=./x86_64-unknown-linux-gnu/stage2/lib/ x86_64-unknown-linux-gnu/stage2/bin/rustc -C linker=powerpc-linux-gnu-gcc --target powerpc-unknown-linux-gnu hello.rs Would really love to get this out before 1.0. r? @alexcrichton
Nice. |
Originally, this was going to be discussed and revisted, however I've been working on this for months, and a rebase on top of master was about 1 flight's worth of work so I just went ahead and did it.
This gets you as far as being able to target powerpc with, eg:
Would really love to get this out before 1.0. r? @alexcrichton