From 286d9a10f8e0ea6b12c182c8dbe8552b6624e5df Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Wed, 30 May 2012 16:20:38 +0000 Subject: mac: Don't require DYLD_LIBRARY_PATH to be set when using the shared build. Set the install name of all dylibs to @rpath. Set the rpath of all executables to '@loader_path/.' (for normal binaries) and '@loader_path/../../..' (for bundled binaries). Also, Chromium Helper.app doesn't end up in out/Release but somewhere below Chromium.app, so set its rpath to '@loader_path/../../../../../../..' to get all the way back to out/Release. Also add "(allow file-read-metadata)" to the sandbox definition when running on 10.6 or earlier when using the component build, to work around a bug in dyld (see http://crbug.com/127465). BUG=90078,127465 TEST=Do a components build. DYLD_LIBRARY_PATH isn't necessary at build time, and isn't necessary when running chromium or test binaries. Review URL: https://chromiumcodereview.appspot.com/10389047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139550 0039d316-1c4b-4281-b951-d872f2087c98 --- build/common.gypi | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'build') diff --git a/build/common.gypi b/build/common.gypi index 479e5f4..62dad147 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1273,6 +1273,17 @@ }, { # else: branding!="Chrome" 'defines': ['CHROMIUM_BUILD'], }], + ['OS=="mac" and component=="shared_library"', { + 'xcode_settings': { + 'DYLIB_INSTALL_NAME_BASE': '@rpath', + 'LD_RUNPATH_SEARCH_PATHS': [ + # For unbundled binaries. + '@loader_path/.', + # For bundled binaries, to get back from Binary.app/Contents/MacOS. + '@loader_path/../../..', + ], + }, + }], ['branding=="Chrome" and (OS=="win" or OS=="mac")', { 'defines': ['ENABLE_RLZ'], }], -- cgit v1.1