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.
14 # Default C compiler defines.
15 'nacl_default_defines': [
17 '__STDC_LIMIT_MACROS=1',
18 '__STDC_FORMAT_MACROS=1',
21 '_POSIX_C_SOURCE=199506',
23 'DYNAMIC_ANNOTATIONS_ENABLED=1',
24 'DYNAMIC_ANNOTATIONS_PREFIX=NACL_',
26 'nacl_default_compile_flags': [
27 #'-std=gnu99', Added by build_nexe
31 '-fdiagnostics-show-option',
34 # The flag gomadir is one of the flag to enable goma on build_nexe.py.
35 # It should be set only if use_goma is true.
41 'TOOLCHAIN_OS': 'linux',
43 'TOOLCHAIN_OS': '<(OS)',
48 ['target_arch=="ia32" or target_arch=="x64"', {
49 # Common defaults for all x86 nacl-gcc targets
70 'enable_x86_32_nonsfi': 0,
71 'nacl_glibc_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc',
72 'nacl_newlib_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib',
73 'tc_lib_dir_newlib32': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32',
74 'tc_lib_dir_newlib64': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64',
75 'tc_lib_dir_glibc32': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32',
76 'tc_lib_dir_glibc64': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64',
77 'tc_lib_dir_irt32': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/lib32',
78 'tc_lib_dir_irt64': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/lib64',
79 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include',
80 'tc_include_dir_glibc': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/include',
82 'extra_deps_newlib64': [],
83 'extra_deps_newlib32': [],
84 'extra_deps_glibc64': [],
85 'extra_deps_glibc32': [],
86 'include_dirs': ['<(DEPTH)'],
88 '<@(nacl_default_defines)',
89 'NACL_BUILD_ARCH=x86',
95 # This is needed to open the .c filenames, which are given
96 # relative to the .gyp file.
98 # This is needed to open the .h filenames, which are given
99 # relative to the native_client directory's parent.
105 ['target_arch=="arm"', {
106 # Common defaults for all ARM nacl-gcc targets
122 'disable_bionic%': 1,
128 'enable_x86_32_nonsfi': 0,
130 'extra_deps_newlib_arm': [],
131 'extra_deps_bionic_arm': [],
132 'native_sources': [],
133 'nacl_glibc_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_glibc',
134 'nacl_newlib_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_newlib',
135 'tc_lib_dir_bionic_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_bionic/libarm',
136 'tc_lib_dir_newlib_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm',
137 'tc_lib_dir_irt_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/libarm',
138 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include',
139 'tc_include_dir_bionic': '<(SHARED_INTERMEDIATE_DIR)/tc_bionic/include',
140 'include_dirs': ['<(DEPTH)'],
142 '<@(nacl_default_defines)',
143 'NACL_BUILD_ARCH=arm',
149 # This is needed to open the .c filenames, which are given
150 # relative to the .gyp file.
152 # This is needed to open the .h filenames, which are given
153 # relative to the native_client directory's parent.
159 ['target_arch=="mipsel"', {
160 # Common defaults for all mips pnacl-clang targets
175 'disable_bionic%': 1,
181 'enable_x86_32_nonsfi': 0,
183 'extra_deps_newlib_mips': [],
184 'native_sources': [],
185 'nacl_glibc_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_mips_glibc',
186 'nacl_newlib_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_mips_newlib',
187 'tc_lib_dir_newlib_mips': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libmips',
188 'tc_lib_dir_irt_mips': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/libmips',
189 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include',
190 'include_dirs': ['<(DEPTH)'],
192 '<@(nacl_default_defines)',
193 'NACL_BUILD_ARCH=mips',
199 # This is needed to open the .c filenames, which are given
200 # relative to the .gyp file.
202 # This is needed to open the .h filenames, which are given
203 # relative to the native_client directory's parent.
209 ['target_arch=="ia32" or target_arch=="x64"', {
211 # x86-64 newlib nexe action
212 'target_conditions': [
213 ['nexe_target!="" and build_newlib!=0 and enable_x86_64!=0', {
215 'tool_name': 'newlib',
216 'out_newlib64%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x64.nexe',
217 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
221 'action_name': 'build newlib x86-64 nexe',
223 'source_list_newlib64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
225 'msvs_cygwin_shell': 0,
226 'description': 'building >(out_newlib64)',
228 '<(DEPTH)/native_client/build/build_nexe.py',
229 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
231 '>@(extra_deps_newlib64)',
232 '^(source_list_newlib64)',
233 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
235 'outputs': ['>(out_newlib64)'],
238 '<(DEPTH)/native_client/build/build_nexe.py',
239 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
242 '--build', 'newlib_nexe',
243 '--root', '<(DEPTH)',
244 '--name', '>(out_newlib64)',
245 '--objdir', '>(objdir_newlib64)',
246 '--config-name', '<(CONFIGURATION_NAME)',
247 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
248 '--compile_flags=-m64 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
249 '--gomadir', '<(gomadir)',
250 '--defines=^(defines) >(_defines)',
251 '--link_flags=-B>(tc_lib_dir_newlib64) ^(link_flags) >(_link_flags)',
252 '--source-list=^(source_list_newlib64)',
257 # x86-64 newlib library action
258 ['nlib_target!="" and build_newlib!=0 and enable_x86_64!=0', {
260 'tool_name': 'newlib',
261 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
262 'out_newlib64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nlib_target)',
266 'action_name': 'build newlib x86-64 nlib',
268 'source_list_newlib64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
270 'msvs_cygwin_shell': 0,
271 'description': 'building >(out_newlib64)',
273 '<(DEPTH)/native_client/build/build_nexe.py',
274 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
276 '>@(extra_deps_newlib64)',
277 '^(source_list_newlib64)',
278 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
280 'outputs': ['>(out_newlib64)'],
283 '<(DEPTH)/native_client/build/build_nexe.py',
284 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
287 '--build', 'newlib_nlib',
288 '--root', '<(DEPTH)',
289 '--name', '>(out_newlib64)',
290 '--objdir', '>(objdir_newlib64)',
291 '--config-name', '<(CONFIGURATION_NAME)',
292 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
293 '--compile_flags=-m64 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
294 '--gomadir', '<(gomadir)',
295 '--defines=^(defines) >(_defines)',
296 '--link_flags=-B>(tc_lib_dir_newlib64) ^(link_flags) >(_link_flags)',
297 '--source-list=^(source_list_newlib64)',
302 # x86-64 IRT nexe action
303 ['nexe_target!="" and build_irt!=0 and enable_x86_64!=0', {
306 'out_newlib64%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x64.nexe',
307 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
311 'action_name': 'build IRT x86-64 nexe',
313 'source_list_newlib64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
315 'msvs_cygwin_shell': 0,
316 'description': 'building >(out_newlib64)',
318 '<(DEPTH)/native_client/build/build_nexe.py',
319 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
321 '>@(extra_deps_newlib64)',
322 '^(source_list_newlib64)',
323 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
324 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
326 'outputs': ['>(out_newlib64)'],
329 '<(DEPTH)/native_client/build/build_nexe.py',
330 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
333 '--build', 'newlib_nexe_pnacl',
334 '--root', '<(DEPTH)',
335 '--name', '>(out_newlib64)',
336 '--objdir', '>(objdir_newlib64)',
337 '--config-name', '<(CONFIGURATION_NAME)',
338 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
339 '--compile_flags=--target=x86_64-unknown-nacl -stdlib=libstdc++ ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
340 '--gomadir', '<(gomadir)',
341 '--defines=^(defines) >(_defines)',
342 '--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)',
343 '--source-list=^(source_list_newlib64)',
344 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
350 # x86-64 IRT library action
351 ['nlib_target!="" and build_irt!=0 and enable_x86_64!=0', {
354 'objdir_newlib64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
355 'out_newlib64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nlib_target)',
359 'action_name': 'build irt x86-64 nlib',
361 'source_list_newlib64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
363 'msvs_cygwin_shell': 0,
364 'description': 'building >(out_newlib64)',
366 '<(DEPTH)/native_client/build/build_nexe.py',
367 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
369 '>@(extra_deps_newlib64)',
370 '^(source_list_newlib64)',
371 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
373 'outputs': ['>(out_newlib64)'],
376 '<(DEPTH)/native_client/build/build_nexe.py',
377 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
380 '--build', 'newlib_nlib_pnacl',
381 '--root', '<(DEPTH)',
382 '--name', '>(out_newlib64)',
383 '--objdir', '>(objdir_newlib64)',
384 '--config-name', '<(CONFIGURATION_NAME)',
385 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
386 '--compile_flags=--target=x86_64-unknown-nacl -stdlib=libstdc++ ^(compile_flags) >(_compile_flags) -gline-tables-only ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
387 '--gomadir', '<(gomadir)',
388 '--defines=^(defines) >(_defines)',
389 '--link_flags=--target=x86_64-unknown-nacl -stdlib=libstdc++ -B>(tc_lib_dir_irt64) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)',
390 '--source-list=^(source_list_newlib64)',
395 # x86-32 newlib nexe action
396 ['nexe_target!="" and build_newlib!=0 and enable_x86_32!=0', {
398 'tool_name': 'newlib',
399 'out_newlib32%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x32.nexe',
400 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
404 'action_name': 'build newlib x86-32 nexe',
406 'source_list_newlib32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
408 'msvs_cygwin_shell': 0,
409 'description': 'building >(out_newlib32)',
411 '<(DEPTH)/native_client/build/build_nexe.py',
412 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
414 '>@(extra_deps_newlib32)',
415 '^(source_list_newlib32)',
416 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
418 'outputs': ['>(out_newlib32)'],
421 '<(DEPTH)/native_client/build/build_nexe.py',
422 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
425 '--build', 'newlib_nexe',
426 '--root', '<(DEPTH)',
427 '--name', '>(out_newlib32)',
428 '--objdir', '>(objdir_newlib32)',
429 '--config-name', '<(CONFIGURATION_NAME)',
430 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
431 '--compile_flags=-m32 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
432 '--gomadir', '<(gomadir)',
433 '--defines=^(defines) >(_defines)',
434 '--link_flags=-m32 -B>(tc_lib_dir_newlib32) ^(link_flags) >(_link_flags)',
435 '--source-list=^(source_list_newlib32)',
440 # x86-32 newlib library action
441 ['nlib_target!="" and build_newlib!=0 and enable_x86_32!=0', {
443 'tool_name': 'newlib',
444 'out_newlib32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nlib_target)',
445 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
449 'action_name': 'build newlib x86-32 nlib',
451 'source_list_newlib32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
453 'msvs_cygwin_shell': 0,
454 'description': 'building >(out_newlib32)',
456 '<(DEPTH)/native_client/build/build_nexe.py',
457 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
459 '>@(extra_deps_newlib32)',
460 '^(source_list_newlib32)',
461 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
463 'outputs': ['>(out_newlib32)'],
466 '<(DEPTH)/native_client/build/build_nexe.py',
467 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
470 '--build', 'newlib_nlib',
471 '--root', '<(DEPTH)',
472 '--name', '>(out_newlib32)',
473 '--objdir', '>(objdir_newlib32)',
474 '--config-name', '<(CONFIGURATION_NAME)',
475 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
476 '--compile_flags=-m32 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
477 '--gomadir', '<(gomadir)',
478 '--defines=^(defines) >(_defines)',
479 '--link_flags=-m32 -B>(tc_lib_dir_newlib32) ^(link_flags) >(_link_flags)',
480 '--source-list=^(source_list_newlib32)',
485 # x86-32 IRT nexe build
486 ['nexe_target!="" and build_irt!=0 and enable_x86_32!=0', {
489 'out_newlib32%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x32.nexe',
490 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
494 'action_name': 'build IRT x86-32 nexe',
496 'source_list_newlib32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
498 'msvs_cygwin_shell': 0,
499 'description': 'building >(out_newlib32)',
501 '<(DEPTH)/native_client/build/build_nexe.py',
502 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
504 '>@(extra_deps_newlib32)',
505 '^(source_list_newlib32)',
506 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
507 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
509 'outputs': ['>(out_newlib32)'],
512 '<(DEPTH)/native_client/build/build_nexe.py',
513 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
516 '--build', 'newlib_nexe',
517 '--root', '<(DEPTH)',
518 '--name', '>(out_newlib32)',
519 '--objdir', '>(objdir_newlib32)',
520 '--config-name', '<(CONFIGURATION_NAME)',
521 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
522 '--compile_flags=-m32 ^(gcc_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
523 '--gomadir', '<(gomadir)',
524 '--defines=^(defines) >(_defines)',
525 '--link_flags=-m32 -B>(tc_lib_dir_irt32) ^(gcc_irt_link_flags) ^(link_flags) >(_link_flags)',
526 '--source-list=^(source_list_newlib32)',
527 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
533 # x86-32 IRT library build
534 ['nlib_target!="" and build_irt!=0 and enable_x86_32!=0', {
537 'out_newlib32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nlib_target)',
538 'objdir_newlib32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
542 'action_name': 'build IRT x86-32 nlib',
544 'source_list_newlib32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
546 'msvs_cygwin_shell': 0,
547 'description': 'building >(out_newlib32)',
549 '<(DEPTH)/native_client/build/build_nexe.py',
550 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
552 '>@(extra_deps_newlib32)',
553 '^(source_list_newlib32)',
554 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_newlib/stamp.prep',
556 'outputs': ['>(out_newlib32)'],
559 '<(DEPTH)/native_client/build/build_nexe.py',
560 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
563 '--build', 'newlib_nlib',
564 '--root', '<(DEPTH)',
565 '--name', '>(out_newlib32)',
566 '--objdir', '>(objdir_newlib32)',
567 '--config-name', '<(CONFIGURATION_NAME)',
568 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
569 '--compile_flags=-m32 ^(gcc_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
570 '--gomadir', '<(gomadir)',
571 '--defines=^(defines) >(_defines)',
572 '--link_flags=-m32 -B>(tc_lib_dir_irt32) ^(gcc_irt_link_flags) ^(link_flags) >(_link_flags)',
573 '--source-list=^(source_list_newlib32)',
580 }], # end x86 gcc nexe/nlib actions
581 ['target_arch=="arm"', {
583 'target_conditions': [
584 # arm newlib nexe action
585 ['nexe_target!="" and build_newlib!=0', {
587 'tool_name': 'newlib',
588 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe',
589 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_target_name)',
593 'action_name': 'build newlib arm nexe',
595 'source_list_newlib_arm%': '^|(<(tool_name)-arm.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
597 'msvs_cygwin_shell': 0,
598 'description': 'building >(out_newlib_arm)',
600 '<(DEPTH)/native_client/build/build_nexe.py',
601 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources) >(native_sources))',
603 '>@(extra_deps_newlib_arm)',
604 '^(source_list_newlib_arm)',
605 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_newlib/stamp.prep',
607 'outputs': ['>(out_newlib_arm)'],
610 '<(DEPTH)/native_client/build/build_nexe.py',
611 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
614 '--build', 'newlib_nexe',
615 '--root', '<(DEPTH)',
616 '--name', '>(out_newlib_arm)',
617 '--objdir', '>(objdir_newlib_arm)',
618 '--config-name', '<(CONFIGURATION_NAME)',
619 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
620 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
621 '--gomadir', '<(gomadir)',
622 '--defines=^(defines) >(_defines)',
623 '--link_flags=-B>(tc_lib_dir_newlib_arm) ^(link_flags) >(_link_flags)',
624 '--source-list=^(source_list_newlib_arm)',
629 # arm newlib library action
630 ['nlib_target!="" and build_newlib!=0', {
632 'tool_name': 'newlib',
633 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>(nlib_target)',
634 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_target_name)',
638 'action_name': 'build newlib arm nlib',
640 'source_list_newlib_arm%': '^|(<(tool_name)-arm.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
642 'msvs_cygwin_shell': 0,
643 'description': 'building >(out_newlib_arm)',
645 '<(DEPTH)/native_client/build/build_nexe.py',
646 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources) >(native_sources))',
648 '>@(extra_deps_newlib_arm)',
649 '^(source_list_newlib_arm)',
650 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_newlib/stamp.prep',
652 'outputs': ['>(out_newlib_arm)'],
655 '<(DEPTH)/native_client/build/build_nexe.py',
656 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
659 '--build', 'newlib_nlib',
660 '--root', '<(DEPTH)',
661 '--name', '>(out_newlib_arm)',
662 '--objdir', '>(objdir_newlib_arm)',
663 '--config-name', '<(CONFIGURATION_NAME)',
664 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
665 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
666 '--gomadir', '<(gomadir)',
667 '--defines=^(defines) >(_defines)',
668 '--link_flags=-B>(tc_lib_dir_newlib_arm) ^(link_flags) >(_link_flags)',
669 '--source-list=^(source_list_newlib_arm)',
674 ['nlib_target!="" and build_bionic!=0 and disable_bionic==0', {
676 'tool_name': 'bionic',
677 'out_bionic_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>(nlib_target)',
678 'objdir_bionic_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_target_name)',
682 'action_name': 'build bionic arm nlib',
684 'source_list_bionic_arm%': '^|(<(tool_name)-arm.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
686 'msvs_cygwin_shell': 0,
687 'description': 'building >(out_bionic_arm)',
689 '<(DEPTH)/native_client/build/build_nexe.py',
690 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources) >(native_sources))',
692 '>@(extra_deps_bionic_arm)',
693 '^(source_list_bionic_arm)',
694 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86_nacl_arm/nacl_arm_bionic',
696 'outputs': ['>(out_bionic_arm)'],
699 '<(DEPTH)/native_client/build/build_nexe.py',
700 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
703 '--build', 'bionic_nlib',
704 '--root', '<(DEPTH)',
705 '--name', '>(out_bionic_arm)',
706 '--objdir', '>(objdir_bionic_arm)',
707 '--config-name', '<(CONFIGURATION_NAME)',
708 '--include-dirs=>(tc_include_dir_bionic) ^(include_dirs) >(_include_dirs)',
709 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
710 '--gomadir', '<(gomadir)',
711 '--defines=^(defines) >(_defines)',
712 '--link_flags=-B>(tc_lib_dir_bionic_arm) ^(link_flags) >(_link_flags)',
713 '--source-list=^(source_list_bionic_arm)',
718 # arm irt nexe action
719 ['nexe_target!="" and build_irt!=0', {
722 'out_newlib_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe',
723 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_target_name)',
727 'action_name': 'build IRT arm nexe',
729 'source_list_newlib_arm%': '^|(<(tool_name)-arm.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
731 'msvs_cygwin_shell': 0,
732 'description': 'building >(out_newlib_arm)',
734 '<(DEPTH)/native_client/build/build_nexe.py',
735 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources) >(native_sources))',
737 '>@(extra_deps_newlib_arm)',
738 '^(source_list_newlib_arm)',
739 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_newlib/stamp.prep',
740 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
742 'outputs': ['>(out_newlib_arm)'],
745 '<(DEPTH)/native_client/build/build_nexe.py',
746 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
749 '--build', 'newlib_nexe',
750 '--root', '<(DEPTH)',
751 '--name', '>(out_newlib_arm)',
752 '--objdir', '>(objdir_newlib_arm)',
753 '--config-name', '<(CONFIGURATION_NAME)',
754 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
755 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
756 '--gomadir', '<(gomadir)',
757 '--defines=^(defines) >(_defines)',
758 '--link_flags=-B>(tc_lib_dir_irt_arm) ^(gcc_irt_link_flags) ^(link_flags) >(_link_flags)',
759 '--source-list=^(source_list_newlib_arm)',
760 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
766 # arm IRT library action
767 ['nlib_target!="" and build_irt!=0', {
770 'out_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>(nlib_target)',
771 'objdir_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm/>(_target_name)',
775 'action_name': 'build IRT arm nlib',
777 'source_list_newlib_arm%': '^|(<(tool_name)-arm.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
779 'msvs_cygwin_shell': 0,
780 'description': 'building >(out_newlib_arm)',
782 '<(DEPTH)/native_client/build/build_nexe.py',
783 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources) >(native_sources))',
785 '>@(extra_deps_newlib_arm)',
786 '^(source_list_newlib_arm)',
787 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_newlib/stamp.prep',
789 'outputs': ['>(out_newlib_arm)'],
792 '<(DEPTH)/native_client/build/build_nexe.py',
793 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
796 '--build', 'newlib_nlib',
797 '--root', '<(DEPTH)',
798 '--name', '>(out_newlib_arm)',
799 '--objdir', '>(objdir_newlib_arm)',
800 '--config-name', '<(CONFIGURATION_NAME)',
801 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
802 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_irt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
803 '--gomadir', '<(gomadir)',
804 '--defines=^(defines) >(_defines)',
805 '--link_flags=-B>(tc_lib_dir_irt_arm) ^(gcc_irt_link_flags) ^(link_flags) >(_link_flags)',
806 '--source-list=^(source_list_newlib_arm)',
811 ], # end target_conditions for arm newlib (nexe/nlib)
813 }], # end target_arch = arm
814 ['target_arch=="mipsel"', {
816 'target_conditions': [
817 # mips newlib nexe action
818 ['nexe_target!="" and build_newlib!=0', {
820 'tool_name': 'newlib',
821 'out_newlib_mips%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_mips32.nexe',
822 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)',
826 'action_name': 'build newlib mips nexe',
828 'source_list_newlib_mips%': '^|(<(tool_name)-mips.>(_target_name).source_list.gypcmd ^(_sources) ^(sources) ^(native_sources))',
830 'msvs_cygwin_shell': 0,
831 'description': 'building >(out_newlib_mips)',
833 '<(DEPTH)/native_client/build/build_nexe.py',
834 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources) >(native_sources))',
836 '>@(extra_deps_newlib_mips)',
837 '^(source_list_newlib_mips)',
838 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
840 'outputs': ['>(out_newlib_mips)'],
843 '<(DEPTH)/native_client/build/build_nexe.py',
844 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
847 '--build', 'newlib_nexe',
848 '--root', '<(DEPTH)',
849 '--name', '>(out_newlib_mips)',
850 '--objdir', '>(objdir_newlib_mips)',
851 '--config-name', '<(CONFIGURATION_NAME)',
852 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
853 '--compile_flags=^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
854 '--gomadir', '<(gomadir)',
855 '--defines=^(defines) >(_defines)',
856 '--link_flags=-arch mips -B>(tc_lib_dir_newlib_mips) ^(link_flags) >(_link_flags)',
857 '--source-list=^(source_list_newlib_mips)',
862 # mips newlib library action
863 ['nlib_target!="" and build_newlib!=0', {
865 'tool_name': 'newlib',
866 'out_newlib_mips%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libmips/>(nlib_target)',
867 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)',
871 'action_name': 'build newlib mips nlib',
873 'source_list_newlib_mips%': '^|(<(tool_name)-mips.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
875 'msvs_cygwin_shell': 0,
876 'description': 'building >(out_newlib_mips)',
878 '<(DEPTH)/native_client/build/build_nexe.py',
879 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
881 '>@(extra_deps_newlib_mips)',
882 '^(source_list_newlib_mips)',
883 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
885 'outputs': ['>(out_newlib_mips)'],
888 '<(DEPTH)/native_client/build/build_nexe.py',
889 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
892 '--build', 'newlib_nlib',
893 '--root', '<(DEPTH)',
894 '--name', '>(out_newlib_mips)',
895 '--objdir', '>(objdir_newlib_mips)',
896 '--config-name', '<(CONFIGURATION_NAME)',
897 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
898 '--compile_flags=^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
899 '--gomadir', '<(gomadir)',
900 '--defines=^(defines) >(_defines)',
901 '--link_flags=-B>(tc_lib_dir_newlib_mips) ^(link_flags) >(_link_flags)',
902 '--source-list=^(source_list_newlib_mips)',
907 # mips irt nexe action
908 ['nexe_target!="" and build_irt!=0', {
911 'out_newlib_mips%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_mips32.nexe',
912 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)',
916 'action_name': 'build IRT mips nexe',
918 'source_list_newlib_mips%': '^|(<(tool_name)-mips.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
920 'msvs_cygwin_shell': 0,
921 'description': 'building >(out_newlib_mips)',
923 '<(DEPTH)/native_client/build/build_nexe.py',
924 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
926 '>@(extra_deps_newlib_mips)',
927 '^(source_list_newlib_mips)',
928 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
929 '<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
931 'outputs': ['>(out_newlib_mips)'],
934 '<(DEPTH)/native_client/build/build_nexe.py',
935 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
938 '--build', 'newlib_nexe',
939 '--root', '<(DEPTH)',
940 '--name', '>(out_newlib_mips)',
941 '--objdir', '>(objdir_newlib_mips)',
942 '--config-name', '<(CONFIGURATION_NAME)',
943 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
944 '--compile_flags=-stdlib=libstdc++ ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
945 '--gomadir', '<(gomadir)',
946 '--defines=^(defines) >(_defines)',
947 '--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)',
948 '--source-list=^(source_list_newlib_mips)',
949 '--tls-edit=<(PRODUCT_DIR)/tls_edit<(EXECUTABLE_SUFFIX)',
955 # mips IRT library action
956 ['nlib_target!="" and build_irt!=0', {
959 'out_newlib_mips%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libmips/>(nlib_target)',
960 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)',
964 'action_name': 'build IRT mips nlib',
966 'source_list_newlib_mips%': '^|(<(tool_name)-mips.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
968 'msvs_cygwin_shell': 0,
969 'description': 'building >(out_newlib_mips)',
971 '<(DEPTH)/native_client/build/build_nexe.py',
972 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
974 '>@(extra_deps_newlib_mips)',
975 '^(source_list_newlib_mips)',
976 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
978 'outputs': ['>(out_newlib_mips)'],
981 '<(DEPTH)/native_client/build/build_nexe.py',
982 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
985 '--build', 'newlib_nlib',
986 '--root', '<(DEPTH)',
987 '--name', '>(out_newlib_mips)',
988 '--objdir', '>(objdir_newlib_mips)',
989 '--config-name', '<(CONFIGURATION_NAME)',
990 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)',
991 '--compile_flags=-stdlib=libstdc++ ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
992 '--gomadir', '<(gomadir)',
993 '--defines=^(defines) >(_defines)',
994 '--link_flags=-stdlib=libstdc++ -B>(tc_lib_dir_irt_mips) ^(pnacl_irt_link_flags) ^(link_flags) >(_link_flags)',
995 '--source-list=^(source_list_newlib_mips)',
1000 ], # end target_conditions for mips newlib
1002 }], # end target_arch = mips
1003 ['target_arch=="ia32" or target_arch=="x64"', {
1004 'target_defaults': {
1005 # x86-64 glibc nexe action
1006 'target_conditions': [
1007 ['nexe_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_glibc==0', {
1009 'tool_name': 'glibc',
1010 'out_glibc64%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x64.nexe',
1011 'objdir_glibc64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
1015 'action_name': 'build glibc x86-64 nexe',
1017 'source_list_glibc64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1019 'msvs_cygwin_shell': 0,
1020 'description': 'building >(out_glibc64)',
1022 '<(DEPTH)/native_client/build/build_nexe.py',
1023 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1025 '>@(extra_deps_glibc64)',
1026 '^(source_list_glibc64)',
1027 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1029 'outputs': ['>(out_glibc64)'],
1032 '<(DEPTH)/native_client/build/build_nexe.py',
1033 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1036 '--build', 'glibc_nexe',
1037 '--root', '<(DEPTH)',
1038 '--name', '>(out_glibc64)',
1039 '--objdir', '>(objdir_glibc64)',
1040 '--config-name', '<(CONFIGURATION_NAME)',
1041 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1042 '--compile_flags=-m64 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1043 '--gomadir', '<(gomadir)',
1044 '--defines=^(defines) >(_defines)',
1045 '--link_flags=-B>(tc_lib_dir_glibc64) ^(link_flags) >(_link_flags)',
1046 '--source-list=^(source_list_glibc64)',
1051 # x86-32 glibc nexe action
1052 ['nexe_target!="" and build_glibc!=0 and enable_x86_32!=0 and disable_glibc==0', {
1054 'tool_name': 'glibc',
1055 'out_glibc32%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x32.nexe',
1056 'objdir_glibc32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
1060 'action_name': 'build glibc x86-32 nexe',
1062 'source_list_glibc32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1064 'msvs_cygwin_shell': 0,
1065 'description': 'building >(out_glibc32)',
1067 '<(DEPTH)/native_client/build/build_nexe.py',
1068 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1070 '>@(extra_deps_glibc32)',
1071 '^(source_list_glibc32)',
1072 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1074 'outputs': ['>(out_glibc32)'],
1077 '<(DEPTH)/native_client/build/build_nexe.py',
1078 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1081 '--build', 'glibc_nexe',
1082 '--root', '<(DEPTH)',
1083 '--name', '>(out_glibc32)',
1084 '--objdir', '>(objdir_glibc32)',
1085 '--config-name', '<(CONFIGURATION_NAME)',
1086 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1087 '--compile_flags=-m32 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1088 '--gomadir', '<(gomadir)',
1089 '--defines=^(defines) >(_defines)',
1090 '--link_flags=-m32 -B>(tc_lib_dir_glibc32) ^(link_flags) >(_link_flags)',
1091 '--source-list=^(source_list_glibc32)',
1096 # x86-64 glibc static library action
1097 ['nlib_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_glibc==0', {
1099 'tool_name': 'glibc',
1100 'objdir_glibc64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)',
1101 'out_glibc64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nlib_target)',
1105 'action_name': 'build glibc x86-64 nlib',
1107 'source_list_glibc64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1109 'msvs_cygwin_shell': 0,
1110 'description': 'building >(out_glibc64)',
1112 '<(DEPTH)/native_client/build/build_nexe.py',
1113 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1115 '>@(extra_deps_glibc64)',
1116 '^(source_list_glibc64)',
1117 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1119 'outputs': ['>(out_glibc64)'],
1122 '<(DEPTH)/native_client/build/build_nexe.py',
1123 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1126 '--build', 'glibc_nlib',
1127 '--root', '<(DEPTH)',
1128 '--name', '>(out_glibc64)',
1129 '--objdir', '>(objdir_glibc64)',
1130 '--config-name', '<(CONFIGURATION_NAME)',
1131 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1132 '--compile_flags=-m64 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1133 '--gomadir', '<(gomadir)',
1134 '--defines=^(defines) >(_defines)',
1135 '--link_flags=-B>(tc_lib_dir_glibc64) ^(link_flags) >(_link_flags)',
1136 '--source-list=^(source_list_glibc64)',
1141 # x86-32 glibc static library action
1142 ['nlib_target!="" and build_glibc!=0 and enable_x86_32!=0 and disable_glibc==0', {
1144 'tool_name': 'glibc',
1145 'out_glibc32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nlib_target)',
1146 'objdir_glibc32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)',
1150 'action_name': 'build glibc x86-32 nlib',
1152 'source_list_glibc32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1154 'msvs_cygwin_shell': 0,
1155 'description': 'building >(out_glibc32)',
1157 '<(DEPTH)/native_client/build/build_nexe.py',
1158 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1160 '>@(extra_deps_glibc32)',
1161 '^(source_list_glibc32)',
1162 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1164 'outputs': ['>(out_glibc32)'],
1167 '<(DEPTH)/native_client/build/build_nexe.py',
1168 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1171 '--build', 'glibc_nlib',
1172 '--root', '<(DEPTH)',
1173 '--name', '>(out_glibc32)',
1174 '--objdir', '>(objdir_glibc32)',
1175 '--config-name', '<(CONFIGURATION_NAME)',
1176 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1177 '--compile_flags=-m32 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1178 '--gomadir', '<(gomadir)',
1179 '--defines=^(defines) >(_defines)',
1180 '--link_flags=-m32 -B>(tc_lib_dir_glibc32) ^(link_flags) >(_link_flags)',
1181 '--source-list=^(source_list_glibc32)',
1186 # x86-64 glibc shared library action
1187 ['nso_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_glibc==0', {
1189 'tool_name': 'glibc',
1190 'objdir_glibc64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64-so/>(_target_name)',
1191 'out_glibc64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nso_target)',
1195 'action_name': 'build glibc x86-64 nso',
1197 'source_list_glibc64%': '^|(<(tool_name)-x86-64-so.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1199 'msvs_cygwin_shell': 0,
1200 'description': 'building >(out_glibc64)',
1202 '<(DEPTH)/native_client/build/build_nexe.py',
1203 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1205 '>@(extra_deps_glibc64)',
1206 '^(source_list_glibc64)',
1207 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1209 'outputs': ['>(out_glibc64)'],
1212 '<(DEPTH)/native_client/build/build_nexe.py',
1214 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1216 '--build', 'glibc_nso',
1217 '--root', '<(DEPTH)',
1218 '--name', '>(out_glibc64)',
1219 '--objdir', '>(objdir_glibc64)',
1220 '--config-name', '<(CONFIGURATION_NAME)',
1221 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1222 '--compile_flags=-m64 -fPIC ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1223 '--gomadir', '<(gomadir)',
1224 '--defines=^(defines) >(_defines)',
1225 '--link_flags=-B>(tc_lib_dir_glibc64) ^(link_flags) >(_link_flags)',
1226 '--source-list=^(source_list_glibc64)',
1231 # x86-32 glibc shared library action
1232 ['nso_target!="" and build_glibc!=0 and enable_x86_32!=0 and disable_glibc==0', {
1234 'tool_name': 'glibc',
1235 'out_glibc32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nso_target)',
1236 'objdir_glibc32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32-so/>(_target_name)',
1240 'action_name': 'build glibc x86-32 nso',
1242 'source_list_glibc32%': '^|(<(tool_name)-x86-32-so.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1244 'msvs_cygwin_shell': 0,
1245 'description': 'building >(out_glibc32)',
1247 '<(DEPTH)/native_client/build/build_nexe.py',
1248 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1250 '>@(extra_deps_glibc32)',
1251 '^(source_list_glibc32)',
1252 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep',
1254 'outputs': ['>(out_glibc32)'],
1257 '<(DEPTH)/native_client/build/build_nexe.py',
1259 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1261 '--build', 'glibc_nso',
1262 '--root', '<(DEPTH)',
1263 '--name', '>(out_glibc32)',
1264 '--objdir', '>(objdir_glibc32)',
1265 '--config-name', '<(CONFIGURATION_NAME)',
1266 '--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)',
1267 '--compile_flags=-m32 -fPIC ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)',
1268 '--gomadir', '<(gomadir)',
1269 '--defines=^(defines) >(_defines)',
1270 '--link_flags=-m32 -B>(tc_lib_dir_glibc32) ^(link_flags) >(_link_flags)',
1271 '--source-list=^(source_list_glibc32)',
1276 ], # end target_conditions for glibc (nexe/nlib/nso, x86-32/64)
1278 }], # end target_arch == ia32 or x64
1280 'target_defaults': {
1281 'gcc_compile_flags': [],
1282 'pnacl_compile_flags': [],
1284 'disable_pnacl%': 0,
1285 'build_pnacl_newlib': 0,
1286 'pnacl_native_biased': 0,
1289 'extra_deps_pnacl_newlib': [],
1290 'tc_lib_dir_pnacl_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib',
1291 'tc_lib_dir_pnacl_translate' :'<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_translate',
1292 'tc_include_dir_pnacl_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/include',
1294 '<@(nacl_default_compile_flags)',
1296 'gcc_compile_flags': [
1297 '-fomit-frame-pointer',
1298 # A debugger should be able to unwind IRT call frames. As the IRT is
1299 # compiled with high level of optimizations and without debug info,
1300 # compiler is requested to generate unwind tables explicitly. This
1301 # is the default behavior on x86-64 and when compiling C++ with
1302 # exceptions enabled, the change is for the benefit of x86-32 C.
1303 # These are only required for the IRT but are here for all
1304 # nacl-gcc-compiled binaries because the IRT depends on other libs
1305 '-fasynchronous-unwind-tables',
1307 'pnacl_compile_flags': [
1309 '-Wno-unused-private-field',
1310 '-Wno-char-subscripts',
1311 '-Wno-unused-function',
1313 # IRT compile/link flags to make the binary smaller.
1314 # Omitted from non-IRT libraries to keep the libraries themselves small.
1315 'gcc_irt_compile_flags': [
1316 '-ffunction-sections',
1319 'gcc_irt_link_flags': [
1320 '-Wl,--gc-sections',
1322 'pnacl_irt_link_flags': [
1323 '-Wt,-ffunction-sections',
1324 '-Wt,-fdata-sections',
1325 '-Wn,--gc-sections',
1328 'target_conditions': [
1329 # pnacl actions for building pexes and translating them
1330 ['nexe_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0 '
1331 'and pnacl_native_biased==0', {
1333 'out_pnacl_newlib_x86_32_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_x32.nexe',
1334 'out_pnacl_newlib_x86_64_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_x64.nexe',
1335 'out_pnacl_newlib_arm_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_arm.nexe',
1336 'out_pnacl_newlib_mips_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_mips32.nexe',
1337 'out_pnacl_newlib_x86_32_nonsfi_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_x32_nonsfi.nexe',
1338 'tool_name': 'pnacl_newlib',
1339 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib',
1340 'out_pnacl_newlib%': '<(PRODUCT_DIR)/>(nexe_target)_newlib.pexe',
1341 'objdir_pnacl_newlib%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_name)',
1345 'translate_flags': [],
1349 'action_name': 'build newlib pexe',
1351 'source_list_pnacl_newlib%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1353 'msvs_cygwin_shell': 0,
1354 'description': 'building >(out_pnacl_newlib)',
1356 '<(DEPTH)/native_client/build/build_nexe.py',
1357 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1359 '>@(extra_deps_pnacl_newlib)',
1360 '^(source_list_pnacl_newlib)',
1361 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
1363 'outputs': ['>(out_pnacl_newlib)'],
1366 '<(DEPTH)/native_client/build/build_nexe.py',
1367 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1370 '--build', 'newlib_pexe',
1371 '--root', '<(DEPTH)',
1372 '--name', '>(out_pnacl_newlib)',
1373 '--objdir', '>(objdir_pnacl_newlib)',
1374 '--config-name', '<(CONFIGURATION_NAME)',
1375 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1376 '--compile_flags=^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1377 '--gomadir', '<(gomadir)',
1378 '--defines=^(defines) >(_defines)',
1379 '--link_flags=-B<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib/lib ^(link_flags) >(_link_flags)',
1380 '--source-list=^(source_list_pnacl_newlib)',
1383 'target_conditions': [
1384 [ 'enable_x86_32!=0', {
1386 'action_name': 'translate newlib pexe to x86-32 nexe',
1387 'msvs_cygwin_shell': 0,
1388 'description': 'translating >(out_pnacl_newlib_x86_32_nexe)',
1390 # Having this in the input somehow causes devenv warnings
1391 # when building pnacl browser tests.
1392 # '<(DEPTH)/native_client/build/build_nexe.py',
1393 '>(out_pnacl_newlib)',
1395 'outputs': [ '>(out_pnacl_newlib_x86_32_nexe)' ],
1398 '<(DEPTH)/native_client/build/build_nexe.py',
1399 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1401 '--build', 'newlib_translate',
1402 '--root', '<(DEPTH)',
1403 '--name', '>(out_pnacl_newlib_x86_32_nexe)',
1404 '--config-name', '<(CONFIGURATION_NAME)',
1405 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_lib_dir_pnacl_translate)/lib-x86-32',
1406 '>(out_pnacl_newlib)',
1410 [ 'enable_x86_32_nonsfi!=0', {
1412 'action_name': 'translate newlib pexe to x86-32-nonsfi nexe',
1413 'msvs_cygwin_shell': 0,
1414 'description': 'translating >(out_pnacl_newlib_x86_32_nonsfi_nexe)',
1416 # Having this in the input somehow causes devenv warnings
1417 # when building pnacl browser tests.
1418 # '<(DEPTH)/native_client/build/build_nexe.py',
1419 '>(out_pnacl_newlib)',
1421 'outputs': [ '>(out_pnacl_newlib_x86_32_nonsfi_nexe)' ],
1424 '<(DEPTH)/native_client/build/build_nexe.py',
1425 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1426 '--arch', 'x86-32-nonsfi',
1427 '--build', 'newlib_translate',
1428 '--root', '<(DEPTH)',
1429 '--name', '>(out_pnacl_newlib_x86_32_nonsfi_nexe)',
1430 '--config-name', '<(CONFIGURATION_NAME)',
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', {
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)' ],
1450 '<(DEPTH)/native_client/build/build_nexe.py',
1451 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1453 '--build', 'newlib_translate',
1454 '--root', '<(DEPTH)',
1455 '--name', '>(out_pnacl_newlib_x86_64_nexe)',
1456 '--config-name', '<(CONFIGURATION_NAME)',
1457 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_lib_dir_pnacl_translate)/lib-x86-64',
1458 '>(out_pnacl_newlib)',
1462 [ 'enable_arm!=0', {
1464 'action_name': 'translate newlib pexe to ARM nexe',
1465 'msvs_cygwin_shell': 0,
1466 'description': 'translating >(out_pnacl_newlib_arm_nexe)',
1468 # Having this in the input somehow causes devenv warnings
1469 # when building pnacl browser tests.
1470 # '<(DEPTH)/native_client/build/build_nexe.py',
1471 '>(out_pnacl_newlib)',
1473 'outputs': [ '>(out_pnacl_newlib_arm_nexe)' ],
1476 '<(DEPTH)/native_client/build/build_nexe.py',
1477 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1479 '--build', 'newlib_translate',
1480 '--root', '<(DEPTH)',
1481 '--name', '>(out_pnacl_newlib_arm_nexe)',
1482 '--config-name', '<(CONFIGURATION_NAME)',
1483 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_lib_dir_pnacl_translate)/lib-arm',
1484 '>(out_pnacl_newlib)',
1488 [ 'enable_mips!=0', {
1490 'action_name': 'translate newlib pexe to MIPS nexe',
1491 'msvs_cygwin_shell': 0,
1492 'description': 'translating >(out_pnacl_newlib_mips_nexe)',
1494 # Having this in the input somehow causes devenv warnings
1495 # when building pnacl browser tests.
1496 # '<(DEPTH)/native_client/build/build_nexe.py',
1497 '>(out_pnacl_newlib)',
1499 'outputs': [ '>(out_pnacl_newlib_mips_nexe)' ],
1502 '<(DEPTH)/native_client/build/build_nexe.py',
1503 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1505 '--build', 'newlib_translate',
1506 '--root', '<(DEPTH)',
1507 '--name', '>(out_pnacl_newlib_mips_nexe)',
1508 '--config-name', '<(CONFIGURATION_NAME)',
1509 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_lib_dir_pnacl_translate)/lib-mips32',
1510 '>(out_pnacl_newlib)',
1515 }], # end pnacl actions for building pexes and translating to nexes
1516 # pnacl action for building portable bitcode libraries
1517 ['nlib_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0'
1518 'and pnacl_native_biased==0', {
1520 'tool_name': 'pnacl_newlib',
1521 'objdir_pnacl_newlib%': '>(INTERMEDIATE_DIR)/<(tool_name)-pnacl/>(_target_name)',
1522 'out_pnacl_newlib%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib/>(nlib_target)',
1526 'action_name': 'build newlib plib',
1528 'source_list_pnacl_newlib%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1530 'msvs_cygwin_shell': 0,
1531 'description': 'building >(out_pnacl_newlib)',
1533 '<(DEPTH)/native_client/build/build_nexe.py',
1534 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1536 '>@(extra_deps_pnacl_newlib)',
1537 '^(source_list_pnacl_newlib)',
1538 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep',
1540 'outputs': ['>(out_pnacl_newlib)'],
1543 '<(DEPTH)/native_client/build/build_nexe.py',
1544 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1547 '--build', 'newlib_plib',
1548 '--root', '<(DEPTH)',
1549 '--name', '>(out_pnacl_newlib)',
1550 '--objdir', '>(objdir_pnacl_newlib)',
1551 '--config-name', '<(CONFIGURATION_NAME)',
1552 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1553 '--compile_flags=^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1554 '--gomadir', '<(gomadir)',
1555 '--defines=^(defines) >(_defines)',
1556 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1557 '--source-list=^(source_list_pnacl_newlib)',
1561 }], # end pnacl actions for bitcode libraries
1562 ], # end target conditions for pnacl pexe/plib
1563 # pnacl actions for building ABI-biased native libraries
1566 ['target_arch=="arm"', {
1567 'target_conditions': [
1568 ['disable_pnacl==0 and pnacl_native_biased==1 and nlib_target!="" and build_pnacl_newlib!=0', {
1570 'tool_name': 'pnacl_newlib_arm',
1571 'out_pnacl_newlib_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>(nlib_target)',
1572 'objdir_pnacl_newlib_arm%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_name)',
1576 'action_name': 'build newlib arm nlib (via pnacl)',
1578 'source_list_pnacl_newlib_arm%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1580 'msvs_cygwin_shell': 0,
1581 'description': 'building >(out_pnacl_newlib_arm)',
1583 '<(DEPTH)/native_client/build/build_nexe.py',
1584 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1586 '>@(extra_deps_pnacl_newlib)',
1587 '^(source_list_pnacl_newlib_arm)',
1588 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep'
1590 'outputs': ['>(out_pnacl_newlib_arm)'],
1593 '<(DEPTH)/native_client/build/build_nexe.py',
1594 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1597 '--build', 'newlib_nlib_pnacl',
1598 '--root', '<(DEPTH)',
1599 '--name', '>(out_pnacl_newlib_arm)',
1600 '--objdir', '>(objdir_pnacl_newlib_arm)',
1601 '--config-name', '<(CONFIGURATION_NAME)',
1602 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1603 '--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)',
1604 '--gomadir', '<(gomadir)',
1605 '--defines=^(defines) >(_defines)',
1606 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1607 '--source-list=^(source_list_pnacl_newlib_arm)',
1614 # ia32 or x64 (want to build both for Windows)
1615 ['target_arch=="ia32" or target_arch=="x64"', {
1616 'target_conditions': [
1618 ['enable_x86_64!=0 and disable_pnacl==0 and pnacl_native_biased==1 '
1619 'and nlib_target!="" and build_pnacl_newlib!=0', {
1621 'tool_name': 'pnacl_newlib_x86_64',
1622 'out_pnacl_newlib_x86_64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib-x86-64/>(nlib_target)',
1623 'objdir_pnacl_newlib_x86_64%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_name)',
1627 'action_name': 'build newlib x86-64 nlib (via pnacl)',
1629 'source_list_pnacl_newlib_x86_64%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1631 'msvs_cygwin_shell': 0,
1632 'description': 'building >(out_pnacl_newlib_x86_64)',
1634 '<(DEPTH)/native_client/build/build_nexe.py',
1635 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1637 '>@(extra_deps_pnacl_newlib)',
1638 '^(source_list_pnacl_newlib_x86_64)',
1639 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep'
1641 'outputs': ['>(out_pnacl_newlib_x86_64)'],
1644 '<(DEPTH)/native_client/build/build_nexe.py',
1645 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1648 '--build', 'newlib_nlib_pnacl',
1649 '--root', '<(DEPTH)',
1650 '--name', '>(out_pnacl_newlib_x86_64)',
1651 '--objdir', '>(objdir_pnacl_newlib_x86_64)',
1652 '--config-name', '<(CONFIGURATION_NAME)',
1653 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1654 '--compile_flags=--target=x86_64-unknown-nacl --pnacl-allow-translate -arch x86-64 ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1655 '--gomadir', '<(gomadir)',
1656 '--defines=^(defines) >(_defines)',
1657 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1658 '--source-list=^(source_list_pnacl_newlib_x86_64)',
1664 ['enable_x86_32!=0 and disable_pnacl==0 and pnacl_native_biased==1 '
1665 'and nlib_target!="" and build_pnacl_newlib!=0', {
1667 'tool_name': 'pnacl_newlib_x86_32',
1668 'out_pnacl_newlib_x86_32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib-x86-32/>(nlib_target)',
1669 'objdir_pnacl_newlib_x86_32%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_name)',
1673 'action_name': 'build newlib x86-32 nlib (via pnacl)',
1675 'source_list_pnacl_newlib_x86_32%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1677 'msvs_cygwin_shell': 0,
1678 'description': 'building >(out_pnacl_newlib_x86_32)',
1680 '<(DEPTH)/native_client/build/build_nexe.py',
1681 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1683 '>@(extra_deps_pnacl_newlib)',
1684 '^(source_list_pnacl_newlib_x86_32)',
1685 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep'
1687 'outputs': ['>(out_pnacl_newlib_x86_32)'],
1690 '<(DEPTH)/native_client/build/build_nexe.py',
1691 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1694 '--build', 'newlib_nlib_pnacl',
1695 '--root', '<(DEPTH)',
1696 '--name', '>(out_pnacl_newlib_x86_32)',
1697 '--objdir', '>(objdir_pnacl_newlib_x86_32)',
1698 '--config-name', '<(CONFIGURATION_NAME)',
1699 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1700 '--compile_flags=--target=i686-unknown-nacl --pnacl-allow-translate -arch x86-32 ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1701 '--gomadir', '<(gomadir)',
1702 '--defines=^(defines) >(_defines)',
1703 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1704 '--source-list=^(source_list_pnacl_newlib_x86_32)',
1709 # Non-SFI mode for ia32.
1710 ['enable_x86_32_nonsfi!=0 and disable_pnacl==0 and '
1711 'pnacl_native_biased==1 and nlib_target!="" and '
1712 'build_pnacl_newlib!=0', {
1714 'tool_name': 'pnacl_newlib_x86_32',
1715 # TODO(hidehiko): replace with (tc_lib_dir_pnacl_translate)/
1716 # lib-x86-32-nonsfi/>(nlib_target) to be more consistent with
1718 'out_pnacl_newlib_x86_32_nonsfi%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib-x86-32-nonsfi/>(nlib_target)',
1719 'objdir_pnacl_newlib_x86_32_nonsfi%': '>(INTERMEDIATE_DIR)/<(tool_name)-nonsfi/>(_target_name)',
1723 'action_name': 'build newlib x86-32-nonsfi nlib (via pnacl)',
1725 'source_list_pnacl_newlib_x86_32_nonsfi%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1727 'msvs_cygwin_shell': 0,
1728 'description': 'building >(out_pnacl_newlib_x86_32_nonsfi)',
1730 '<(DEPTH)/native_client/build/build_nexe.py',
1731 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1733 '>@(extra_deps_pnacl_newlib)',
1734 '^(source_list_pnacl_newlib_x86_32_nonsfi)',
1735 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep'
1737 'outputs': ['>(out_pnacl_newlib_x86_32_nonsfi)'],
1740 '<(DEPTH)/native_client/build/build_nexe.py',
1741 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1743 '--arch', 'x86-32-nonsfi',
1744 '--build', 'newlib_nlib_pnacl',
1745 '--root', '<(DEPTH)',
1746 '--name', '>(out_pnacl_newlib_x86_32_nonsfi)',
1747 '--objdir', '>(objdir_pnacl_newlib_x86_32_nonsfi)',
1748 '--config-name', '<(CONFIGURATION_NAME)',
1749 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1750 '--compile_flags=--target=i686-unknown-nacl --pnacl-allow-native --pnacl-allow-translate -arch x86-32-nonsfi ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1751 '--gomadir', '<(gomadir)',
1752 '--defines=^(defines) >(_defines)',
1753 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1754 '--source-list=^(source_list_pnacl_newlib_x86_32_nonsfi)',
1758 }], # end ia32 Non-SFI mode.
1759 ], # end ia32 or x64
1762 # The shim is not biased since the IRT itself is not biased.
1763 ['target_arch=="mipsel"', {
1764 'target_conditions': [
1765 ['disable_pnacl==0 and pnacl_native_biased==1 and nlib_target!="" and build_pnacl_newlib!=0', {
1767 'tool_name': 'pnacl_newlib_mips',
1768 'out_pnacl_newlib_mips%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libmips/>(nlib_target)',
1769 'objdir_pnacl_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_name)',
1773 'action_name': 'build newlib mips nlib (via pnacl)',
1775 'source_list_pnacl_newlib_mips%': '^|(<(tool_name).>(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
1777 'msvs_cygwin_shell': 0,
1778 'description': 'building >(out_pnacl_newlib_mips)',
1780 '<(DEPTH)/native_client/build/build_nexe.py',
1781 '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))',
1783 '>@(extra_deps_pnacl_newlib)',
1784 '^(source_list_pnacl_newlib_mips)',
1785 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/pnacl_newlib/stamp.prep'
1787 'outputs': ['>(out_pnacl_newlib_mips)'],
1790 '<(DEPTH)/native_client/build/build_nexe.py',
1791 '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/',
1794 '--build', 'newlib_nlib_pnacl',
1795 '--root', '<(DEPTH)',
1796 '--name', '>(out_pnacl_newlib_mips)',
1797 '--objdir', '>(objdir_pnacl_newlib_mips)',
1798 '--config-name', '<(CONFIGURATION_NAME)',
1799 '--include-dirs=>(tc_include_dir_pnacl_newlib) ^(include_dirs) >(_include_dirs)',
1800 '--compile_flags=--pnacl-allow-translate -arch mips ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)',
1801 '--gomadir', '<(gomadir)',
1802 '--defines=^(defines) >(_defines)',
1803 '--link_flags=-B>(tc_lib_dir_pnacl_newlib) ^(link_flags) >(_link_flags)',
1804 '--source-list=^(source_list_pnacl_newlib_mips)',
1811 # end pnacl actions for building ABI-biased native libraries
1812 ], # end conditions for pnacl biased nlib