diff options
-rw-r--r-- | build/common.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_dll_bundle.gypi | 31 | ||||
-rwxr-xr-x | chrome/tools/build/mac/dump_product_syms | 1 | ||||
-rw-r--r-- | content/content_shell.gypi | 31 | ||||
-rw-r--r-- | mojo/mojo_public.gypi | 38 |
5 files changed, 76 insertions, 27 deletions
diff --git a/build/common.gypi b/build/common.gypi index cf57c63..11ab19d 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -846,7 +846,7 @@ 'enable_printing%': 0, }], - ['OS=="win" or (OS=="linux" and chromeos==0)', { + ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', { 'use_mojo%': 1, }], diff --git a/chrome/chrome_dll_bundle.gypi b/chrome/chrome_dll_bundle.gypi index a4b6d6c..dad94c1 100644 --- a/chrome/chrome_dll_bundle.gypi +++ b/chrome/chrome_dll_bundle.gypi @@ -128,6 +128,35 @@ '--branding=<(branding)'], }, { + # Copy libmojo_system.dylib explicitly. The copies section does a + # hard link, and since we modify it we would end up with the wrong + # load command in things linked afterward. + 'postbuild_name': 'Copy libmojo_system.dylib', + 'action': ['cp', + '-p', + '${BUILT_PRODUCTS_DIR}/libmojo_system.dylib', + '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Libraries'], + }, + { + # Changes the id of libmojo_system.dylib to come from the Libraries folder + # to be consistent with the load command. + 'postbuild_name': 'Update id of libmojo_system.dylib', + 'action': ['install_name_tool', + '-id', + '@loader_path/Libraries/libmojo_system.dylib', + '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Libraries/libmojo_system.dylib'], + }, + { + # Changes the load command of libmojo_system.dylib to come from + # the Libraries folder. + 'postbuild_name': 'Update load of libmojo_system.dylib', + 'action': ['install_name_tool', + '-change', + '@loader_path/libmojo_system.dylib', + '@loader_path/Libraries/libmojo_system.dylib', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'], + }, + { 'postbuild_name': 'Symlink Libraries', 'action': [ 'ln', @@ -139,7 +168,7 @@ ], 'copies': [ { - # Copy FFmpeg binaries for audio/video support. + # Copy FFmpeg binaries for audio/video support and mojo. 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries', 'files': [ '<(PRODUCT_DIR)/ffmpegsumo.so', diff --git a/chrome/tools/build/mac/dump_product_syms b/chrome/tools/build/mac/dump_product_syms index ad816f5..0d3eb3b 100755 --- a/chrome/tools/build/mac/dump_product_syms +++ b/chrome/tools/build/mac/dump_product_syms @@ -82,6 +82,7 @@ SRC_NAMES=( "crash_inspector" "crash_report_sender.app" "ffmpegsumo.so" + "libmojo_system.dylib" "libplugin_carbon_interpose.dylib" "ppGoogleNaClPluginChrome.plugin" "remoting_host_plugin.plugin" diff --git a/content/content_shell.gypi b/content/content_shell.gypi index 9290d49..6626619 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -853,10 +853,39 @@ '--version=<(content_shell_version)', '--branding=<(content_shell_product_name)'], }, + { + # Copy libmojo_system.dylib explicitly. The copies section does a + # hard link, and since we modify it we would end up with the wrong + # load command in things linked afterward. + 'postbuild_name': 'Copy libmojo_system.dylib', + 'action': ['cp', + '-p', + '${BUILT_PRODUCTS_DIR}/libmojo_system.dylib', + '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Libraries'], + }, + { + # Changes the id of libmojo_system.dylib to come from the + # Libraries folder to be consistent with the load command. + 'postbuild_name': 'Update id of libmojo_system.dylib', + 'action': ['install_name_tool', + '-id', + '@loader_path/Libraries/libmojo_system.dylib', + '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Libraries/libmojo_system.dylib'], + }, + { + # Changes the load command of libmojo_system.dylib to come from + # the Libraries folder. + 'postbuild_name': 'Update load of libmojo_system.dylib', + 'action': ['install_name_tool', + '-change', + '@loader_path/libmojo_system.dylib', + '@loader_path/Libraries/libmojo_system.dylib', + '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'], + }, ], 'copies': [ { - # Copy FFmpeg binaries for audio/video support. + # Copy FFmpeg for audio/video support and mojo. 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries', 'files': [ '<(PRODUCT_DIR)/ffmpegsumo.so', diff --git a/mojo/mojo_public.gypi b/mojo/mojo_public.gypi index aced237..12d139f 100644 --- a/mojo/mojo_public.gypi +++ b/mojo/mojo_public.gypi @@ -26,15 +26,17 @@ 'conditions': [ ['OS=="mac"', { 'xcode_settings': { - # Make it a run-path dependent library. - 'DYLIB_INSTALL_NAME_BASE': '@rpath', - }, - 'direct_dependent_settings': { - 'xcode_settings': { - # Look for run-path dependent libraries in the loader's directory. - 'LD_RUNPATH_SEARCH_PATHS': [ '@loader_path/.', ], - }, + # Make it a loader-path dependent library. + 'DYLIB_INSTALL_NAME_BASE': '@loader_path', }, + 'conditions': [ + ['mac_breakpad==1', { + 'variables': { + # A real .dSYM is needed for dump_syms to operate on. + 'mac_real_dsym': 1, + }, + }], + ], }], ], }, @@ -68,14 +70,8 @@ 'conditions': [ ['OS=="mac"', { 'xcode_settings': { - # Make it a run-path dependent library. - 'DYLIB_INSTALL_NAME_BASE': '@rpath', - }, - 'direct_dependent_settings': { - 'xcode_settings': { - # Look for run-path dependent libraries in the loader's directory. - 'LD_RUNPATH_SEARCH_PATHS': [ '@loader_path/.', ], - }, + # Make it a loader-path dependent library. + 'DYLIB_INSTALL_NAME_BASE': '@loader_path', }, }], ], @@ -103,14 +99,8 @@ 'conditions': [ ['OS=="mac"', { 'xcode_settings': { - # Make it a run-path dependent library. - 'DYLIB_INSTALL_NAME_BASE': '@rpath', - }, - 'direct_dependent_settings': { - 'xcode_settings': { - # Look for run-path dependent libraries in the loader's directory. - 'LD_RUNPATH_SEARCH_PATHS': [ '@loader_path/.', ], - }, + # Make it a loader-path dependent library. + 'DYLIB_INSTALL_NAME_BASE': '@loader_path', }, }], ], |