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

DM-29563: add compilation flag_LIBCPP_DISABLE_AVAILABILITY=1 to allow use of st… #90

Merged
merged 1 commit into from May 4, 2021

Conversation

mwittgen
Copy link
Contributor

…d::variant/filesystem on pre 10.13 or 10.15 macos deployment platforms

…d::variant/filesystem on pre 10.13 or 10.15 macos deployment platforms
@mwittgen
Copy link
Contributor Author

mwittgen commented May 4, 2021

@TallJimbo any objections to this change to unlock {{C++17}} features in osx?

Copy link
Member

@TallJimbo TallJimbo left a 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
Copy link
Member

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 ?

Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor

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.

@mwittgen
Copy link
Contributor Author

mwittgen commented May 4, 2021

This is the proposed change for ARM osx from another ticket

import os
import platform
import re
import shlex

@@ -89,6 +90,10 @@ def _initVariables():
        files.append("buildOpts.py")
    global opts
    opts = SCons.Script.Variables(files)
    if(platform.mac_ver()[2] == 'arm64'):
        macos_deployment_target='11.0'
    else:
        macos_deployment_target='10.9'

@mwittgen mwittgen merged commit 18ee0a6 into master May 4, 2021
@mwittgen mwittgen deleted the tickets/DM-29563 branch May 4, 2021 21:33
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.

None yet

4 participants