Skip to content

rustbuild: Fix compile on OSX for 10.7 #32598

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

Merged
merged 1 commit into from
Apr 2, 2016

Conversation

alexcrichton
Copy link
Member

This commit should help configure our OSX rustbuild builder for targeting 10.7.
A key part of this is using libc++ instead of libstdc++ as apparently it's
more filled out and otherwise LLVM's cmake configuration would fail.

This commit should help configure our OSX rustbuild builder for targeting 10.7.
A key part of this is using `libc++` instead of `libstdc++` as apparently it's
more filled out and otherwise LLVM's cmake configuration would fail.
@rust-highfive
Copy link
Contributor

r? @nikomatsakis

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

// LLVM/jemalloc/etc are all properly compiled.
if target.contains("apple-darwin") {
base.push("-stdlib=libc++".into());
base.push("-mmacosx-version-min=10.7".into());
Copy link
Member

Choose a reason for hiding this comment

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

I think this is implied by the environment variable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah unfortunately I'll have to remove that b/c cmake right now chokes on the env var (at least locally). It seems to work if this is passed by flag instead though?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think they're equivalent ways of setting the version.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right to clang they're equivalent, but unfortunately not to cmake. Right now we're getting scary warnings on the bots:

CMake Warning at /usr/local/Cellar/cmake/3.5.0/share/cmake/Modules/Platform/Darwin-Initialize.cmake:97 (message):
  CMAKE_OSX_DEPLOYMENT_TARGET is '10.7' but the matching SDK does not exist
  at:

   "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"

  Instead using SDK:

   "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk".
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.5.0/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:18 (include)
  CMakeLists.txt:54 (project)

and for me locally with just the command line tools installed it's a hard error. Neither the warning nor the error happens with the argument version though.

@aturon
Copy link
Member

aturon commented Apr 1, 2016

@bors: r+

@bors
Copy link
Collaborator

bors commented Apr 1, 2016

📌 Commit 08ca5d9 has been approved by aturon

@bors
Copy link
Collaborator

bors commented Apr 2, 2016

⌛ Testing commit 08ca5d9 with merge 3ec71b0...

bors added a commit that referenced this pull request Apr 2, 2016
rustbuild: Fix compile on OSX for 10.7

This commit should help configure our OSX rustbuild builder for targeting 10.7.
A key part of this is using `libc++` instead of `libstdc++` as apparently it's
more filled out and otherwise LLVM's cmake configuration would fail.
@bors bors merged commit 08ca5d9 into rust-lang:master Apr 2, 2016
@alexcrichton alexcrichton deleted the rustbuild-osx branch May 2, 2016 18:45
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.

6 participants