Skip to content

Commit

Permalink
Don't hide any usd symbols on Mac for shared usd libs (#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienblor authored Jul 26, 2022
1 parent bfbbf40 commit 2113537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 6 additions & 6 deletions procedural/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ if system.IS_LINUX:
local_env.Append(LINKFLAGS = [ '-Wl,--exclude-libs=ALL' ])
local_env.Append(CXXFLAGS = [ '-fvisibility=hidden' ])
elif system.IS_DARWIN:
if local_env['ARNOLD_HAS_SCENE_FORMAT_API']:
if local_env['USD_BUILD_MODE'] == 'static':
# On Mac, we only hide symbols if we're linking against a static usd.
# Otherwise we get crashes e.g. with mayaUSD (see #1226)
if local_env['USD_BUILD_MODE'] == 'static':
if local_env['ARNOLD_HAS_SCENE_FORMAT_API']:
export_list = os.path.join(src_proc_dir, 'macos_export_list')
else:
export_list = os.path.join(src_proc_dir, 'macos_export_list_shared')
else:
export_list = os.path.join(src_proc_dir, 'macos_export_list_no_scene')
local_env.Append(LINKFLAGS = Split('-Xlinker -S -Xlinker -x -Xlinker -exported_symbols_list -Xlinker {} '.format(export_list)))
export_list = os.path.join(src_proc_dir, 'macos_export_list_no_scene')
local_env.Append(LINKFLAGS = Split('-Xlinker -S -Xlinker -x -Xlinker -exported_symbols_list -Xlinker {} '.format(export_list)))

# Build shared library for the Alembic procedural
USD = local_env.SharedLibrary('%s_proc' % local_env['USD_PROCEDURAL_NAME'], source_files, SHLIBPREFIX='')
Expand Down
5 changes: 0 additions & 5 deletions procedural/macos_export_list_shared

This file was deleted.

0 comments on commit 2113537

Please sign in to comment.