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

Side by Side 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: Fix gyp portability issues, chromeos build 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_exe.gypi ('k') | chrome/nacl/nacl_fork_delegate_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 { 5 {
6 'target_defaults': { 6 'target_defaults': {
7 'variables': { 7 'variables': {
8 'nacl_target': 0, 8 'nacl_target': 0,
9 }, 9 },
10 'target_conditions': [ 10 'target_conditions': [
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 # would be if gyp were to really build properly for the host. 229 # would be if gyp were to really build properly for the host.
230 # TODO(bradnelson): Clean up with proper cross support. 230 # TODO(bradnelson): Clean up with proper cross support.
231 'conditions': [ 231 'conditions': [
232 ['host_arch=="x64"', { 232 ['host_arch=="x64"', {
233 'cflags/': [['exclude', '-m.*']], 233 'cflags/': [['exclude', '-m.*']],
234 'ldflags/': [['exclude', '-m.*']], 234 'ldflags/': [['exclude', '-m.*']],
235 }], 235 }],
236 ], 236 ],
237 }, 237 },
238 { 238 {
239 'target_name': 'nacl_helper_bootstrap_raw', 239 'target_name': 'nacl_helper_bootstrap_lib',
240 'type': 'executable', 240 'type': 'static_library',
Evan Martin 2011/09/07 19:13:03 Add here: 'product_dir': '<(SHARED_INTERMEDIATE_D
Brad Chen 2011/09/07 20:18:53 Done.
241 'hard_depencency': 1,
241 'include_dirs': [ 242 'include_dirs': [
242 '..', 243 '..',
243 ], 244 ],
244 'sources': [ 245 'sources': [
245 'nacl/nacl_helper_bootstrap_linux.c', 246 'nacl/nacl_helper_bootstrap_linux.c',
246 # We list the linker script here for documentation purposes.
247 # But even this doesn't make gyp treat it as a dependency,
248 # so incremental builds won't relink when the script changes.
249 # TODO(bradnelson): Fix the dependency handling.
250 'nacl/nacl_helper_bootstrap_linux.x',
251 ], 247 ],
252 'cflags': [ 248 'cflags': [
253 # The tiny standalone bootstrap program is incompatible with 249 # The tiny standalone bootstrap program is incompatible with
254 # -fstack-protector, which might be on by default. That switch 250 # -fstack-protector, which might be on by default. That switch
255 # requires using the standard libc startup code, which we do not. 251 # requires using the standard libc startup code, which we do not.
256 '-fno-stack-protector', 252 '-fno-stack-protector',
257 # We don't want to compile it PIC (or its cousin PIE), because 253 # We don't want to compile it PIC (or its cousin PIE), because
258 # it goes at an absolute address anyway, and because any kind 254 # it goes at an absolute address anyway, and because any kind
259 # of PIC complicates life for the x86-32 assembly code. We 255 # of PIC complicates life for the x86-32 assembly code. We
260 # append -fno-* flags here instead of using a 'cflags!' stanza 256 # append -fno-* flags here instead of using a 'cflags!' stanza
261 # to remove -f* flags, just in case some system's compiler 257 # to remove -f* flags, just in case some system's compiler
262 # defaults to using PIC for everything. 258 # defaults to using PIC for everything.
263 '-fno-pic', '-fno-PIC', 259 '-fno-pic', '-fno-PIC',
264 '-fno-pie', '-fno-PIE', 260 '-fno-pie', '-fno-PIE',
265 ], 261 ],
266 'link_settings': { 262 },
267 'ldflags': [ 263 {
268 # TODO(bradchen): Delete the -B argument when Gold is verified 264 'target_name': 'nacl_helper_bootstrap_raw',
269 # to produce good results with our custom linker script. 265 'type': 'none',
270 # Until then use ld.bfd. 266 'dependencies': [
271 '-B', '<(PRODUCT_DIR)/../../tools/ld_bfd', 267 'nacl_helper_bootstrap_lib',
272 # This programs is (almost) entirely standalone. It has 268 ],
273 # its own startup code, so no crt1.o for it. It is 269 'actions': [
274 # statically linked, and on x86 it actually does not use 270 {
275 # libc at all. However, on ARM it needs a few (safe) 271 'action_name': 'link_with_ld_bfd',
276 # things from libc, so we don't use '-nostdlib' here. 272 'variables': {
277 '-static', '-nostartfiles', 273 'bootstrap_lib': '<(LIB_DIR)/chrome/<(STATIC_LIB_PREFIX)nacl_hel per_bootstrap_lib<(STATIC_LIB_SUFFIX)',
Evan Martin 2011/09/07 19:13:03 ...and then here, you can use 'bootstrap_lib': '
Brad Chen 2011/09/07 20:18:53 Done.
278 # Link with our custom linker script to get out special layout. 274 'linker_script': 'nacl/nacl_helper_bootstrap_linux.x',
279 '-Wl,--script=<(PRODUCT_DIR)/../../chrome/nacl/nacl_helper_bootstr ap_linux.x', 275 },
280 # On x86-64, the default page size with some 276 # These inputs are restated explicitly in the action.
281 # linkers is 2M rather than the real Linux page 277 # Stating them here is necessary for dependency checking.
282 # size of 4K. A larger page size is incompatible 278 'inputs': [
283 # with our custom linker script's special layout. 279 '<(linker_script)',
284 '-Wl,-z,max-page-size=0x1000', 280 '<(bootstrap_lib)',
285 ], 281 ],
286 }, 282 'outputs': [
283 '<(PRODUCT_DIR)/nacl_helper_bootstrap_raw',
284 ],
285 'message': 'Linking nacl_helper_bootstrap_raw',
286 'conditions': [
287 ['target_arch=="x64"', {
288 'variables': {
289 'linker_emulation': 'elf_x86_64',
290 }
291 }],
292 ['target_arch=="ia32"', {
293 'variables': {
294 'linker_emulation': 'elf_i386',
295 }
296 }],
297 ['target_arch=="arm"', {
298 'variables': {
299 'linker_emulation': 'armelf_linux_eabi',
300 }
301 }],
302 ],
303 'action': ['../tools/ld_bfd/ld',
304 '-m', '<(linker_emulation)',
305 # This program is (almost) entirely standalone. It
306 # has its own startup code, so no crt1.o for it. It is
307 # statically linked, and on x86 it does not use
308 # libc at all. However, on ARM it needs a few (safe)
309 # things from libc.
310 '-static',
311 # State a path for finding libc.a.
312 '-L/usr/lib',
313 # Link with custom linker script for special layout.
314 '--script=<(linker_script)',
315 '-o', '<@(_outputs)',
316 # On x86-64, the default page size with some
317 # linkers is 2M rather than the real Linux page
318 # size of 4K. A larger page size is incompatible
319 # with our custom linker script's special layout.
320 '-z', 'max-page-size=0x1000',
321 '--whole-archive', '<(bootstrap_lib)',
322 '--no-whole-archive',
323 # -lc is needed by ARM and does no harm elsewhere
324 '-lc'
325 ],
326 }
327 ],
287 }, 328 },
288 { 329 {
289 'target_name': 'nacl_helper_bootstrap', 330 'target_name': 'nacl_helper_bootstrap',
290 'dependencies': [ 331 'dependencies': [
291 'nacl_helper_bootstrap_raw', 332 'nacl_helper_bootstrap_raw',
292 'nacl_helper_bootstrap_munge_phdr#host', 333 'nacl_helper_bootstrap_munge_phdr#host',
293 ], 334 ],
294 'type': 'none', 335 'type': 'none',
295 'actions': [{ 336 'actions': [{
296 'action_name': 'munge_phdr', 337 'action_name': 'munge_phdr',
297 'inputs': ['nacl/nacl_helper_bootstrap_munge_phdr.py', 338 'inputs': ['nacl/nacl_helper_bootstrap_munge_phdr.py',
298 '<(PRODUCT_DIR)/nacl_helper_bootstrap_munge_phdr', 339 '<(PRODUCT_DIR)/nacl_helper_bootstrap_munge_phdr',
299 '<(PRODUCT_DIR)/nacl_helper_bootstrap_raw'], 340 '<(PRODUCT_DIR)/nacl_helper_bootstrap_raw'],
300 'outputs': ['<(PRODUCT_DIR)/nacl_helper_bootstrap'], 341 'outputs': ['<(PRODUCT_DIR)/nacl_helper_bootstrap'],
301 'message': 'Munging ELF program header', 342 'message': 'Munging ELF program header',
302 'action': ['python', '<@(_inputs)', '<@(_outputs)'] 343 'action': ['python', '<@(_inputs)', '<@(_outputs)']
303 }], 344 }],
304 } 345 },
305 ], 346 ],
306 }], 347 }],
307 ], 348 ],
308 } 349 }
OLDNEW
« 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