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
3 # found in the LICENSE file.
8 # Enable -Werror by default, but put it in a variable so it can
9 # be optionally disabled.
16 '<(DEPTH)/native_client/build/build_nexe.py',
18 # Horrible hack: postfix the product-dir with a fake child.
19 # Without this hack, MSVS will expand the PRODUCT_DIR variable to a path
20 # with a trailing backslash, and that backslash will escape the rightmost
21 # quote around the path causing serious problems parsing the resulting
22 # command line. The fake child prevents an accidental escape while also
23 # being robust against GYP's attempt to normalize the path.
24 # Technically this hack is only needed for Windows, but conditional logic
25 # would just make things uglier.
26 '--product-dir', '<(PRODUCT_DIR)/xyz',
27 '--config-name', '<(CONFIGURATION_NAME)',
28 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
30 # Default C compiler defines.
31 'nacl_default_defines': [
32 '__STDC_LIMIT_MACROS=1',
33 '__STDC_FORMAT_MACROS=1',
37 '_POSIX_C_SOURCE=199506',
39 'DYNAMIC_ANNOTATIONS_ENABLED=1',
40 'DYNAMIC_ANNOTATIONS_PREFIX=NACL_',
42 'nacl_default_compile_flags': [
43 #'-std=gnu99', Added by build_nexe
47 '-fdiagnostics-show-option',
50 # The flag gomadir is one of the flag to enable goma on build_nexe.py.
51 # It should be set only if use_goma is true.
57 'TOOLCHAIN_OS': 'linux',
59 'TOOLCHAIN_OS': '<(OS)',
64 ['target_arch=="ia32" or target_arch=="x64"', {
65 # Common defaults for all x86 nacl-gcc targets
79 'build_nonsfi_helper': 0,
87 'enable_x86_32_nonsfi': 0,
88 'nacl_glibc_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc',
89 'nacl_newlib_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib',
90 'tc_lib_dir_newlib32': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32',
91 'tc_lib_dir_newlib64': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64',
92 'tc_lib_dir_glibc32': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32',
93 'tc_lib_dir_glibc64': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64',
94 'tc_lib_dir_irt32': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/lib32',
95 'tc_lib_dir_irt64': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/lib64',
96 'tc_lib_dir_nonsfi_helper32': '<(SHARED_INTERMEDIATE_DIR)/tc_nonsfi_helper/lib32',
97 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include',
98 'tc_include_dir_glibc': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/include',
100 'extra_deps_newlib64': [],
101 'extra_deps_newlib32': [],
102 'extra_deps_glibc64': [],
103 'extra_deps_glibc32': [],
104 'extra_deps_newlib32_nonsfi': [],
105 'include_dirs': ['<(DEPTH)'],
107 '<@(nacl_default_defines)',
108 'NACL_BUILD_ARCH=x86',
112 # X86-32 IRT needs to be callable with an under-aligned stack so we
113 # disable SSE instructions, which can fault on misaligned addresses:
114 # see https://code.google.com/p/nativeclient/issues/detail?id=3935
115 'irt_flags_x86_32': '-Wt,-mattr=-sse',
119 ['target_arch=="arm"', {
120 # Common defaults for all ARM nacl-gcc targets
135 'build_nonsfi_helper': 0,
137 'disable_bionic%': 1,
143 'enable_x86_32_nonsfi': 0,
145 'extra_deps_newlib_arm': [],
146 'extra_deps_bionic_arm': [],
147 'native_sources': [],
148 'nacl_glibc_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_glibc',
149 'nacl_newlib_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_newlib',
150 'tc_lib_dir_bionic_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_bionic/libarm',
151 'tc_lib_dir_newlib_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm',
152 'tc_lib_dir_irt_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/libarm',
153 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include',
154 'tc_include_dir_bionic': '<(SHARED_INTERMEDIATE_DIR)/tc_bionic/include',
155 'include_dirs': ['<(DEPTH)'],
157 '<@(nacl_default_defines)',
158 'NACL_BUILD_ARCH=arm',
165 ['target_arch=="mipsel"', {
166 # Common defaults for all mips pnacl-clang targets
180 'build_nonsfi_helper': 0,
182 'disable_bionic%': 1,
188 'enable_x86_32_nonsfi': 0,
190 'extra_deps_newlib_mips': [],
191 'native_sources': [],
192 'nacl_glibc_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_mips_glibc',
193 'nacl_newlib_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_mips_newlib',
194 'tc_lib_dir_newlib_mips': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libmips',
195 'tc_lib_dir_irt_mips': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/libmips',
196 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include',
197 'include_dirs': ['<(DEPTH)'],
199 '<@(nacl_default_defines)',
200 'NACL_BUILD_ARCH=mips',
207 ['target_arch=="ia32" or target_arch=="x64"', {
209 # x86-64 newlib nexe action
210 'target_conditions': [
211 ['nexe_target!="" and build_newlib!=0 and enable_x86_64!=0', {
213 'tool_name': 'newlib',
214 'out_newlib64%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x64.nexe',
215 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
219 'action_name': 'build newlib x86-64 nexe',
221 'source_list_newlib64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
223 'msvs_cygwin_shell': 0,
224 'description': 'building >(out_newlib64)',
226 '<(DEPTH)/native_client/build/build_nexe.py',
227 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
229 '>@(extra_deps_newlib64)',
230 '^(source_list_newlib64)',
231 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
233 'outputs': ['>(out_newlib64)'],
238 '--build', 'newlib_nexe',
239 '--name', '>(out_newlib64)',
240 '--objdir', '>(objdir_newlib64)',
241 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
242 '--compile_flags=-m64 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
243 '--gomadir', '<(gomadir)',
244 '--defines=^(defines) >(_defines)',
245 '--link_flags=-B>(tc_lib_dir_newlib64) ^(link_flags) >(_link_flags)',
246 '--source-list=^(source_list_newlib64)',
251 # x86-64 newlib library action
252 ['nlib_target!="" and build_newlib!=0 and enable_x86_64!=0', {
254 'tool_name': 'newlib',
255 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
256 'out_newlib64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nlib_target)',
260 'action_name': 'build newlib x86-64 nlib',
262 'source_list_newlib64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
264 'msvs_cygwin_shell': 0,
265 'description': 'building >(out_newlib64)',
267 '<(DEPTH)/native_client/build/build_nexe.py',
268 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
270 '>@(extra_deps_newlib64)',
271 '^(source_list_newlib64)',
272 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
274 'outputs': ['>(out_newlib64)'],
279 '--build', 'newlib_nlib',
280 '--name', '>(out_newlib64)',
281 '--objdir', '>(objdir_newlib64)',
282 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
283 '--compile_flags=-m64 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
284 '--gomadir', '<(gomadir)',
285 '--defines=^(defines) >(_defines)',
286 '--link_flags=-B>(tc_lib_dir_newlib64) ^(link_flags) >(_link_flags)',
287 '--source-list=^(source_list_newlib64)',
292 # x86-64 IRT nexe action
293 ['nexe_target!="" and build_irt!=0 and enable_x86_64!=0', {
296 'out_newlib64%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x64.nexe',
297 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
301 'action_name': 'build IRT x86-64 nexe',
303 'source_list_newlib64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
305 'msvs_cygwin_shell': 0,
306 'description': 'building >(out_newlib64)',
308 '<(DEPTH)/native_client/build/build_nexe.py',
309 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
311 '>@(extra_deps_newlib64)',
312 '^(source_list_newlib64)',
313 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
314 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
316 'outputs': ['>(out_newlib64)'],
321 '--build', 'newlib_nexe_pnacl',
322 '--name', '>(out_newlib64)',
323 '--objdir', '>(objdir_newlib64)',
324 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
325 '--compile_flags=--target=x86_64-unknown-nacl -stdlib=libstdc++ ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
326 '--gomadir', '<(gomadir)',
327 '--defines=^(defines) >(_defines)',
328 '--link_flags=--target=x86_64-unknown-nacl -stdlib=libstdc++ -arch x86-64 --pnacl-allow-translate --pnacl-allow-native -B>(tc_lib_dir_irt64) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)',
329 '--source-list=^(source_list_newlib64)',
330 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
336 # x86-64 IRT library action
337 ['nlib_target!="" and build_irt!=0 and enable_x86_64!=0', {
340 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
341 'out_newlib64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nlib_target)',
345 'action_name': 'build irt x86-64 nlib',
347 'source_list_newlib64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
349 'msvs_cygwin_shell': 0,
350 'description': 'building >(out_newlib64)',
352 '<(DEPTH)/native_client/build/build_nexe.py',
353 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
355 '>@(extra_deps_newlib64)',
356 '^(source_list_newlib64)',
357 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
359 'outputs': ['>(out_newlib64)'],
364 '--build', 'newlib_nlib_pnacl',
365 '--name', '>(out_newlib64)',
366 '--objdir', '>(objdir_newlib64)',
367 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
368 '--compile_flags=--target=x86_64-unknown-nacl -stdlib=libstdc++ ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
369 '--gomadir', '<(gomadir)',
370 '--defines=^(defines) >(_defines)',
371 '--link_flags=--target=x86_64-unknown-nacl -stdlib=libstdc++ -B>(tc_lib_dir_irt64) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)',
372 '--source-list=^(source_list_newlib64)',
377 # x86-32 newlib nexe action
378 ['nexe_target!="" and build_newlib!=0 and enable_x86_32!=0', {
380 'tool_name': 'newlib',
381 'out_newlib32%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x32.nexe',
382 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
386 'action_name': 'build newlib x86-32 nexe',
388 'source_list_newlib32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
390 'msvs_cygwin_shell': 0,
391 'description': 'building >(out_newlib32)',
393 '<(DEPTH)/native_client/build/build_nexe.py',
394 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
396 '>@(extra_deps_newlib32)',
397 '^(source_list_newlib32)',
398 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
400 'outputs': ['>(out_newlib32)'],
405 '--build', 'newlib_nexe',
406 '--name', '>(out_newlib32)',
407 '--objdir', '>(objdir_newlib32)',
408 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
409 '--compile_flags=-m32 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
410 '--gomadir', '<(gomadir)',
411 '--defines=^(defines) >(_defines)',
412 '--link_flags=-m32 -B>(tc_lib_dir_newlib32) ^(link_flags) >(_link_flags)',
413 '--source-list=^(source_list_newlib32)',
418 # x86-32 newlib library action
419 ['nlib_target!="" and build_newlib!=0 and enable_x86_32!=0', {
421 'tool_name': 'newlib',
422 'out_newlib32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nlib_target)',
423 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
427 'action_name': 'build newlib x86-32 nlib',
429 'source_list_newlib32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
431 'msvs_cygwin_shell': 0,
432 'description': 'building >(out_newlib32)',
434 '<(DEPTH)/native_client/build/build_nexe.py',
435 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
437 '>@(extra_deps_newlib32)',
438 '^(source_list_newlib32)',
439 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
441 'outputs': ['>(out_newlib32)'],
446 '--build', 'newlib_nlib',
447 '--name', '>(out_newlib32)',
448 '--objdir', '>(objdir_newlib32)',
449 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
450 '--compile_flags=-m32 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
451 '--gomadir', '<(gomadir)',
452 '--defines=^(defines) >(_defines)',
453 '--link_flags=-m32 -B>(tc_lib_dir_newlib32) ^(link_flags) >(_link_flags)',
454 '--source-list=^(source_list_newlib32)',
459 # x86-32 IRT nexe build
460 ['nexe_target!="" and build_irt!=0 and enable_x86_32!=0', {
463 'out_newlib32%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x32.nexe',
464 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
468 'action_name': 'build IRT x86-32 nexe',
470 'source_list_newlib32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
472 'msvs_cygwin_shell': 0,
473 'description': 'building >(out_newlib32)',
475 '<(DEPTH)/native_client/build/build_nexe.py',
476 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
478 '>@(extra_deps_newlib32)',
479 '^(source_list_newlib32)',
480 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
481 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
483 'outputs': ['>(out_newlib32)'],
488 '--build', 'newlib_nexe_pnacl',
489 '--name', '>(out_newlib32)',
490 '--objdir', '>(objdir_newlib32)',
491 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
492 '--compile_flags=--target=i686-unknown-nacl -stdlib=libstdc++ ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
493 '--gomadir', '<(gomadir)',
494 '--defines=^(defines) >(_defines)',
496 '--link_flags=--target=i686-unknown-nacl -stdlib=libstdc++ -arch x86-32 --pnacl-allow-translate --pnacl-allow-native >(irt_flags_x86_32) -B>(tc_lib_dir_irt32) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)',
497 '--source-list=^(source_list_newlib32)',
498 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
504 # x86-32 IRT library build
505 ['nlib_target!="" and build_irt!=0 and enable_x86_32!=0', {
508 'out_newlib32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nlib_target)',
509 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
513 'action_name': 'build IRT x86-32 nlib',
515 'source_list_newlib32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
517 'msvs_cygwin_shell': 0,
518 'description': 'building >(out_newlib32)',
520 '<(DEPTH)/native_client/build/build_nexe.py',
521 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
523 '>@(extra_deps_newlib32)',
524 '^(source_list_newlib32)',
525 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
527 'outputs': ['>(out_newlib32)'],
532 '--build', 'newlib_nlib_pnacl',
533 '--name', '>(out_newlib32)',
534 '--objdir', '>(objdir_newlib32)',
535 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
536 '--compile_flags=--target=i686-unknown-nacl -stdlib=libstdc++ >(irt_flags_x86_32) ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
537 '--gomadir', '<(gomadir)',
538 '--defines=^(defines) >(_defines)',
539 '--link_flags=--target=i686-unknown-nacl -stdlib=libstdc++ -B>(tc_lib_dir_irt32) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)',
540 '--source-list=^(source_list_newlib32)',
547 }], # end x86 gcc nexe/nlib actions
548 ['(target_arch=="ia32" or target_arch=="x64") and OS=="linux"', {
550 'target_conditions': [
551 # x86-32 non-SFI helper nexe build.
552 ['nexe_target!="" and build_nonsfi_helper!=0', {
554 'tool_name': 'nonsfi_helper',
555 'out_newlib32_nonsfi%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x32_nonsfi.nexe',
556 'objdir_newlib32_nonsfi%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
560 'action_name': 'build non-SFI helper x86-32 nexe',
562 'source_list_newlib32_nonsfi%': '^|(<(tool_name)-x86-32-nonsfi.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
563 'stdlibs': ['-lc++', '-lm', '-lnacl', '-lc', '-lpnaclmm'],
565 'msvs_cygwin_shell': 0,
566 'description': 'building >(out_newlib32_nonsfi)',
568 '<(DEPTH)/native_client/build/build_nexe.py',
569 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
571 '>@(extra_deps_newlib32_nonsfi)',
572 '^(source_list_newlib32_nonsfi)',
573 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
575 'outputs': ['>(out_newlib32_nonsfi)'],
579 '--arch', 'x86-32-nonsfi',
580 '--build', 'newlib_nexe_pnacl',
581 '--name', '>(out_newlib32_nonsfi)',
582 '--objdir', '>(objdir_newlib32_nonsfi)',
583 '--include-dirs=>(tc_include_dir_newlib) <(DEPTH)/native_client/src/public/linux_syscalls ^(include_dirs) >(_include_dirs)',
584 '--compile_flags=--target=i686-unknown-nacl --pnacl-bias=x86-32-nonsfi ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
585 '--gomadir', '<(gomadir)',
586 '--defines=^(defines) >(_defines)',
587 # Both -Wl,--noirt and -Wt,--noirt are needed here. The
588 # former is to prevent linking to irt. The latter controls
589 # the entry point for Non-SFI NaCl in pnacl-translate.
590 # "-nodefaultlibs -Wl,--starg-group, ... -Wl,--end-group"
591 # is the flags to exclude -lpthread, otherwise it causes
592 # library not found error. Note that pthread related code
593 # is contained in libnacl_sys_private.a, which is
594 # automatically linked.
595 '--link_flags=--target=i686-unknown-nacl -arch x86-32-nonsfi --pnacl-allow-translate --pnacl-allow-native -Wl,--noirt -Wt,--noirt -Wt,--noirtshim -B>(tc_lib_dir_nonsfi_helper32) ^(link_flags) >(_link_flags) -nodefaultlibs -Wl,--start-group >@(stdlibs) -Wl,--end-group',
596 '--source-list=^(source_list_newlib32_nonsfi)',
602 # x86-32 non-SFI helper library build or PNaCl PPAPI shim for nonsfi
604 ['nlib_target!="" and (build_nonsfi_helper!=0 or (pnacl_native_biased!=0 and enable_x86_32_nonsfi==1))', {
606 'tool_name': 'nonsfi_helper',
607 'out_newlib32_nonsfi%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nlib_target)',
608 'objdir_newlib32_nonsfi%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32-nonsfi/>(_target_name)',
612 'action_name': 'build nonsfi_helper x86-32 nlib',
614 'source_list_newlib32_nonsfi%': '^|(<(tool_name)-x86-32-nonsfi.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
616 'msvs_cygwin_shell': 0,
617 'description': 'building >(out_newlib32_nonsfi)',
619 '<(DEPTH)/native_client/build/build_nexe.py',
620 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
622 '>@(extra_deps_newlib32_nonsfi)',
623 '^(source_list_newlib32_nonsfi)',
624 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
626 'outputs': ['>(out_newlib32_nonsfi)'],
630 '--arch', 'x86-32-nonsfi',
631 '--build', 'newlib_nlib_pnacl',
632 '--name', '>(out_newlib32_nonsfi)',
633 '--objdir', '>(objdir_newlib32_nonsfi)',
634 '--include-dirs=>(tc_include_dir_newlib) <(DEPTH)/native_client/src/public/linux_syscalls ^(include_dirs) >(_include_dirs)',
635 '--compile_flags=--target=i686-unknown-nacl --pnacl-bias=x86-32-nonsfi --pnacl-allow-translate --pnacl-allow-native -arch x86-32-nonsfi ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
636 '--gomadir', '<(gomadir)',
637 '--defines=^(defines) >(_defines)',
638 '--link_flags=-B>(tc_lib_dir_nonsfi_helper32) ^(link_flags) >(_link_flags)',
639 '--source-list=^(source_list_newlib32_nonsfi)',
646 }], # end x86-32 Non-SFI helper nexe / library actions.
647 ['target_arch=="arm"', {
649 'target_conditions': [
650 # arm newlib nexe action
651 ['nexe_target!="" and build_newlib!=0', {
653 'tool_name': 'newlib',
654 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe',
655 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_target_name)',
659 'action_name': 'build newlib arm nexe',
661 'source_list_newlib_arm%': '^|(<(tool_name)-arm.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
663 'msvs_cygwin_shell': 0,
664 'description': 'building >(out_newlib_arm)',
666 '<(DEPTH)/native_client/build/build_nexe.py',
667 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources) >(native_sources))',
669 '>@(extra_deps_newlib_arm)',
670 '^(source_list_newlib_arm)',
671 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_newlib/stamp.prep',
673 'outputs': ['>(out_newlib_arm)'],
678 '--build', 'newlib_nexe',
679 '--name', '>(out_newlib_arm)',
680 '--objdir', '>(objdir_newlib_arm)',
681 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
682 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
683 '--gomadir', '<(gomadir)',
684 '--defines=^(defines) >(_defines)',
685 '--link_flags=-B>(tc_lib_dir_newlib_arm) ^(link_flags) >(_link_flags)',
686 '--source-list=^(source_list_newlib_arm)',
691 # arm newlib library action
692 ['nlib_target!="" and build_newlib!=0', {
694 'tool_name': 'newlib',
695 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>(nlib_target)',
696 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_target_name)',
700 'action_name': 'build newlib arm nlib',
702 'source_list_newlib_arm%': '^|(<(tool_name)-arm.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
704 'msvs_cygwin_shell': 0,
705 'description': 'building >(out_newlib_arm)',
707 '<(DEPTH)/native_client/build/build_nexe.py',
708 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources) >(native_sources))',
710 '>@(extra_deps_newlib_arm)',
711 '^(source_list_newlib_arm)',
712 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_newlib/stamp.prep',
714 'outputs': ['>(out_newlib_arm)'],
719 '--build', 'newlib_nlib',
720 '--name', '>(out_newlib_arm)',
721 '--objdir', '>(objdir_newlib_arm)',
722 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
723 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
724 '--gomadir', '<(gomadir)',
725 '--defines=^(defines) >(_defines)',
726 '--link_flags=-B>(tc_lib_dir_newlib_arm) ^(link_flags) >(_link_flags)',
727 '--source-list=^(source_list_newlib_arm)',
732 ['nlib_target!="" and build_bionic!=0 and disable_bionic==0', {
734 'tool_name': 'bionic',
735 'out_bionic_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>(nlib_target)',
736 'objdir_bionic_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_target_name)',
740 'action_name': 'build bionic arm nlib',
742 'source_list_bionic_arm%': '^|(<(tool_name)-arm.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
744 'msvs_cygwin_shell': 0,
745 'description': 'building >(out_bionic_arm)',
747 '<(DEPTH)/native_client/build/build_nexe.py',
748 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources) >(native_sources))',
750 '>@(extra_deps_bionic_arm)',
751 '^(source_list_bionic_arm)',
752 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86_nacl_arm/nacl_arm_bionic',
754 'outputs': ['>(out_bionic_arm)'],
759 '--build', 'bionic_nlib',
760 '--name', '>(out_bionic_arm)',
761 '--objdir', '>(objdir_bionic_arm)',
762 '--include-dirs=>(tc_include_dir_bionic) ^(include_dirs) >(_include_dirs)',
763 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
764 '--gomadir', '<(gomadir)',
765 '--defines=^(defines) >(_defines)',
766 '--link_flags=-B>(tc_lib_dir_bionic_arm) ^(link_flags) >(_link_flags)',
767 '--source-list=^(source_list_bionic_arm)',
772 # arm irt nexe action
773 ['nexe_target!="" and build_irt!=0', {
776 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe',
777 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_target_name)',
781 'action_name': 'build IRT arm nexe',
783 'source_list_newlib_arm%': '^|(<(tool_name)-arm.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
785 'msvs_cygwin_shell': 0,
786 'description': 'building >(out_newlib_arm)',
788 '<(DEPTH)/native_client/build/build_nexe.py',
789 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources) >(native_sources))',
791 '>@(extra_deps_newlib_arm)',
792 '^(source_list_newlib_arm)',
793 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_newlib/stamp.prep',
794 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
796 'outputs': ['>(out_newlib_arm)'],
801 '--build', 'newlib_nexe',
802 '--name', '>(out_newlib_arm)',
803 '--objdir', '>(objdir_newlib_arm)',
804 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
805 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
806 '--gomadir', '<(gomadir)',
807 '--defines=^(defines) >(_defines)',
808 '--link_flags=-B>(tc_lib_dir_irt_arm) ^(gcc_irt_link_flags) ^(link_flags) >(_link_flags)',
809 '--source-list=^(source_list_newlib_arm)',
810 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
816 # arm IRT library action
817 ['nlib_target!="" and build_irt!=0', {
820 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>(nlib_target)',
821 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_target_name)',
825 'action_name': 'build IRT arm nlib',
827 'source_list_newlib_arm%': '^|(<(tool_name)-arm.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
829 'msvs_cygwin_shell': 0,
830 'description': 'building >(out_newlib_arm)',
832 '<(DEPTH)/native_client/build/build_nexe.py',
833 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources) >(native_sources))',
835 '>@(extra_deps_newlib_arm)',
836 '^(source_list_newlib_arm)',
837 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_newlib/stamp.prep',
839 'outputs': ['>(out_newlib_arm)'],
844 '--build', 'newlib_nlib',
845 '--name', '>(out_newlib_arm)',
846 '--objdir', '>(objdir_newlib_arm)',
847 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
848 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
849 '--gomadir', '<(gomadir)',
850 '--defines=^(defines) >(_defines)',
851 '--link_flags=-B>(tc_lib_dir_irt_arm) ^(gcc_irt_link_flags) ^(link_flags) >(_link_flags)',
852 '--source-list=^(source_list_newlib_arm)',
857 ], # end target_conditions for arm newlib (nexe/nlib)
859 }], # end target_arch = arm
860 ['target_arch=="mipsel"', {
862 'target_conditions': [
863 # mips newlib nexe action
864 ['nexe_target!="" and build_newlib!=0', {
866 'tool_name': 'newlib',
867 'out_newlib_mips%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_mips32.nexe',
868 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)',
872 'action_name': 'build newlib mips nexe',
874 'source_list_newlib_mips%': '^|(<(tool_name)-mips.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
876 'msvs_cygwin_shell': 0,
877 'description': 'building >(out_newlib_mips)',
879 '<(DEPTH)/native_client/build/build_nexe.py',
880 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources) >(native_sources))',
882 '>@(extra_deps_newlib_mips)',
883 '^(source_list_newlib_mips)',
884 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
886 'outputs': ['>(out_newlib_mips)'],
891 '--build', 'newlib_nexe',
892 '--name', '>(out_newlib_mips)',
893 '--objdir', '>(objdir_newlib_mips)',
894 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
895 '--compile_flags=^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
896 '--gomadir', '<(gomadir)',
897 '--defines=^(defines) >(_defines)',
898 '--link_flags=-arch mips -B>(tc_lib_dir_newlib_mips) ^(link_flags) >(_link_flags)',
899 '--source-list=^(source_list_newlib_mips)',
904 # mips newlib library action
905 ['nlib_target!="" and build_newlib!=0', {
907 'tool_name': 'newlib',
908 'out_newlib_mips%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libmips/>(nlib_target)',
909 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)',
913 'action_name': 'build newlib mips nlib',
915 'source_list_newlib_mips%': '^|(<(tool_name)-mips.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
917 'msvs_cygwin_shell': 0,
918 'description': 'building >(out_newlib_mips)',
920 '<(DEPTH)/native_client/build/build_nexe.py',
921 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
923 '>@(extra_deps_newlib_mips)',
924 '^(source_list_newlib_mips)',
925 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
927 'outputs': ['>(out_newlib_mips)'],
932 '--build', 'newlib_nlib',
933 '--name', '>(out_newlib_mips)',
934 '--objdir', '>(objdir_newlib_mips)',
935 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
936 '--compile_flags=^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
937 '--gomadir', '<(gomadir)',
938 '--defines=^(defines) >(_defines)',
939 '--link_flags=-B>(tc_lib_dir_newlib_mips) ^(link_flags) >(_link_flags)',
940 '--source-list=^(source_list_newlib_mips)',
945 # mips irt nexe action
946 ['nexe_target!="" and build_irt!=0', {
949 'out_newlib_mips%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_mips32.nexe',
950 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)',
954 'action_name': 'build IRT mips nexe',
956 'source_list_newlib_mips%': '^|(<(tool_name)-mips.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
958 'msvs_cygwin_shell': 0,
959 'description': 'building >(out_newlib_mips)',
961 '<(DEPTH)/native_client/build/build_nexe.py',
962 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
964 '>@(extra_deps_newlib_mips)',
965 '^(source_list_newlib_mips)',
966 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
967 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
969 'outputs': ['>(out_newlib_mips)'],
974 '--build', 'newlib_nexe',
975 '--name', '>(out_newlib_mips)',
976 '--objdir', '>(objdir_newlib_mips)',
977 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
978 '--compile_flags=-stdlib=libstdc++ ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
979 '--gomadir', '<(gomadir)',
980 '--defines=^(defines) >(_defines)',
981 '--link_flags=-arch mips -stdlib=libstdc++ --pnacl-allow-translate --pnacl-allow-native -Wt,-mtls-use-call --pnacl-disable-abi-check -B>(tc_lib_dir_irt_mips) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)',
982 '--source-list=^(source_list_newlib_mips)',
983 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
989 # mips IRT library action
990 ['nlib_target!="" and build_irt!=0', {
993 'out_newlib_mips%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libmips/>(nlib_target)',
994 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)',
998 'action_name': 'build IRT mips nlib',
1000 'source_list_newlib_mips%': '^|(<(tool_name)-mips.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1002 'msvs_cygwin_shell': 0,
1003 'description': 'building >(out_newlib_mips)',
1005 '<(DEPTH)/native_client/build/build_nexe.py',
1006 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1008 '>@(extra_deps_newlib_mips)',
1009 '^(source_list_newlib_mips)',
1010 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
1012 'outputs': ['>(out_newlib_mips)'],
1017 '--build', 'newlib_nlib',
1018 '--name', '>(out_newlib_mips)',
1019 '--objdir', '>(objdir_newlib_mips)',
1020 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
1021 '--compile_flags=-stdlib=libstdc++ -Wt,-mtls-use-call ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1022 '--gomadir', '<(gomadir)',
1023 '--defines=^(defines) >(_defines)',
1024 '--link_flags=-stdlib=libstdc++ -B>(tc_lib_dir_irt_mips) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)',
1025 '--source-list=^(source_list_newlib_mips)',
1030 ], # end target_conditions for mips newlib
1032 }], # end target_arch = mips
1033 ['target_arch=="ia32" or target_arch=="x64"', {
1034 'target_defaults': {
1035 # x86-64 glibc nexe action
1036 'target_conditions': [
1037 ['nexe_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_glibc==0', {
1039 'tool_name': 'glibc',
1040 'out_glibc64%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x64.nexe',
1041 'objdir_glibc64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
1045 'action_name': 'build glibc x86-64 nexe',
1047 'source_list_glibc64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1049 'msvs_cygwin_shell': 0,
1050 'description': 'building >(out_glibc64)',
1052 '<(DEPTH)/native_client/build/build_nexe.py',
1053 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1055 '>@(extra_deps_glibc64)',
1056 '^(source_list_glibc64)',
1057 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1059 'outputs': ['>(out_glibc64)'],
1064 '--build', 'glibc_nexe',
1065 '--name', '>(out_glibc64)',
1066 '--objdir', '>(objdir_glibc64)',
1067 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1068 '--compile_flags=-m64 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1069 '--gomadir', '<(gomadir)',
1070 '--defines=^(defines) >(_defines)',
1071 '--link_flags=-B>(tc_lib_dir_glibc64) ^(link_flags) >(_link_flags)',
1072 '--source-list=^(source_list_glibc64)',
1077 # x86-32 glibc nexe action
1078 ['nexe_target!="" and build_glibc!=0 and enable_x86_32!=0 and disable_glibc==0', {
1080 'tool_name': 'glibc',
1081 'out_glibc32%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x32.nexe',
1082 'objdir_glibc32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
1086 'action_name': 'build glibc x86-32 nexe',
1088 'source_list_glibc32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1090 'msvs_cygwin_shell': 0,
1091 'description': 'building >(out_glibc32)',
1093 '<(DEPTH)/native_client/build/build_nexe.py',
1094 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1096 '>@(extra_deps_glibc32)',
1097 '^(source_list_glibc32)',
1098 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1100 'outputs': ['>(out_glibc32)'],
1105 '--build', 'glibc_nexe',
1106 '--name', '>(out_glibc32)',
1107 '--objdir', '>(objdir_glibc32)',
1108 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1109 '--compile_flags=-m32 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1110 '--gomadir', '<(gomadir)',
1111 '--defines=^(defines) >(_defines)',
1112 '--link_flags=-m32 -B>(tc_lib_dir_glibc32) ^(link_flags) >(_link_flags)',
1113 '--source-list=^(source_list_glibc32)',
1118 # x86-64 glibc static library action
1119 ['nlib_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_glibc==0', {
1121 'tool_name': 'glibc',
1122 'objdir_glibc64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
1123 'out_glibc64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nlib_target)',
1127 'action_name': 'build glibc x86-64 nlib',
1129 'source_list_glibc64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1131 'msvs_cygwin_shell': 0,
1132 'description': 'building >(out_glibc64)',
1134 '<(DEPTH)/native_client/build/build_nexe.py',
1135 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1137 '>@(extra_deps_glibc64)',
1138 '^(source_list_glibc64)',
1139 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1141 'outputs': ['>(out_glibc64)'],
1146 '--build', 'glibc_nlib',
1147 '--name', '>(out_glibc64)',
1148 '--objdir', '>(objdir_glibc64)',
1149 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1150 '--compile_flags=-m64 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1151 '--gomadir', '<(gomadir)',
1152 '--defines=^(defines) >(_defines)',
1153 '--link_flags=-B>(tc_lib_dir_glibc64) ^(link_flags) >(_link_flags)',
1154 '--source-list=^(source_list_glibc64)',
1159 # x86-32 glibc static library action
1160 ['nlib_target!="" and build_glibc!=0 and enable_x86_32!=0 and disable_glibc==0', {
1162 'tool_name': 'glibc',
1163 'out_glibc32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nlib_target)',
1164 'objdir_glibc32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
1168 'action_name': 'build glibc x86-32 nlib',
1170 'source_list_glibc32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1172 'msvs_cygwin_shell': 0,
1173 'description': 'building >(out_glibc32)',
1175 '<(DEPTH)/native_client/build/build_nexe.py',
1176 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1178 '>@(extra_deps_glibc32)',
1179 '^(source_list_glibc32)',
1180 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1182 'outputs': ['>(out_glibc32)'],
1187 '--build', 'glibc_nlib',
1188 '--name', '>(out_glibc32)',
1189 '--objdir', '>(objdir_glibc32)',
1190 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1191 '--compile_flags=-m32 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1192 '--gomadir', '<(gomadir)',
1193 '--defines=^(defines) >(_defines)',
1194 '--link_flags=-m32 -B>(tc_lib_dir_glibc32) ^(link_flags) >(_link_flags)',
1195 '--source-list=^(source_list_glibc32)',
1200 # x86-64 glibc shared library action
1201 ['nso_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_glibc==0', {
1203 'tool_name': 'glibc',
1204 'objdir_glibc64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64-so/>(_target_name)',
1205 'out_glibc64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nso_target)',
1209 'action_name': 'build glibc x86-64 nso',
1211 'source_list_glibc64%': '^|(<(tool_name)-x86-64-so.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1213 'msvs_cygwin_shell': 0,
1214 'description': 'building >(out_glibc64)',
1216 '<(DEPTH)/native_client/build/build_nexe.py',
1217 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1219 '>@(extra_deps_glibc64)',
1220 '^(source_list_glibc64)',
1221 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1223 'outputs': ['>(out_glibc64)'],
1228 '--build', 'glibc_nso',
1229 '--name', '>(out_glibc64)',
1230 '--objdir', '>(objdir_glibc64)',
1231 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1232 '--compile_flags=-m64 -fPIC ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1233 '--gomadir', '<(gomadir)',
1234 '--defines=^(defines) >(_defines)',
1235 '--link_flags=-B>(tc_lib_dir_glibc64) ^(link_flags) >(_link_flags)',
1236 '--source-list=^(source_list_glibc64)',
1241 # x86-32 glibc shared library action
1242 ['nso_target!="" and build_glibc!=0 and enable_x86_32!=0 and disable_glibc==0', {
1244 'tool_name': 'glibc',
1245 'out_glibc32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nso_target)',
1246 'objdir_glibc32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32-so/>(_target_name)',
1250 'action_name': 'build glibc x86-32 nso',
1252 'source_list_glibc32%': '^|(<(tool_name)-x86-32-so.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1254 'msvs_cygwin_shell': 0,
1255 'description': 'building >(out_glibc32)',
1257 '<(DEPTH)/native_client/build/build_nexe.py',
1258 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1260 '>@(extra_deps_glibc32)',
1261 '^(source_list_glibc32)',
1262 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1264 'outputs': ['>(out_glibc32)'],
1269 '--build', 'glibc_nso',
1270 '--name', '>(out_glibc32)',
1271 '--objdir', '>(objdir_glibc32)',
1272 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1273 '--compile_flags=-m32 -fPIC ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1274 '--gomadir', '<(gomadir)',
1275 '--defines=^(defines) >(_defines)',
1276 '--link_flags=-m32 -B>(tc_lib_dir_glibc32) ^(link_flags) >(_link_flags)',
1277 '--source-list=^(source_list_glibc32)',
1282 ], # end target_conditions for glibc (nexe/nlib/nso, x86-32/64)
1284 }], # end target_arch == ia32 or x64
1286 'target_defaults': {
1287 'gcc_compile_flags': [],
1288 'pnacl_compile_flags': [],
1290 'disable_pnacl%': 0,
1291 'build_pnacl_newlib': 0,
1292 # Flag to translate pexes into nexes at build time (vs in the browser).
1293 'translate_pexe_with_build': 0,
1294 # Flag to indicate that PNaCl should compile with the native ABI
1295 # instead of the le32 ABI.
1296 'pnacl_native_biased': 0,
1299 'extra_deps_pnacl_newlib': [],
1300 'tc_lib_dir_pnacl_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib',
1301 'tc_lib_dir_pnacl_translate' :'<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_translate',
1302 'tc_include_dir_pnacl_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/include',
1304 '<@(nacl_default_compile_flags)',
1306 'gcc_compile_flags': [
1307 '-fomit-frame-pointer',
1308 # A debugger should be able to unwind IRT call frames. As the IRT is
1309 # compiled with high level of optimizations and without debug info,
1310 # compiler is requested to generate unwind tables explicitly. This
1311 # is the default behavior on x86-64 and when compiling C++ with
1312 # exceptions enabled, the change is for the benefit of x86-32 C.
1313 # These are only required for the IRT but are here for all
1314 # nacl-gcc-compiled binaries because the IRT depends on other libs
1315 '-fasynchronous-unwind-tables',
1317 'pnacl_compile_flags': [
1319 '-Wno-unused-private-field',
1320 '-Wno-char-subscripts',
1321 '-Wno-unused-function',
1323 # IRT compile/link flags to make the binary smaller.
1324 # Omitted from non-IRT libraries to keep the libraries themselves small.
1325 'gcc_irt_compile_flags': [
1326 '-ffunction-sections',
1329 'gcc_irt_link_flags': [
1330 '-Wl,--gc-sections',
1332 'pnacl_irt_link_flags': [
1333 '-Wt,-ffunction-sections',
1334 '-Wt,-fdata-sections',
1335 '-Wn,--gc-sections',
1338 'target_conditions': [
1339 # pnacl actions for building pexes and translating them
1340 ['nexe_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0 '
1341 'and pnacl_native_biased==0', {
1343 'out_pnacl_newlib_x86_32_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_x32.nexe',
1344 'out_pnacl_newlib_x86_64_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_x64.nexe',
1345 'out_pnacl_newlib_arm_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_arm.nexe',
1346 'out_pnacl_newlib_mips_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_mips32.nexe',
1347 'out_pnacl_newlib_x86_32_nonsfi_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_x32_nonsfi.nexe',
1348 'tool_name': 'pnacl_newlib',
1349 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib',
1350 'out_pnacl_newlib%': '<(PRODUCT_DIR)/>(nexe_target)_newlib.pexe',
1351 'objdir_pnacl_newlib%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_name)',
1355 'translate_flags': [],
1359 'action_name': 'build newlib pexe',
1361 'source_list_pnacl_newlib%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1363 'msvs_cygwin_shell': 0,
1364 'description': 'building >(out_pnacl_newlib)',
1366 '<(DEPTH)/native_client/build/build_nexe.py',
1367 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1369 '>@(extra_deps_pnacl_newlib)',
1370 '^(source_list_pnacl_newlib)',
1371 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
1373 'outputs': ['>(out_pnacl_newlib)'],
1378 '--build', 'newlib_pexe',
1379 '--name', '>(out_pnacl_newlib)',
1380 '--objdir', '>(objdir_pnacl_newlib)',
1381 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1382 # TODO(dschuff): try removing gline-tables-only after 3.5 merge
1383 # when debug metadata is less memory-intensive
1384 '--compile_flags=^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1385 '--gomadir', '<(gomadir)',
1386 '--defines=^(defines) >(_defines)',
1387 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib ^(link_flags) >(_link_flags)',
1388 '--source-list=^(source_list_pnacl_newlib)',
1391 'target_conditions': [
1392 [ 'enable_x86_32!=0 and translate_pexe_with_build!=0', {
1394 'action_name': 'translate newlib pexe to x86-32 nexe',
1395 'msvs_cygwin_shell': 0,
1396 'description': 'translating >(out_pnacl_newlib_x86_32_nexe)',
1398 # Having this in the input somehow causes devenv warnings
1399 # when building pnacl browser tests.
1400 # '<(DEPTH)/native_client/build/build_nexe.py',
1401 '>(out_pnacl_newlib)',
1403 'outputs': [ '>(out_pnacl_newlib_x86_32_nexe)' ],
1407 '--build', 'newlib_translate',
1408 '--name', '>(out_pnacl_newlib_x86_32_nexe)',
1409 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_lib_dir_pnacl_translate)/lib-x86-32',
1410 '>(out_pnacl_newlib)',
1414 [ 'enable_x86_32_nonsfi!=0 and translate_pexe_with_build!=0', {
1416 'action_name': 'translate newlib pexe to x86-32-nonsfi nexe',
1417 'msvs_cygwin_shell': 0,
1418 'description': 'translating >(out_pnacl_newlib_x86_32_nonsfi_nexe)',
1420 # Having this in the input somehow causes devenv warnings
1421 # when building pnacl browser tests.
1422 # '<(DEPTH)/native_client/build/build_nexe.py',
1423 '>(out_pnacl_newlib)',
1425 'outputs': [ '>(out_pnacl_newlib_x86_32_nonsfi_nexe)' ],
1428 '--arch', 'x86-32-nonsfi',
1429 '--build', 'newlib_translate',
1430 '--name', '>(out_pnacl_newlib_x86_32_nonsfi_nexe)',
1431 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_lib_dir_pnacl_translate)/lib-x86-32-nonsfi',
1432 '>(out_pnacl_newlib)',
1436 [ 'enable_x86_64!=0 and translate_pexe_with_build!=0', {
1438 'action_name': 'translate newlib pexe to x86-64 nexe',
1439 'msvs_cygwin_shell': 0,
1440 'description': 'translating >(out_pnacl_newlib_x86_64_nexe)',
1442 # Having this in the input somehow causes devenv warnings
1443 # when building pnacl browser tests.
1444 # '<(DEPTH)/native_client/build/build_nexe.py',
1445 '>(out_pnacl_newlib)',
1447 'outputs': [ '>(out_pnacl_newlib_x86_64_nexe)' ],
1451 '--build', 'newlib_translate',
1452 '--name', '>(out_pnacl_newlib_x86_64_nexe)',
1453 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_lib_dir_pnacl_translate)/lib-x86-64',
1454 '>(out_pnacl_newlib)',
1458 [ 'enable_arm!=0 and translate_pexe_with_build!=0', {
1460 'action_name': 'translate newlib pexe to ARM nexe',
1461 'msvs_cygwin_shell': 0,
1462 'description': 'translating >(out_pnacl_newlib_arm_nexe)',
1464 # Having this in the input somehow causes devenv warnings
1465 # when building pnacl browser tests.
1466 # '<(DEPTH)/native_client/build/build_nexe.py',
1467 '>(out_pnacl_newlib)',
1469 'outputs': [ '>(out_pnacl_newlib_arm_nexe)' ],
1473 '--build', 'newlib_translate',
1474 '--name', '>(out_pnacl_newlib_arm_nexe)',
1475 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_lib_dir_pnacl_translate)/lib-arm',
1476 '>(out_pnacl_newlib)',
1480 [ 'enable_mips!=0 and translate_pexe_with_build!=0', {
1482 'action_name': 'translate newlib pexe to MIPS nexe',
1483 'msvs_cygwin_shell': 0,
1484 'description': 'translating >(out_pnacl_newlib_mips_nexe)',
1486 # Having this in the input somehow causes devenv warnings
1487 # when building pnacl browser tests.
1488 # '<(DEPTH)/native_client/build/build_nexe.py',
1489 '>(out_pnacl_newlib)',
1491 'outputs': [ '>(out_pnacl_newlib_mips_nexe)' ],
1495 '--build', 'newlib_translate',
1496 '--name', '>(out_pnacl_newlib_mips_nexe)',
1497 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_lib_dir_pnacl_translate)/lib-mips32',
1498 '>(out_pnacl_newlib)',
1503 }], # end pnacl actions for building pexes and translating to nexes
1504 # pnacl action for building portable bitcode libraries
1505 ['nlib_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0'
1506 'and pnacl_native_biased==0', {
1508 'tool_name': 'pnacl_newlib',
1509 'objdir_pnacl_newlib%': '>(INTERMEDIATE_DIR)/<(tool_name)-pnacl/>(_target_name)',
1510 'out_pnacl_newlib%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib/>(nlib_target)',
1514 'action_name': 'build newlib plib',
1516 'source_list_pnacl_newlib%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1518 'msvs_cygwin_shell': 0,
1519 'description': 'building >(out_pnacl_newlib)',
1521 '<(DEPTH)/native_client/build/build_nexe.py',
1522 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1524 '>@(extra_deps_pnacl_newlib)',
1525 '^(source_list_pnacl_newlib)',
1526 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
1528 'outputs': ['>(out_pnacl_newlib)'],
1533 '--build', 'newlib_plib',
1534 '--name', '>(out_pnacl_newlib)',
1535 '--objdir', '>(objdir_pnacl_newlib)',
1536 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1537 # TODO(dschuff): try removing gline-tables-only after 3.5 merge
1538 # when debug metadata is less memory-intensive
1539 '--compile_flags=^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1540 '--gomadir', '<(gomadir)',
1541 '--defines=^(defines) >(_defines)',
1542 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1543 '--source-list=^(source_list_pnacl_newlib)',
1547 }], # end pnacl actions for bitcode libraries
1548 ], # end target conditions for pnacl pexe/plib
1549 # pnacl actions for building ABI-biased native libraries
1552 ['target_arch=="arm"', {
1553 'target_conditions': [
1554 ['disable_pnacl==0 and pnacl_native_biased==1 and nlib_target!="" and build_pnacl_newlib!=0', {
1556 'tool_name': 'pnacl_newlib_arm',
1557 'out_pnacl_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>(nlib_target)',
1558 'objdir_pnacl_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_name)',
1562 'action_name': 'build newlib arm nlib (via pnacl)',
1564 'source_list_pnacl_newlib_arm%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1566 'msvs_cygwin_shell': 0,
1567 'description': 'building >(out_pnacl_newlib_arm)',
1569 '<(DEPTH)/native_client/build/build_nexe.py',
1570 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1572 '>@(extra_deps_pnacl_newlib)',
1573 '^(source_list_pnacl_newlib_arm)',
1574 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep'
1576 'outputs': ['>(out_pnacl_newlib_arm)'],
1581 '--build', 'newlib_nlib_pnacl',
1582 '--name', '>(out_pnacl_newlib_arm)',
1583 '--objdir', '>(objdir_pnacl_newlib_arm)',
1584 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1585 '--compile_flags=--target=armv7-unknown-nacl-gnueabi -mfloat-abi=hard --pnacl-allow-translate -arch arm ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1586 '--gomadir', '<(gomadir)',
1587 '--defines=^(defines) >(_defines)',
1588 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1589 '--source-list=^(source_list_pnacl_newlib_arm)',
1596 # ia32 or x64 (want to build both for Windows)
1597 ['target_arch=="ia32" or target_arch=="x64"', {
1598 'target_conditions': [
1600 ['enable_x86_64!=0 and disable_pnacl==0 and pnacl_native_biased==1 '
1601 'and nlib_target!="" and build_pnacl_newlib!=0', {
1603 'tool_name': 'pnacl_newlib_x86_64',
1604 'out_pnacl_newlib_x86_64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib-x86-64/>(nlib_target)',
1605 'objdir_pnacl_newlib_x86_64%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_name)',
1609 'action_name': 'build newlib x86-64 nlib (via pnacl)',
1611 'source_list_pnacl_newlib_x86_64%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1613 'msvs_cygwin_shell': 0,
1614 'description': 'building >(out_pnacl_newlib_x86_64)',
1616 '<(DEPTH)/native_client/build/build_nexe.py',
1617 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1619 '>@(extra_deps_pnacl_newlib)',
1620 '^(source_list_pnacl_newlib_x86_64)',
1621 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep'
1623 'outputs': ['>(out_pnacl_newlib_x86_64)'],
1628 '--build', 'newlib_nlib_pnacl',
1629 '--name', '>(out_pnacl_newlib_x86_64)',
1630 '--objdir', '>(objdir_pnacl_newlib_x86_64)',
1631 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1632 '--compile_flags=--target=x86_64-unknown-nacl --pnacl-allow-translate -arch x86-64 ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1633 '--gomadir', '<(gomadir)',
1634 '--defines=^(defines) >(_defines)',
1635 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1636 '--source-list=^(source_list_pnacl_newlib_x86_64)',
1642 ['enable_x86_32!=0 and disable_pnacl==0 and pnacl_native_biased==1 '
1643 'and nlib_target!="" and build_pnacl_newlib!=0', {
1645 'tool_name': 'pnacl_newlib_x86_32',
1646 'out_pnacl_newlib_x86_32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib-x86-32/>(nlib_target)',
1647 'objdir_pnacl_newlib_x86_32%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_name)',
1651 'action_name': 'build newlib x86-32 nlib (via pnacl)',
1653 'source_list_pnacl_newlib_x86_32%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1655 'msvs_cygwin_shell': 0,
1656 'description': 'building >(out_pnacl_newlib_x86_32)',
1658 '<(DEPTH)/native_client/build/build_nexe.py',
1659 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1661 '>@(extra_deps_pnacl_newlib)',
1662 '^(source_list_pnacl_newlib_x86_32)',
1663 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep'
1665 'outputs': ['>(out_pnacl_newlib_x86_32)'],
1670 '--build', 'newlib_nlib_pnacl',
1671 '--name', '>(out_pnacl_newlib_x86_32)',
1672 '--objdir', '>(objdir_pnacl_newlib_x86_32)',
1673 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1674 '--compile_flags=--target=i686-unknown-nacl --pnacl-allow-translate -arch x86-32 ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1675 '--gomadir', '<(gomadir)',
1676 '--defines=^(defines) >(_defines)',
1677 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1678 '--source-list=^(source_list_pnacl_newlib_x86_32)',
1683 ], # end ia32 or x64
1686 # The shim is not biased since the IRT itself is not biased.
1687 ['target_arch=="mipsel"', {
1688 'target_conditions': [
1689 ['disable_pnacl==0 and pnacl_native_biased==1 and nlib_target!="" and build_pnacl_newlib!=0', {
1691 'tool_name': 'pnacl_newlib_mips',
1692 'out_pnacl_newlib_mips%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libmips/>(nlib_target)',
1693 'objdir_pnacl_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_name)',
1697 'action_name': 'build newlib mips nlib (via pnacl)',
1699 'source_list_pnacl_newlib_mips%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1701 'msvs_cygwin_shell': 0,
1702 'description': 'building >(out_pnacl_newlib_mips)',
1704 '<(DEPTH)/native_client/build/build_nexe.py',
1705 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))',
1707 '>@(extra_deps_pnacl_newlib)',
1708 '^(source_list_pnacl_newlib_mips)',
1709 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep'
1711 'outputs': ['>(out_pnacl_newlib_mips)'],
1716 '--build', 'newlib_nlib_pnacl',
1717 '--name', '>(out_pnacl_newlib_mips)',
1718 '--objdir', '>(objdir_pnacl_newlib_mips)',
1719 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1720 '--compile_flags=--pnacl-allow-translate -arch mips ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1721 '--gomadir', '<(gomadir)',
1722 '--defines=^(defines) >(_defines)',
1723 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1724 '--source-list=^(source_list_pnacl_newlib_mips)',
1731 # end pnacl actions for building ABI-biased native libraries
1732 ], # end conditions for pnacl biased nlib