summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 17:05:31 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 17:05:31 +0000
commit2e85d47cd990ab6ec0dbf7df044e337e3fd872d1 (patch)
tree850e0411e53a7050741e681e2f6180df7dd8ab00
parenta7938c2c4e66de2c8318f386e587bfbee0c5667d (diff)
downloadchromium_src-2e85d47cd990ab6ec0dbf7df044e337e3fd872d1.zip
chromium_src-2e85d47cd990ab6ec0dbf7df044e337e3fd872d1.tar.gz
chromium_src-2e85d47cd990ab6ec0dbf7df044e337e3fd872d1.tar.bz2
Fixup mojo dylibs to support mojo in content
Second try after revert of https://codereview.chromium.org/211503005/ The isolates failed because libmojo_system.dylib wasn't getting copied. BUG= TBR=mark@chromium.org Review URL: https://codereview.chromium.org/217003003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260175 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/common.gypi2
-rw-r--r--chrome/chrome.isolate1
-rw-r--r--chrome/chrome_dll_bundle.gypi31
-rwxr-xr-xchrome/tools/build/mac/dump_product_syms1
-rw-r--r--content/content_shell.gypi31
-rw-r--r--mojo/mojo_public.gypi38
6 files changed, 77 insertions, 27 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 3e48647..e554a6a 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -871,7 +871,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.isolate b/chrome/chrome.isolate
index 104f471..d33cdeb 100644
--- a/chrome/chrome.isolate
+++ b/chrome/chrome.isolate
@@ -46,6 +46,7 @@
],
'isolate_dependency_tracked': [
'<(PRODUCT_DIR)/ffmpegsumo.so',
+ '<(PRODUCT_DIR)/libmojo_system.dylib',
],
'isolate_dependency_untracked': [
'<(PRODUCT_DIR)/<(mac_product_name) Framework.framework/',
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 d19cdc5..4c579ad 100644
--- a/content/content_shell.gypi
+++ b/content/content_shell.gypi
@@ -849,10 +849,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 71eda7b..024e10c 100644
--- a/mojo/mojo_public.gypi
+++ b/mojo/mojo_public.gypi
@@ -27,15 +27,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,
+ },
+ }],
+ ],
}],
],
},
@@ -69,14 +71,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',
},
}],
],
@@ -104,14 +100,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',
},
}],
],