Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Issue 10389047: mac: Don't require DYLD_LIBRARY_PATH to be set when using the shared build. (Closed)

Created:
8 years, 7 months ago by Nico
Modified:
8 years, 6 months ago
Reviewers:
Mark Mentovai, jeremy
CC:
chromium-reviews
Visibility:
Public.

Description

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. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=139550

Patch Set 1 #

Patch Set 2 : works #

Patch Set 3 : rebase #

Patch Set 4 : no10.7 #

Patch Set 5 : simpler #

Total comments: 4

Patch Set 6 : comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -3 lines) Patch
M build/common.gypi View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M content/common/sandbox_mac.mm View 1 2 3 4 5 2 chunks +14 lines, -3 lines 2 comments Download

Messages

Total messages: 9 (0 generated)
Nico
This is the last missing piece for the mac components build, as far as I ...
8 years, 6 months ago (2012-05-30 04:38:26 UTC) #1
Mark Mentovai
LG otherwise http://codereview.chromium.org/10389047/diff/3007/build/common.gypi File build/common.gypi (right): http://codereview.chromium.org/10389047/diff/3007/build/common.gypi#newcode1281 build/common.gypi:1281: '@loader_path/.', Just '@loader_path' without the extra '/.' ...
8 years, 6 months ago (2012-05-30 13:38:22 UTC) #2
Nico
http://codereview.chromium.org/10389047/diff/3007/build/common.gypi File build/common.gypi (right): http://codereview.chromium.org/10389047/diff/3007/build/common.gypi#newcode1281 build/common.gypi:1281: '@loader_path/.', On 2012/05/30 13:38:22, Mark Mentovai wrote: > Just ...
8 years, 6 months ago (2012-05-30 15:03:29 UTC) #3
Mark Mentovai
LGTM
8 years, 6 months ago (2012-05-30 15:27:48 UTC) #4
Nico
thanks!
8 years, 6 months ago (2012-05-30 15:29:39 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/10389047/6009
8 years, 6 months ago (2012-05-30 15:36:40 UTC) #6
commit-bot: I haz the power
Presubmit check for 10389047-6009 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 6 months ago (2012-05-30 15:36:46 UTC) #7
jeremy
https://chromiumcodereview.appspot.com/10389047/diff/6009/content/common/sandbox_mac.mm File content/common/sandbox_mac.mm (right): https://chromiumcodereview.appspot.com/10389047/diff/6009/content/common/sandbox_mac.mm#newcode394 content/common/sandbox_mac.mm:394: stringByAppendingString:@"\n(allow file-read-metadata)\n"]; Please move these lines to the Sandbox ...
8 years, 6 months ago (2012-05-30 16:33:16 UTC) #8
Nico
8 years, 6 months ago (2012-05-30 16:38:33 UTC) #9
https://chromiumcodereview.appspot.com/10389047/diff/6009/content/common/sand...
File content/common/sandbox_mac.mm (right):

https://chromiumcodereview.appspot.com/10389047/diff/6009/content/common/sand...
content/common/sandbox_mac.mm:394: stringByAppendingString:@"\n(allow
file-read-metadata)\n"];
On 2012/05/30 16:33:17, jeremy wrote:
> Please move these lines to the Sandbox definition file together with a
> ;SOME_PREFIX which is then removed in component builds.  The rationale for
this
> is so it would be easy to see the whole sandbox definition in one place.
> 
> Also, is there a way we can limit this rule to just a specific subpath rather
> than allowing global filesystem access?

See bug, it needs file-read-metadata for the currently running binary. But since
this is just used with COMPONENT_BUILD set and running on 10.6, I figured
keeping things simple is the appropriate thing to do.

Powered by Google App Engine
This is Rietveld 408576698