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

Unified Diff: chrome/nacl.gypi

Issue 7841008: Update chrome/nacl.gypi to fix chromeos build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Invoke nacl_helper ld directly as action Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_exe.gypi ('k') | chrome/nacl/nacl_fork_delegate_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/nacl.gypi
diff --git a/chrome/nacl.gypi b/chrome/nacl.gypi
index 000c5dc7f6513561badbd70c31f700893a31cf88..2cd8a811626e7cd3df77ce2fa9c21ce66d480097 100644
--- a/chrome/nacl.gypi
+++ b/chrome/nacl.gypi
@@ -236,18 +236,14 @@
],
},
{
- 'target_name': 'nacl_helper_bootstrap_raw',
- 'type': 'executable',
+ 'target_name': 'nacl_helper_bootstrap_lib',
+ 'type': 'static_library',
+ 'hard_depencency': 1,
'include_dirs': [
'..',
],
'sources': [
'nacl/nacl_helper_bootstrap_linux.c',
- # We list the linker script here for documentation purposes.
- # But even this doesn't make gyp treat it as a dependency,
- # so incremental builds won't relink when the script changes.
- # TODO(bradnelson): Fix the dependency handling.
- 'nacl/nacl_helper_bootstrap_linux.x',
],
'cflags': [
# The tiny standalone bootstrap program is incompatible with
@@ -263,27 +259,67 @@
'-fno-pic', '-fno-PIC',
'-fno-pie', '-fno-PIE',
],
- 'link_settings': {
- 'ldflags': [
- # TODO(bradchen): Delete the -B argument when Gold is verified
- # to produce good results with our custom linker script.
- # Until then use ld.bfd.
- '-B', '<(PRODUCT_DIR)/../../tools/ld_bfd',
- # This programs is (almost) entirely standalone. It has
- # its own startup code, so no crt1.o for it. It is
- # statically linked, and on x86 it actually does not use
- # libc at all. However, on ARM it needs a few (safe)
- # things from libc, so we don't use '-nostdlib' here.
- '-static', '-nostartfiles',
- # Link with our custom linker script to get out special layout.
- '-Wl,--script=<(PRODUCT_DIR)/../../chrome/nacl/nacl_helper_bootstrap_linux.x',
- # On x86-64, the default page size with some
- # linkers is 2M rather than the real Linux page
- # size of 4K. A larger page size is incompatible
- # with our custom linker script's special layout.
- '-Wl,-z,max-page-size=0x1000',
- ],
- },
+ },
+ {
+ 'target_name': 'nacl_helper_bootstrap_raw',
+ 'type': 'none',
+ 'dependencies': [
+ 'nacl_helper_bootstrap_lib',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'link_with_ld_bfd',
+ 'variables': {
+ # We list the linker script here for documentation purposes.
+ # But even this doesn't make gyp treat it as a dependency,
+ # so incremental builds won't relink when the script changes.
Evan Martin 2011/09/07 16:21:14 Why not list it as an input, and delete this comme
Brad Chen 2011/09/07 17:05:25 Can I list it as an input without having it show u
+ # TODO(bradnelson): Fix the dependency handling.
+ 'nacl_bootstrap_linker_script': '<(PRODUCT_DIR)/../../chrome/nacl/nacl_helper_bootstrap_linux.x',
+ },
+ 'inputs': [
+ '<(INTERMEDIATE_DIR)/../nacl_helper_bootstrap_lib/chrome/nacl/nacl_helper_bootstrap_linux.o',
Evan Martin 2011/09/07 16:21:14 INTERMEDIATE_DIR in gyp means "a temp directory th
Brad Chen 2011/09/07 17:05:25 Turns out it didn't work with INTERMEDIATE_DIR, bu
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/nacl_helper_bootstrap_raw',
+ ],
+ 'message': 'Linking nacl_helper_bootstrap_raw',
+ 'conditions': [
+ ['target_arch=="x64"', {
+ 'variables': {
+ 'linker_emulation': 'elf_x86_64',
+ }
+ }],
+ ['target_arch=="ia32"', {
+ 'variables': {
+ 'linker_emulation': 'elf_i386',
+ }
+ }],
+ ['target_arch=="arm"', {
+ 'variables': {
+ 'linker_emulation': 'arm',
+ }
+ }],
+ ],
+ 'action': ['<(PRODUCT_DIR)/../../tools/ld_bfd/ld',
Evan Martin 2011/09/07 16:21:14 actions are always run with cwd matching the .gyp
Brad Chen 2011/09/07 17:05:25 Done.
+ '-m', '<(linker_emulation)',
+ # This programs is (almost) entirely standalone. It
Evan Martin 2011/09/07 16:21:14 typo: program
Brad Chen 2011/09/07 17:05:25 Done.
+ # has its own startup code, so no crt1.o for it. It is
+ # statically linked, and on x86 it does not use
+ # libc at all. However, on ARM it needs a few (safe)
+ # things from libc, so we don't use '-nostdlib' here.
+ '-static',
+ '-o', '<@(_outputs)',
+ # Link with custom linker script for special layout.
+ '--script=<(nacl_bootstrap_linker_script)',
+ # On x86-64, the default page size with some
+ # linkers is 2M rather than the real Linux page
+ # size of 4K. A larger page size is incompatible
+ # with our custom linker script's special layout.
+ '-z', 'max-page-size=0x1000',
+ '<@(_inputs)',
Evan Martin 2011/09/07 16:21:14 (note when you adjust inputs above you'll need to
+ ],
+ }
+ ],
},
{
'target_name': 'nacl_helper_bootstrap',
@@ -301,7 +337,7 @@
'message': 'Munging ELF program header',
'action': ['python', '<@(_inputs)', '<@(_outputs)']
}],
- }
+ },
],
}],
],
« no previous file with comments | « chrome/chrome_exe.gypi ('k') | chrome/nacl/nacl_fork_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698