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

Projects
None yet
7 participants
@brson
Copy link
Contributor

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

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jun 3, 2016

r? @alexcrichton

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

@brson brson force-pushed the brson:cmake branch from 453ff0c to 1323179 Jun 3, 2016

@brson

This comment has been minimized.

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 brson:cmake branch 2 times, most recently from 4f7700b to 26cdf06 Jun 3, 2016

mk/rt.mk Outdated

endif
endif
endif

This comment has been minimized.

@alexcrichton

alexcrichton Jun 4, 2016

Member

This is totally a readable makefile now!

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 4, 2016

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

This comment has been minimized.

Copy link
Member

shepmaster commented Jun 5, 2016

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

@brson

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor Author

brson commented Jun 6, 2016

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

@brson

This comment has been minimized.

Copy link
Contributor Author

brson commented Jun 6, 2016

Exporting MACOSX_DEPLOYMENT_TARGET=10.7 didn't help.

@brson brson force-pushed the brson:cmake branch from c1b1b85 to 61c792f Jun 6, 2016

@brson

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor Author

brson commented Jun 6, 2016

@alexcrichton does rustbuild definitely work on os x?

@brson

This comment has been minimized.

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

This comment has been minimized.

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.

@brson brson force-pushed the brson:cmake branch from 61c792f to bbcfa53 Jun 6, 2016

@shepmaster

This comment has been minimized.

Copy link
Member

shepmaster commented Jun 6, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 6, 2016

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 brson:cmake branch 4 times, most recently from 474b1d3 to aebdccf Jun 6, 2016

@brson

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor

bors commented Jun 7, 2016

📌 Commit aebdccf has been approved by brson

@sanxiyn

This comment has been minimized.

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

Auto merge of #34055 - brson:cmake, r=brson
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

This comment has been minimized.

Copy link
Contributor

bors commented Jun 7, 2016

⌛️ Testing commit aebdccf with merge 3c55e21...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 7, 2016

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

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 22, 2016

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

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 22, 2016

guh and of course travis is broken...

@alexcrichton alexcrichton force-pushed the brson:cmake branch from 71be23a to ca66f0a Jun 22, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 22, 2016

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 alexcrichton force-pushed the brson:cmake branch from ca66f0a to 59db95b Jun 22, 2016

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 22, 2016

Ok, parallelism should be fixed

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 22, 2016

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 22, 2016

📌 Commit 59db95b has been approved by alexcrichton

@bors

This comment has been minimized.

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

Auto merge of #34055 - brson:cmake, r=alexcrichton
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

This comment has been minimized.

Copy link
Contributor

bors commented Jun 22, 2016

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

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 22, 2016

@bors: retry

  • weird lldb error on OSX?
@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 22, 2016

error may be related to #33391

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 22, 2016

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

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 22, 2016

@bors: retry

  • umm... Contention?

On Wednesday, June 22, 2016, bors notifications@github.com 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 added a commit that referenced this pull request Jun 23, 2016

Auto merge of #34055 - brson:cmake, r=alexcrichton
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

This comment has been minimized.

Copy link
Contributor

bors commented Jun 23, 2016

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

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 23, 2016

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

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 24, 2016

@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

This comment has been minimized.

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

Auto merge of #34055 - brson:cmake, r=alexcrichton
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

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@brson

This comment has been minimized.

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
You can’t perform that action at this time.