-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Conversation
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 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()); |
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.
I think this is implied by the environment variable.
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.
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?
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.
Yeah, I think they're equivalent ways of setting the version.
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.
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.
@bors: r+ |
📌 Commit 08ca5d9 has been approved by |
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.
This commit should help configure our OSX rustbuild builder for targeting 10.7.
A key part of this is using
libc++
instead oflibstdc++
as apparently it'smore filled out and otherwise LLVM's cmake configuration would fail.