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

Side by Side Diff: build/untrusted.gypi

Issue 666693005: Add rules for building ARM newlib nonsfi nexe with PNaCl toolchain. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 { 5 {
6 'variables': { 6 'variables': {
7 'variables': { 7 'variables': {
8 # Enable -Werror by default, but put it in a variable so it can 8 # Enable -Werror by default, but put it in a variable so it can
9 # be optionally disabled. 9 # be optionally disabled.
10 'werror%': '-Werror', 10 'werror%': '-Werror',
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 'build_irt': 0, 78 'build_irt': 0,
79 'build_nonsfi_helper': 0, 79 'build_nonsfi_helper': 0,
80 'disable_glibc%': 0, 80 'disable_glibc%': 0,
81 'disable_bionic%': 1, 81 'disable_bionic%': 1,
82 'extra_args': [], 82 'extra_args': [],
83 'enable_x86_32': 1, 83 'enable_x86_32': 1,
84 'enable_x86_64': 1, 84 'enable_x86_64': 1,
85 'enable_arm': 0, 85 'enable_arm': 0,
86 'enable_mips': 0, 86 'enable_mips': 0,
87 'enable_x86_32_nonsfi': 0, 87 'enable_x86_32_nonsfi': 0,
88 'enable_arm_nonsfi': 0,
88 'nacl_glibc_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_ x86/nacl_x86_glibc', 89 '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 '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_newlib32': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32',
91 'tc_lib_dir_newlib64': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64', 92 '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_glibc32': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32',
93 'tc_lib_dir_glibc64': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64', 94 '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_irt32': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/lib32',
95 'tc_lib_dir_irt64': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/lib64', 96 'tc_lib_dir_irt64': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/lib64',
96 'tc_lib_dir_nonsfi_helper32': '<(SHARED_INTERMEDIATE_DIR)/tc_nonsfi_he lper/lib32', 97 'tc_lib_dir_nonsfi_helper32': '<(SHARED_INTERMEDIATE_DIR)/tc_nonsfi_he lper/lib32',
97 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include ', 98 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include ',
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 'build_irt': 0, 135 'build_irt': 0,
135 'build_nonsfi_helper': 0, 136 'build_nonsfi_helper': 0,
136 'disable_glibc%': 1, 137 'disable_glibc%': 1,
137 'disable_bionic%': 1, 138 'disable_bionic%': 1,
138 'extra_args': [], 139 'extra_args': [],
139 'enable_x86_32': 0, 140 'enable_x86_32': 0,
140 'enable_x86_64': 0, 141 'enable_x86_64': 0,
141 'enable_arm': 1, 142 'enable_arm': 1,
142 'enable_mips': 0, 143 'enable_mips': 0,
143 'enable_x86_32_nonsfi': 0, 144 'enable_x86_32_nonsfi': 0,
145 'enable_arm_nonsfi': 0,
144 'extra_deps': [], 146 'extra_deps': [],
145 'extra_deps_newlib_arm': [], 147 'extra_deps_newlib_arm': [],
148 'extra_deps_newlib_arm_nonsfi': [],
146 'extra_deps_bionic_arm': [], 149 'extra_deps_bionic_arm': [],
147 'native_sources': [], 150 'native_sources': [],
148 'nacl_glibc_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_ x86/nacl_arm_glibc', 151 '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', 152 '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' , 153 'tc_lib_dir_bionic_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_bionic/libarm' ,
151 'tc_lib_dir_newlib_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm' , 154 'tc_lib_dir_newlib_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm' ,
152 'tc_lib_dir_irt_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/libarm', 155 'tc_lib_dir_irt_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/libarm',
156 'tc_lib_dir_nonsfi_helper_arm': '<(SHARED_INTERMEDIATE_DIR)/tc_nonsfi_ helper/libarm',
153 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include ', 157 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include ',
154 'tc_include_dir_bionic': '<(SHARED_INTERMEDIATE_DIR)/tc_bionic/include ', 158 'tc_include_dir_bionic': '<(SHARED_INTERMEDIATE_DIR)/tc_bionic/include ',
155 'include_dirs': ['<(DEPTH)'], 159 'include_dirs': ['<(DEPTH)'],
156 'defines': [ 160 'defines': [
157 '<@(nacl_default_defines)', 161 '<@(nacl_default_defines)',
158 'NACL_BUILD_ARCH=arm', 162 'NACL_BUILD_ARCH=arm',
159 ], 163 ],
160 'sources': [], 164 'sources': [],
161 'link_flags': [], 165 'link_flags': [],
162 }, 166 },
(...skipping 16 matching lines...) Expand all
179 'build_irt': 0, 183 'build_irt': 0,
180 'build_nonsfi_helper': 0, 184 'build_nonsfi_helper': 0,
181 'disable_glibc%': 1, 185 'disable_glibc%': 1,
182 'disable_bionic%': 1, 186 'disable_bionic%': 1,
183 'extra_args': [], 187 'extra_args': [],
184 'enable_x86_32': 0, 188 'enable_x86_32': 0,
185 'enable_x86_64': 0, 189 'enable_x86_64': 0,
186 'enable_arm': 0, 190 'enable_arm': 0,
187 'enable_mips': 1, 191 'enable_mips': 1,
188 'enable_x86_32_nonsfi': 0, 192 'enable_x86_32_nonsfi': 0,
193 'enable_arm_nonsfi': 0,
189 'extra_deps': [], 194 'extra_deps': [],
190 'extra_deps_newlib_mips': [], 195 'extra_deps_newlib_mips': [],
191 'native_sources': [], 196 'native_sources': [],
192 'nacl_glibc_tc_root': '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_ x86/nacl_mips_glibc', 197 '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', 198 '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/libmip s', 199 'tc_lib_dir_newlib_mips': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libmip s',
195 'tc_lib_dir_irt_mips': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/libmips', 200 'tc_lib_dir_irt_mips': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/libmips',
196 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include ', 201 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include ',
197 'include_dirs': ['<(DEPTH)'], 202 'include_dirs': ['<(DEPTH)'],
198 'defines': [ 203 'defines': [
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_in clude_dirs)', 852 '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_in clude_dirs)',
848 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_i rt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >( _compile_flags)', 853 '--compile_flags=-Wno-unused-local-typedefs -Wno-psabi ^(gcc_i rt_compile_flags) ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >( _compile_flags)',
849 '--gomadir', '<(gomadir)', 854 '--gomadir', '<(gomadir)',
850 '--defines=^(defines) >(_defines)', 855 '--defines=^(defines) >(_defines)',
851 '--link_flags=-B>(tc_lib_dir_irt_arm) ^(gcc_irt_link_flags) ^( link_flags) >(_link_flags)', 856 '--link_flags=-B>(tc_lib_dir_irt_arm) ^(gcc_irt_link_flags) ^( link_flags) >(_link_flags)',
852 '--source-list=^(source_list_newlib_arm)', 857 '--source-list=^(source_list_newlib_arm)',
853 ], 858 ],
854 }, 859 },
855 ], 860 ],
856 }], 861 }],
862
Mark Seaborn 2014/10/30 17:20:49 Nit: remove empty line to match the style in the r
mazda 2014/10/31 02:30:42 Done.
863 # ARM helper library build or PNaCl PPAPI shim for nonsfi
864 # build.
865 ['nlib_target!="" and (build_nonsfi_helper!=0 or (pnacl_native_biased! =0 and enable_arm_nonsfi==1))', {
866 'variables': {
867 'tool_name': 'nonsfi_helper',
868 'out_newlib_arm_nonsfi%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_na me)/libarm/>(nlib_target)',
869 'objdir_newlib_arm_nonsfi%': '>(INTERMEDIATE_DIR)/<(tool_name)-arm -nonsfi/>(_target_name)',
870 },
871 'actions': [
872 {
873 'action_name': 'build nonsfi_helper arm nlib',
874 'variables': {
875 'source_list_newlib_arm_nonsfi%': '^|(<(tool_name)-arm-nonsfi. >(_target_name).source_list.gypcmd ^(_sources) ^(sources))',
876 },
877 'msvs_cygwin_shell': 0,
878 'description': 'building >(out_newlib_arm_nonsfi)',
879 'inputs': [
880 '<(DEPTH)/native_client/build/build_nexe.py',
881 '>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include _dirs) -S >(sources) >(_sources))',
882 '>@(extra_deps)',
883 '>@(extra_deps_newlib_arm_nonsfi)',
884 '^(source_list_newlib_arm_nonsfi)',
885 '<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_arm_n ewlib/stamp.prep',
886 ],
887 'outputs': ['>(out_newlib_arm_nonsfi)'],
888 'action': [
889 '<@(common_args)',
890 '>@(extra_args)',
891 '--arch', 'arm-nonsfi',
892 '--build', 'newlib_nlib_pnacl',
893 '--name', '>(out_newlib_arm_nonsfi)',
894 '--objdir', '>(objdir_newlib_arm_nonsfi)',
895 '--include-dirs=>(tc_include_dir_newlib) <(DEPTH)/native_clien t/src/public/linux_syscalls ^(include_dirs) >(_include_dirs)',
896 '--compile_flags=--target=armv7-unknown-nacl-gnueabi --pnacl-b ias=arm-nonsfi --pnacl-allow-translate --pnacl-allow-native -arch arm-nonsfi -mf loat-abi=hard ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl _compile_flags)',
897 '--gomadir', '<(gomadir)',
898 '--defines=^(defines) >(_defines)',
899 '--link_flags=-B>(tc_lib_dir_nonsfi_helper_arm) ^(link_flags) >(_link_flags)',
900 '--source-list=^(source_list_newlib_arm_nonsfi)',
901 ],
902 },
903 ],
904 }],
905
Mark Seaborn 2014/10/30 17:20:49 ditto
mazda 2014/10/31 02:30:42 Done.
857 ], # end target_conditions for arm newlib (nexe/nlib) 906 ], # end target_conditions for arm newlib (nexe/nlib)
858 }, 907 },
859 }], # end target_arch = arm 908 }], # end target_arch = arm
860 ['target_arch=="mipsel"', { 909 ['target_arch=="mipsel"', {
861 'target_defaults': { 910 'target_defaults': {
862 'target_conditions': [ 911 'target_conditions': [
863 # mips newlib nexe action 912 # mips newlib nexe action
864 ['nexe_target!="" and build_newlib!=0', { 913 ['nexe_target!="" and build_newlib!=0', {
865 'variables': { 914 'variables': {
866 'tool_name': 'newlib', 915 'tool_name': 'newlib',
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 'target_conditions': [ 1387 'target_conditions': [
1339 # pnacl actions for building pexes and translating them 1388 # pnacl actions for building pexes and translating them
1340 ['nexe_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0 ' 1389 ['nexe_target!="" and disable_pnacl==0 and build_pnacl_newlib!=0 '
1341 'and pnacl_native_biased==0', { 1390 'and pnacl_native_biased==0', {
1342 'variables': { 1391 'variables': {
1343 'out_pnacl_newlib_x86_32_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl _newlib_x32.nexe', 1392 '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', 1393 '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_ne wlib_arm.nexe', 1394 'out_pnacl_newlib_arm_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_ne wlib_arm.nexe',
1346 'out_pnacl_newlib_mips_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_n ewlib_mips32.nexe', 1395 'out_pnacl_newlib_mips_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_n ewlib_mips32.nexe',
1347 'out_pnacl_newlib_x86_32_nonsfi_nexe%': '<(PRODUCT_DIR)/>(nexe_target )_pnacl_newlib_x32_nonsfi.nexe', 1396 'out_pnacl_newlib_x86_32_nonsfi_nexe%': '<(PRODUCT_DIR)/>(nexe_target )_pnacl_newlib_x32_nonsfi.nexe',
1397 'out_pnacl_newlib_arm_nonsfi_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_p nacl_newlib_arm_nonsfi.nexe',
1348 'tool_name': 'pnacl_newlib', 1398 'tool_name': 'pnacl_newlib',
1349 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib', 1399 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib',
1350 'out_pnacl_newlib%': '<(PRODUCT_DIR)/>(nexe_target)_newlib.pexe', 1400 'out_pnacl_newlib%': '<(PRODUCT_DIR)/>(nexe_target)_newlib.pexe',
1351 'objdir_pnacl_newlib%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_n ame)', 1401 'objdir_pnacl_newlib%': '>(INTERMEDIATE_DIR)/<(tool_name)/>(_target_n ame)',
1352 'link_flags': [ 1402 'link_flags': [
1353 '-O3', 1403 '-O3',
1354 ], 1404 ],
1355 'translate_flags': [], 1405 'translate_flags': [],
1356 }, 1406 },
1357 'actions': [ 1407 'actions': [
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 'action' : [ 1520 'action' : [
1471 '<@(common_args)', 1521 '<@(common_args)',
1472 '--arch', 'arm', 1522 '--arch', 'arm',
1473 '--build', 'newlib_translate', 1523 '--build', 'newlib_translate',
1474 '--name', '>(out_pnacl_newlib_arm_nexe)', 1524 '--name', '>(out_pnacl_newlib_arm_nexe)',
1475 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_ lib_dir_pnacl_translate)/lib-arm', 1525 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_ lib_dir_pnacl_translate)/lib-arm',
1476 '>(out_pnacl_newlib)', 1526 '>(out_pnacl_newlib)',
1477 ], 1527 ],
1478 }], 1528 }],
1479 }], 1529 }],
1530 [ 'enable_arm_nonsfi!=0 and translate_pexe_with_build!=0', {
1531 'actions': [{
1532 'action_name': 'translate newlib pexe to ARM-nonsfi nexe',
1533 'msvs_cygwin_shell': 0,
1534 'description': 'translating >(out_pnacl_newlib_arm_nonsfi_nexe)',
1535 'inputs': [
1536 # Having this in the input somehow causes devenv warnings
1537 # when building pnacl browser tests.
1538 # '<(DEPTH)/native_client/build/build_nexe.py',
1539 '>(out_pnacl_newlib)',
1540 ],
1541 'outputs': [ '>(out_pnacl_newlib_arm_nonsfi_nexe)' ],
1542 'action' : [
1543 '<@(common_args)',
1544 '--arch', 'arm-nonsfi',
1545 '--build', 'newlib_translate',
1546 '--name', '>(out_pnacl_newlib_arm_nonsfi_nexe)',
1547 '--link_flags=^(translate_flags) >(translate_flags) -Wl,-L>(tc_ lib_dir_pnacl_translate)/lib-arm-nonsfi',
1548 '>(out_pnacl_newlib)',
1549 ],
1550 }],
1551 }],
1480 [ 'enable_mips!=0 and translate_pexe_with_build!=0', { 1552 [ 'enable_mips!=0 and translate_pexe_with_build!=0', {
1481 'actions': [{ 1553 'actions': [{
1482 'action_name': 'translate newlib pexe to MIPS nexe', 1554 'action_name': 'translate newlib pexe to MIPS nexe',
1483 'msvs_cygwin_shell': 0, 1555 'msvs_cygwin_shell': 0,
1484 'description': 'translating >(out_pnacl_newlib_mips_nexe)', 1556 'description': 'translating >(out_pnacl_newlib_mips_nexe)',
1485 'inputs': [ 1557 'inputs': [
1486 # Having this in the input somehow causes devenv warnings 1558 # Having this in the input somehow causes devenv warnings
1487 # when building pnacl browser tests. 1559 # when building pnacl browser tests.
1488 # '<(DEPTH)/native_client/build/build_nexe.py', 1560 # '<(DEPTH)/native_client/build/build_nexe.py',
1489 '>(out_pnacl_newlib)', 1561 '>(out_pnacl_newlib)',
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 ], 1797 ],
1726 }, 1798 },
1727 ], 1799 ],
1728 }], 1800 }],
1729 ], 1801 ],
1730 }], # end MIPS 1802 }], # end MIPS
1731 # end pnacl actions for building ABI-biased native libraries 1803 # end pnacl actions for building ABI-biased native libraries
1732 ], # end conditions for pnacl biased nlib 1804 ], # end conditions for pnacl biased nlib
1733 }, 1805 },
1734 } 1806 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698