Skip to content

Commit

Permalink
add macosx_deployment_target flag
Browse files Browse the repository at this point in the history
Adds the ability to set the `MACOSX_DEPLOYMENT_TARGET`, which affects
ABI compatibility on OSX.

(patch by @mjuric)
  • Loading branch information
jhoblitt committed Feb 22, 2016
1 parent 147868e commit bca46e5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/lsst/sconsUtils/state.py
Expand Up @@ -106,6 +106,7 @@ def _initVariables():
('baseversion', 'Specify the current base version', None),
('optFiles', "Specify a list of files that SHOULD be optimized", None),
('noOptFiles', "Specify a list of files that should NOT be optimized", None),
('macosx_deployment_target', 'Deployment target for Mac OS X', '10.9'),
)


Expand Down Expand Up @@ -174,6 +175,12 @@ def _initEnvironment():
env.Append(SHLINKFLAGS=["-Wl,-install_name", "-Wl,${TARGET.file}"])
if not re.search(r"-headerpad_max_install_names", str(env['SHLINKFLAGS'])):
env.Append(SHLINKFLAGS=["-Wl,-headerpad_max_install_names"])
#
# We want to be explicit about the OS X version we're targeting
#
env['ENV']['MACOSX_DEPLOYMENT_TARGET'] = env['macosx_deployment_target']
log.info("Setting OS X binary compatibility level: %s" % env['ENV']['MACOSX_DEPLOYMENT_TARGET'])

#
# Remove valid options from the arguments
#
Expand Down

0 comments on commit bca46e5

Please sign in to comment.