From 211353721d0e95548862ec736d223b3cbfc8d9ef Mon Sep 17 00:00:00 2001 From: Sebastien Blaineau-Ortega Date: Tue, 26 Jul 2022 19:14:21 +0200 Subject: [PATCH] Don't hide any usd symbols on Mac for shared usd libs (#1230) --- procedural/SConscript | 12 ++++++------ procedural/macos_export_list_shared | 5 ----- 2 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 procedural/macos_export_list_shared diff --git a/procedural/SConscript b/procedural/SConscript index 876a1ca16d..ad46af2d10 100755 --- a/procedural/SConscript +++ b/procedural/SConscript @@ -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='') diff --git a/procedural/macos_export_list_shared b/procedural/macos_export_list_shared deleted file mode 100644 index dbeeecad15..0000000000 --- a/procedural/macos_export_list_shared +++ /dev/null @@ -1,5 +0,0 @@ -_NodeLoader -_SceneFormatLoader -*pxrInternal_*Gf* -*pxrInternal_*Vt* -*pxrInternal_*Tf*