OLD | NEW |
---|---|
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 'variables': { | 6 'variables': { |
7 # See native_client/Sconstruct for more details. | 7 # See native_client/Sconstruct for more details. |
8 # Expected address for beginning of data in for the IRT. | 8 # Expected address for beginning of data in for the IRT. |
9 'NACL_IRT_DATA_START': '0x3ef00000', | 9 'NACL_IRT_DATA_START': '0x3ef00000', |
10 # Expected address for beginning of code in for the IRT. | 10 # Expected address for beginning of code in for the IRT. |
11 'NACL_IRT_TEXT_START': '0x0fa00000', | 11 'NACL_IRT_TEXT_START': '0x0fa00000', |
12 'nacl_enable_arm_gcc%': 0, | |
13 # Default C compiler defines. | 12 # Default C compiler defines. |
14 'nacl_default_defines': [ | 13 'nacl_default_defines': [ |
15 '__linux__', | 14 '__linux__', |
16 '__STDC_LIMIT_MACROS=1', | 15 '__STDC_LIMIT_MACROS=1', |
17 '__STDC_FORMAT_MACROS=1', | 16 '__STDC_FORMAT_MACROS=1', |
18 '_GNU_SOURCE=1', | 17 '_GNU_SOURCE=1', |
19 '_BSD_SOURCE=1', | 18 '_BSD_SOURCE=1', |
20 '_POSIX_C_SOURCE=199506', | 19 '_POSIX_C_SOURCE=199506', |
21 '_XOPEN_SOURCE=600', | 20 '_XOPEN_SOURCE=600', |
22 'DYNAMIC_ANNOTATIONS_ENABLED=1', | 21 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 'defines': [], | 104 'defines': [], |
106 'sources': [], | 105 'sources': [], |
107 'compile_flags': [], | 106 'compile_flags': [], |
108 'link_flags': [], | 107 'link_flags': [], |
109 'include_dirs': [], | 108 'include_dirs': [], |
110 'variables': { | 109 'variables': { |
111 'python_exe': 'python', | 110 'python_exe': 'python', |
112 'nexe_target': '', | 111 'nexe_target': '', |
113 'nlib_target': '', | 112 'nlib_target': '', |
114 'nso_target': '', | 113 'nso_target': '', |
114 'force_arm_pnacl': 0, | |
115 'build_newlib': 0, | 115 'build_newlib': 0, |
116 'nacl_enable_arm_gcc%': 0, | |
117 'build_glibc': 0, | 116 'build_glibc': 0, |
118 'disable_glibc%': 1, | 117 'disable_glibc%': 1, |
119 'extra_args': [], | 118 'extra_args': [], |
120 'enable_x86_32': 0, | 119 'enable_x86_32': 0, |
121 'enable_x86_64': 0, | 120 'enable_x86_64': 0, |
122 'enable_arm': 1, | 121 'enable_arm': 1, |
123 'extra_deps_newlib_arm': [], | 122 'extra_deps_newlib_arm': [], |
124 'native_sources': [], | 123 'native_sources': [], |
125 'lib_dirs_newlib_arm': [], | 124 'lib_dirs_newlib_arm': [], |
126 'include_dirs': ['<(DEPTH)', '<(DEPTH)/ppapi'], | 125 'include_dirs': ['<(DEPTH)', '<(DEPTH)/ppapi'], |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
308 ], | 307 ], |
309 }, | 308 }, |
310 ], | 309 ], |
311 }], | 310 }], |
312 ], | 311 ], |
313 }, | 312 }, |
314 }], | 313 }], |
315 ['target_arch=="arm"', { | 314 ['target_arch=="arm"', { |
316 'target_defaults': { | 315 'target_defaults': { |
317 'target_conditions': [ | 316 'target_conditions': [ |
318 # GCC ARM build | 317 # GCC ARM build (the default) |
319 ['nacl_enable_arm_gcc!=0 and nexe_target!="" and build_newlib!=0', { | 318 ['force_arm_pnacl==0 and nexe_target!="" and build_newlib!=0', { |
320 'variables': { | 319 'variables': { |
321 'tool_name': 'newlib', | 320 'tool_name': 'newlib', |
322 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', | 321 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', |
323 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe ', | 322 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe ', |
324 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_ta rget_name)', | 323 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_ta rget_name)', |
325 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sour ce_list.gypcmd', | 324 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sour ce_list.gypcmd', |
326 }, | 325 }, |
327 'actions': [ | 326 'actions': [ |
328 { | 327 { |
329 'action_name': 'build newlib arm nexe', | 328 'action_name': 'build newlib arm nexe', |
(...skipping 12 matching lines...) Expand all Loading... | |
342 '<(DEPTH)/native_client/build/build_nexe.py', | 341 '<(DEPTH)/native_client/build/build_nexe.py', |
343 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', | 342 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', |
344 '>@(extra_args)', | 343 '>@(extra_args)', |
345 '--arch', 'arm', | 344 '--arch', 'arm', |
346 '--build', 'newlib_nexe', | 345 '--build', 'newlib_nexe', |
347 '--root', '<(DEPTH)', | 346 '--root', '<(DEPTH)', |
348 '--name', '>(out_newlib_arm)', | 347 '--name', '>(out_newlib_arm)', |
349 '--objdir', '>(objdir_newlib_arm)', | 348 '--objdir', '>(objdir_newlib_arm)', |
350 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include _dirs)', | 349 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include _dirs)', |
351 '--lib-dirs=>(lib_dirs_newlib_arm) ', | 350 '--lib-dirs=>(lib_dirs_newlib_arm) ', |
352 '--compile_flags=^(gcc_compile_flags) >(_gcc_compile_flags) ^( compile_flags) >(_compile_flags)', | 351 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi -mtp=so ft ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags) ', |
Derek Schuff
2013/03/28 17:49:31
putting this here is the equivalent of x86's use o
| |
353 '--defines=^(defines) >(_defines)', | 352 '--defines=^(defines) >(_defines)', |
354 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^( link_flags) >(_link_flags)', | 353 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^( link_flags) >(_link_flags)', |
355 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour ces) ^(native_sources))', | 354 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour ces) ^(native_sources))', |
356 ], | 355 ], |
357 }, | 356 }, |
358 ], | 357 ], |
359 }], | 358 }], |
360 # GCC ARM library build | 359 # GCC ARM library build (the default) |
361 ['nacl_enable_arm_gcc!=0 and nlib_target!="" and build_newlib!=0', { | 360 ['force_arm_pnacl==0 and nlib_target!="" and build_newlib!=0', { |
362 'variables': { | 361 'variables': { |
363 'tool_name': 'newlib', | 362 'tool_name': 'newlib', |
364 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', | 363 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', |
365 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib arm/>(nlib_target)', | 364 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib arm/>(nlib_target)', |
366 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar get_name)', | 365 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar get_name)', |
367 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc e_list.gypcmd', | 366 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc e_list.gypcmd', |
368 }, | 367 }, |
369 'actions': [ | 368 'actions': [ |
370 { | 369 { |
371 'action_name': 'build newlib arm nlib', | 370 'action_name': 'build newlib arm nlib', |
(...skipping 12 matching lines...) Expand all Loading... | |
384 '<(DEPTH)/native_client/build/build_nexe.py', | 383 '<(DEPTH)/native_client/build/build_nexe.py', |
385 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', | 384 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', |
386 '>@(extra_args)', | 385 '>@(extra_args)', |
387 '--arch', 'arm', | 386 '--arch', 'arm', |
388 '--build', 'newlib_nlib', | 387 '--build', 'newlib_nlib', |
389 '--root', '<(DEPTH)', | 388 '--root', '<(DEPTH)', |
390 '--name', '>(out_newlib_arm)', | 389 '--name', '>(out_newlib_arm)', |
391 '--objdir', '>(objdir_newlib_arm)', | 390 '--objdir', '>(objdir_newlib_arm)', |
392 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include _dirs)', | 391 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include _dirs)', |
393 '--lib-dirs=>(lib_dirs_newlib_arm)', | 392 '--lib-dirs=>(lib_dirs_newlib_arm)', |
394 '--compile_flags=^(gcc_compile_flags) >(_gcc_compile_flags) ^( compile_flags) >(_compile_flags)', | 393 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi -mtp=so ft ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags) ', |
395 '--defines=^(defines) >(_defines)', | 394 '--defines=^(defines) >(_defines)', |
396 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^( link_flags) >(_link_flags)', | 395 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^( link_flags) >(_link_flags)', |
397 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour ces) ^(native_sources))', | 396 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour ces) ^(native_sources))', |
398 ], | 397 ], |
399 }, | 398 }, |
400 ], | 399 ], |
401 }], | 400 }], |
402 # pnacl ARM build is the default (unless nacl_enable_arm_gcc is set) | 401 # pnacl ARM build (only used if force_arm_pnacl is set) |
Derek Schuff
2013/03/28 17:33:41
in the future we may be able to remove the pnacl A
Sam Clegg
2013/03/28 23:02:59
Yup. We should be able to completely remove this
| |
403 ['nacl_enable_arm_gcc==0 and nexe_target!="" and build_newlib!=0', { | 402 ['force_arm_pnacl==1 and nexe_target!="" and build_newlib!=0', { |
404 'variables': { | 403 'variables': { |
405 'tool_name': 'newlib', | 404 'tool_name': 'newlib', |
406 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', | 405 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', |
407 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe' , | 406 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe' , |
408 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar get_name)', | 407 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar get_name)', |
409 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc e_list.gypcmd', | 408 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc e_list.gypcmd', |
410 }, | 409 }, |
411 'actions': [ | 410 'actions': [ |
412 { | 411 { |
413 'action_name': 'build newlib arm nexe (via pnacl)', | 412 'action_name': 'build newlib arm nexe (via pnacl)', |
(...skipping 14 matching lines...) Expand all Loading... | |
428 '>@(extra_args)', | 427 '>@(extra_args)', |
429 '--arch', 'arm', | 428 '--arch', 'arm', |
430 '--build', 'newlib_nexe_pnacl', | 429 '--build', 'newlib_nexe_pnacl', |
431 '--root', '<(DEPTH)', | 430 '--root', '<(DEPTH)', |
432 '--name', '>(out_newlib_arm)', | 431 '--name', '>(out_newlib_arm)', |
433 '--objdir', '>(objdir_newlib_arm)', | 432 '--objdir', '>(objdir_newlib_arm)', |
434 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include _dirs)', | 433 '--include-dirs=<(inst_dir)/include ^(include_dirs) >(_include _dirs)', |
435 '--lib-dirs=>(lib_dirs_newlib_arm) ', | 434 '--lib-dirs=>(lib_dirs_newlib_arm) ', |
436 '--compile_flags=--pnacl-frontend-triple=armv7-unknown-nacl-gn ueabi -mfloat-abi=hard ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)', | 435 '--compile_flags=--pnacl-frontend-triple=armv7-unknown-nacl-gn ueabi -mfloat-abi=hard ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
437 '--defines=^(defines) >(_defines)', | 436 '--defines=^(defines) >(_defines)', |
438 '--link_flags=-arch arm --pnacl-allow-translate --pnacl-allow- native -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^(link_flags) >(_link_flags )', | 437 '--link_flags=-arch arm --pnacl-allow-translate --pnacl-allow- native -Wl,--pnacl-irt-link -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm ^(link _flags) >(_link_flags)', |
Derek Schuff
2013/03/28 17:33:41
pnacl-irt-link should no longer be necessary, espe
Sam Clegg
2013/03/28 23:02:59
I'm not sure its worth messing with this block rig
| |
439 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour ces))', | 438 '--source-list=^|(<(source_list_newlib_arm) ^(_sources) ^(sour ces))', |
440 ], | 439 ], |
441 }, | 440 }, |
442 ], | 441 ], |
443 }], | 442 }], |
444 # pnacl ARM library build | 443 # pnacl ARM library build |
445 ['nacl_enable_arm_gcc==0 and nlib_target!="" and build_newlib!=0', { | 444 ['force_arm_pnacl==1 and nlib_target!="" and build_newlib!=0', { |
446 'variables': { | 445 'variables': { |
447 'tool_name': 'newlib', | 446 'tool_name': 'newlib', |
448 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', | 447 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', |
449 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib arm/>(nlib_target)', | 448 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib arm/>(nlib_target)', |
450 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar get_name)', | 449 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_tar get_name)', |
451 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc e_list.gypcmd', | 450 'source_list_newlib_arm%': '<(tool_name)-arm.>(_target_name).sourc e_list.gypcmd', |
452 }, | 451 }, |
453 'actions': [ | 452 'actions': [ |
454 { | 453 { |
455 'action_name': 'build newlib arm nlib (via pnacl)', | 454 'action_name': 'build newlib arm nlib (via pnacl)', |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
757 # compiled with high level of optimizations and without debug info, | 756 # compiled with high level of optimizations and without debug info, |
758 # compiler is requested to generate unwind tables explicitly. This | 757 # compiler is requested to generate unwind tables explicitly. This |
759 # is the default behavior on x86-64 and when compiling C++ with | 758 # is the default behavior on x86-64 and when compiling C++ with |
760 # exceptions enabled, the change is for the benefit of x86-32 C. | 759 # exceptions enabled, the change is for the benefit of x86-32 C. |
761 # These are only required for the IRT but are here for all | 760 # These are only required for the IRT but are here for all |
762 # nacl-gcc-compiled binaries because the IRT depends on other libs | 761 # nacl-gcc-compiled binaries because the IRT depends on other libs |
763 '-fasynchronous-unwind-tables', | 762 '-fasynchronous-unwind-tables', |
764 ], | 763 ], |
765 'newlib_tls_flags': [ | 764 'newlib_tls_flags': [ |
766 # This option is currently only honored by x86/x64 builds. The | 765 # This option is currently only honored by x86/x64 builds. The |
767 # equivalent arm option is apparently -mtp=soft but we don't need use | 766 # equivalent arm option is apparently -mtp=soft but we don't need use |
Derek Schuff
2013/03/28 17:49:31
Maybe change this comment to
"This option is curre
Roland McGrath
2013/03/28 18:00:06
IMHO we should be consistent. -mtp=soft has exact
Sam Clegg
2013/03/28 23:02:59
Done. Made it consistent.
| |
768 # it at this point. | 767 # it at this point. |
769 '-mtls-use-call', | 768 '-mtls-use-call', |
770 ], | 769 ], |
771 'pnacl_compile_flags': [ | 770 'pnacl_compile_flags': [ |
772 '-Wno-extra-semi', | 771 '-Wno-extra-semi', |
773 '-Wno-unused-private-field', | 772 '-Wno-unused-private-field', |
774 ], | 773 ], |
775 }, | 774 }, |
776 'target_conditions': [ | 775 'target_conditions': [ |
777 ['nexe_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0', { | 776 ['nexe_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0', { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
935 '--defines=^(defines) >(_defines)', | 934 '--defines=^(defines) >(_defines)', |
936 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib ^(l ink_flags) >(_link_flags)', | 935 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib ^(l ink_flags) >(_link_flags)', |
937 '--source-list=^|(<(source_list_pnacl_newlib) ^(_sources) ^(source s))', | 936 '--source-list=^|(<(source_list_pnacl_newlib) ^(_sources) ^(source s))', |
938 ], | 937 ], |
939 }, | 938 }, |
940 ], | 939 ], |
941 }], | 940 }], |
942 ], | 941 ], |
943 }, | 942 }, |
944 } | 943 } |
OLD | NEW |