Skip to content
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

Convert makefiles to build LLVM/compiler-rt with CMake #34055

Merged
merged 1 commit into from
Jun 24, 2016

Conversation

brson
Copy link
Contributor

@brson brson commented Jun 3, 2016

This is certainly buggy, but I have successfully built on x86_64-unknown-linux-gnu and x86_64-pc-windows-gnu. I haven't built successfully on mac yet, and I've seen mysterious test failures on Linux, but I'm interested in throwing this at the bots to see what they think.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Copy link
Contributor Author

brson commented Jun 3, 2016

FWIW re the mac failures: I was trying to build this on rust-mac6 and couldn't get it to recognize C++11 atomics. I'm not sure why this would be but I'm sort of crossing my fingers that clang is out of date there?

@brson brson force-pushed the cmake branch 2 times, most recently from 4f7700b to 26cdf06 Compare June 3, 2016 02:09

endif
endif
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is totally a readable makefile now!

@alexcrichton
Copy link
Member

I vaguely remember that OSX failure not being spurious in rustbuild and fixing it through setting MACOSX_DEPLOYMENT_TARGET, but other than that r=me when this is ready.

This will probably bounce quite a few times as we figure out how to actually build compiler-rt for all the cross platforms, I don't think rustbuild is even prepared to do that everywhere (especially Android).

@shepmaster
Copy link
Member

I tangentially asked this on the Internals forum, but why put the effort into updating the Makefiles instead of charging ahead with rustbuild?

@brson
Copy link
Contributor Author

brson commented Jun 6, 2016

@shepmaster @alexcrichton says we're not going to be ready to remove the makefiles soon, and I want to have emscripten support soon.

@brson
Copy link
Contributor Author

brson commented Jun 6, 2016

@alexcrichton why aren't we going to be able to remove the makefiles soon?

@brson
Copy link
Contributor Author

brson commented Jun 6, 2016

Exporting MACOSX_DEPLOYMENT_TARGET=10.7 didn't help.

@brson
Copy link
Contributor Author

brson commented Jun 6, 2016

I figured out that the -stdlib=libc++ flag makes #import <atomic> work, but can't see how to make the cmake atomic config check pass that flag. -DLLVM_ENABLE_LIBCXX=ON doesn't do it.

@brson
Copy link
Contributor Author

brson commented Jun 6, 2016

@alexcrichton does rustbuild definitely work on os x?

@brson
Copy link
Contributor Author

brson commented Jun 6, 2016

Er, I can run cmake by hand successfully, so I must have the script messed up.

@brson
Copy link
Contributor Author

brson commented Jun 6, 2016

OK, I think it must have been a corrupted local configuration. Seems to be working now.

@shepmaster
Copy link
Member

shepmaster commented Jun 6, 2016 via email

@alexcrichton
Copy link
Member

Some messages on IRC ---

15:52 <~acrichto> brson: yeah rustbuild osx works (gated)
15:52 <~acrichto> you're right about -stdlib though, that's the flag not 
                  DEPLOYMENT_VERSION
15:52 <~acrichto> and it all comes back...
15:52 <~acrichto> brson: if you mirror the rustbuild cmake exactly it should in 
                  theory work
15:53 <~acrichto> brson: I think it's this -- 
https://github.com/rust-lang/rust/blob/master/src/bootstrap/build/mod.rs#L808
15:53 <~acrichto> you may have already found that...

But yeah I was misremembering MACOSX_DEPLOYMENT_VERSION, it's just -stdlib in CFLAGS somehow

@brson brson force-pushed the cmake branch 4 times, most recently from 474b1d3 to aebdccf Compare June 7, 2016 00:47
@brson
Copy link
Contributor Author

brson commented Jun 7, 2016

I've built successfully on OS X and am going to send this through the bots to see what happens.

@bors r+

@bors
Copy link
Contributor

bors commented Jun 7, 2016

📌 Commit aebdccf has been approved by brson

@sanxiyn
Copy link
Member

sanxiyn commented Jun 7, 2016

It seems that this will break Travis, because Ubuntu package installs LLVMConfig.cmake in a place different from what compiler-rt build system expects. I am trying to figure out how to unbreak.

bors added a commit that referenced this pull request Jun 7, 2016
Convert makefiles to build LLVM/compiler-rt with CMake

This is certainly buggy, but I have successfully built on x86_64-unknown-linux-gnu and x86_64-pc-windows-gnu. I haven't built successfully on mac yet, and I've seen mysterious test failures on Linux, but I'm interested in throwing this at the bots to see what they think.
@bors
Copy link
Contributor

bors commented Jun 7, 2016

⌛ Testing commit aebdccf with merge 3c55e21...

@bors
Copy link
Contributor

bors commented Jun 7, 2016

💔 Test failed - auto-mac-cross-ios-opt

@alexcrichton
Copy link
Member

I think this is finally ready to go. If I could quantify the amount of money it took to test this in dev I'd probably be sad, so I won't do that!

Need to restart buildbot to pick up some changes to the images, then I'll r+

@alexcrichton
Copy link
Member

guh and of course travis is broken...

@alexcrichton
Copy link
Member

Ok, some more hacks that were applied:

  • In the docker image on Travis we now somewhat-randomly symlink some folders to coerce compiler-rt to pick up the system LLVM correctly.
  • A few patches were applied to compiler-rt to coerce it to compile:

One glaring hole is that make -j10 does not compile LLVM in parallel right now. I have no idea why and I'm still trying to figure that out...

@alexcrichton
Copy link
Member

Ok, parallelism should be fixed

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jun 22, 2016

📌 Commit 59db95b has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jun 22, 2016

⌛ Testing commit 59db95b with merge b592b3c...

bors added a commit that referenced this pull request Jun 22, 2016
Convert makefiles to build LLVM/compiler-rt with CMake

This is certainly buggy, but I have successfully built on x86_64-unknown-linux-gnu and x86_64-pc-windows-gnu. I haven't built successfully on mac yet, and I've seen mysterious test failures on Linux, but I'm interested in throwing this at the bots to see what they think.
@bors
Copy link
Contributor

bors commented Jun 22, 2016

💔 Test failed - auto-mac-64-opt-rustbuild

@alexcrichton
Copy link
Member

@bors: retry

  • weird lldb error on OSX?

@alexcrichton
Copy link
Member

error may be related to #33391

@bors
Copy link
Contributor

bors commented Jun 22, 2016

💔 Test failed - auto-linux-64-x-android-t

@alexcrichton
Copy link
Member

@bors: retry

  • umm... Contention?

On Wednesday, June 22, 2016, bors [email protected] wrote:

💔 Test failed - auto-linux-64-x-android-t
http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/9521


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#34055 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAD95BrxFR1hs6z_PqTAvF5eDuEJ7ZuBks5qOYmBgaJpZM4ItJAC
.

@bors
Copy link
Contributor

bors commented Jun 23, 2016

⌛ Testing commit 59db95b with merge 930eb8a...

@bors
Copy link
Contributor

bors commented Jun 23, 2016

💔 Test failed - auto-linux-64-x-android-t

@alexcrichton
Copy link
Member

@bors: retry

Looks like it's stuck compiling stage1 libsyntax but I can't seem to reproduce it locally. Hoping that it's just contention locally...

@bors
Copy link
Contributor

bors commented Jun 24, 2016

⌛ Testing commit 59db95b with merge 8c63d12...

bors added a commit that referenced this pull request Jun 24, 2016
Convert makefiles to build LLVM/compiler-rt with CMake

This is certainly buggy, but I have successfully built on x86_64-unknown-linux-gnu and x86_64-pc-windows-gnu. I haven't built successfully on mac yet, and I've seen mysterious test failures on Linux, but I'm interested in throwing this at the bots to see what they think.
@bors bors merged commit 59db95b into rust-lang:master Jun 24, 2016
@brson
Copy link
Contributor Author

brson commented Jun 27, 2016

Wow I'm shocked this got through. Thanks for fixing it @alexcrichton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants