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
DM-29563: add compilation flag_LIBCPP_DISABLE_AVAILABILITY=1 to allow use of st… #90
Conversation
ca94b6d
to
5920cd1
Compare
…d::variant/filesystem on pre 10.13 or 10.15 macos deployment platforms
5920cd1
to
f66cd1e
Compare
@TallJimbo any objections to this change to unlock {{C++17}} features in osx? |
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, I thought I'd hit "submit review" on this a while ago, but apparently it was still waiting for me.
I will take another look at the C++ changes in afw on this ticket as soon as I can, but that may not be until tomorrow.
@@ -192,6 +192,11 @@ def _initEnvironment(): | |||
# We want to be explicit about the OS X version we're targeting | |||
# | |||
env['ENV']['MACOSX_DEPLOYMENT_TARGET'] = env['macosx_deployment_target'] | |||
# This flag is required for std::variant and std::filesystem | |||
# on deployment platforms < 10.13 and 10.15 |
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.
So it's not needed for 10.13 and 10.14? I assume it does no harm for those versions?
I gather this forces linking against a particular libstdc++ (conda vs. xcode?). In either case, it would be good to extend the comment clarifying what this does to make std::variant
and std::filesystem
work. Or maybe that's a question for @erykoff ?
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.
So this is the right flag to set when building against conda libraries on macos. The point is that we don't want to check against availability of features against the system libraries because we don't use them. So the comment should be something like This flag is required to use new features like std::variant and std::filesystem on older macos. We build against conda libraries so we do not need to check if features are supported by system libraries.
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.
So what we are really saying is that the deployment target is irrelevant when running inside conda.
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.
Almost. (And our number has to be at least what conda-forge specifies which is 10.9). But when building for osx-arm64 (not the subject of this ticket!) it does actually matter.
This is the proposed change for ARM osx from another ticket
|
…d::variant/filesystem on pre 10.13 or 10.15 macos deployment platforms