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

Side by Side Diff: build/untrusted.gypi

Issue 9816003: GYP build for ARM untrusted runtime. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
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 # See native_client/Sconstruct for more details. 7 # See native_client/Sconstruct for more details.
8 # Expected address for beginning of data in for the IRT. 8 # Expected address for beginning of data in for the IRT.
9 'NACL_IRT_DATA_START': '0x3ef00000', 9 'NACL_IRT_DATA_START': '0x3ef00000',
10 # Expected address for beginning of code in for the IRT. 10 # Expected address for beginning of code in for the IRT.
11 'NACL_IRT_TEXT_START': '0x0fc00000', 11 'NACL_IRT_TEXT_START': '0x0fc00000',
12 # Default C compiler defines.
13 'default_defines': [
14 '-D__linux__',
15 '-D__STDC_LIMIT_MACROS=1',
16 '-D__STDC_FORMAT_MACROS=1',
17 '-D_GNU_SOURCE=1',
18 '-D_BSD_SOURCE=1',
19 '-D_POSIX_C_SOURCE=199506',
20 '-D_XOPEN_SOURCE=600',
21 '-DDYNAMIC_ANNOTATIONS_ENABLED=1',
22 '-DDYNAMIC_ANNOTATIONS_PREFIX=NACL_',
23 ],
24 'default_compile_flags': [
25 #'-std=gnu99', Added by build_nexe
26 '-O3',
27 ],
12 }, 28 },
13 'conditions': [ 29 'conditions': [
14 # NOTE: we do not support untrusted gyp build on arm yet.
15 ['target_arch!="arm"', { 30 ['target_arch!="arm"', {
16 'target_defaults': { 31 'target_defaults': {
17 'conditions': [ 32 'conditions': [
18 ['OS=="win"', { 33 ['OS=="win"', {
19 'variables': { 34 'variables': {
20 'python_exe': 'call <(DEPTH)/native_client/tools/win_py.cmd', 35 'python_exe': 'call <(DEPTH)/native_client/tools/win_py.cmd',
21 }, 36 },
22 }, { 37 }, {
23 'variables': { 38 'variables': {
24 'python_exe': 'python', 39 'python_exe': 'python',
25 }, 40 },
26 }], 41 }],
27 ], 42 ],
28 'variables': { 43 'variables': {
29 'nexe_target': '', 44 'nexe_target': '',
30 'nlib_target': '', 45 'nlib_target': '',
31 'build_newlib': 0, 46 'build_newlib': 0,
32 'build_glibc': 0, 47 'build_glibc': 0,
33 'disable_glibc%': 1, 48 'disable_glibc%': 1,
34 'extra_args': [], 49 'extra_args': [],
35 'enable_x86_32': 1, 50 'enable_x86_32': 1,
36 'enable_x86_64': 1, 51 'enable_x86_64': 1,
37 'extra_deps64': [], 52 'extra_deps64': [],
38 'extra_deps32': [], 53 'extra_deps32': [],
39 'lib_dirs': [], 54 'lib_dirs': [],
40 'include_dirs': ['<(DEPTH)','<(DEPTH)/ppapi'], 55 'include_dirs': ['<(DEPTH)','<(DEPTH)/ppapi'],
41 'defines': [ 56 'defines': [
57 '<@(default_defines)',
Mark Seaborn 2012/03/28 07:21:02 I think you don't need the 'defines'/'default_defi
Nikolay 2012/03/28 13:24:23 If I used defines, instead of default_defines, gyp
42 '-DNACL_BUILD_ARCH=x86', 58 '-DNACL_BUILD_ARCH=x86',
43 '-D__linux__',
44 '-D__STDC_LIMIT_MACROS=1',
45 '-D__STDC_FORMAT_MACROS=1',
46 '-D_GNU_SOURCE=1',
47 '-D_BSD_SOURCE=1',
48 '-D_POSIX_C_SOURCE=199506',
49 '-D_XOPEN_SOURCE=600',
50 '-DDYNAMIC_ANNOTATIONS_ENABLED=1',
51 '-DDYNAMIC_ANNOTATIONS_PREFIX=NACL_',
52 ], 59 ],
53 'compile_flags': [ 60 'compile_flags': [
54 #'-std=gnu99', Added by build_nexe 61 '<@(default_compile_flags)',
55 '-O3',
56 '-fomit-frame-pointer', 62 '-fomit-frame-pointer',
57 '-mtls-use-call' 63 '-mtls-use-call'
58 ], 64 ],
59 'link_flags': [], 65 'link_flags': [],
60 'get_sources': [ 66 'get_sources': [
61 '>(python_exe)', '<(DEPTH)/native_client/build/scan_sources.py', 67 '>(python_exe)', '<(DEPTH)/native_client/build/scan_sources.py',
62 # This is needed to open the .c filenames, which are given 68 # This is needed to open the .c filenames, which are given
63 # relative to the .gyp file. 69 # relative to the .gyp file.
64 '-I.', 70 '-I.',
65 # This is needed to open the .h filenames, which are given 71 # This is needed to open the .h filenames, which are given
66 # relative to the native_client directory's parent. 72 # relative to the native_client directory's parent.
67 '-I<(DEPTH)', 73 '-I<(DEPTH)',
68 ], 74 ],
69 }, 75 },
70 }, 76 },
77 }, {
78 # ARM case
79 'target_defaults': {
80 'variables': {
81 'python_exe': 'python',
82 'nexe_target': '',
83 'nlib_target': '',
84 'build_newlib': 0,
85 'build_glibc': 0,
86 'disable_glibc%': 1,
87 'extra_args': [],
88 'enable_arm': 1,
89 'extra_deps_arm': [],
90 'lib_dirs': [],
91 'include_dirs': ['<(DEPTH)','<(DEPTH)/ppapi'],
92 'defines': [
93 '<@(default_defines)',
94 '-DNACL_BUILD_ARCH=arm',
95 ],
96 'compile_flags': [
97 '<@(default_compile_flags)',
98 ],
99 'link_flags': [],
100 'get_sources': [
101 '>(python_exe)', '<(DEPTH)/native_client/build/scan_sources.py',
102 # This is needed to open the .c filenames, which are given
103 # relative to the .gyp file.
104 '-I.',
105 # This is needed to open the .h filenames, which are given
106 # relative to the native_client directory's parent.
107 '-I<(DEPTH)',
108 ],
109 },
110 },
71 }], 111 }],
72 ['target_arch=="x64" or OS=="win"', { 112 ['target_arch=="x64" or OS=="win"', {
73 'target_defaults': { 113 'target_defaults': {
74 'target_conditions': [ 114 'target_conditions': [
75 ['nexe_target!="" and build_newlib!=0 and enable_x86_64!=0', { 115 ['nexe_target!="" and build_newlib!=0 and enable_x86_64!=0', {
76 'variables': { 116 'variables': {
77 'tool_name': 'newlib', 117 'tool_name': 'newlib',
78 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', 118 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
79 'out64%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x64.nexe', 119 'out64%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x64.nexe',
80 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)', 120 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)',
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 'action': [ 222 'action': [
183 '>(python_exe)', 223 '>(python_exe)',
184 '<(DEPTH)/native_client/build/build_nexe.py', 224 '<(DEPTH)/native_client/build/build_nexe.py',
185 '>@(extra_args)', 225 '>@(extra_args)',
186 '--arch', 'x86-32', 226 '--arch', 'x86-32',
187 '--build', 'newlib_nexe', 227 '--build', 'newlib_nexe',
188 '--root', '<(DEPTH)', 228 '--root', '<(DEPTH)',
189 '--name', '>(out32)', 229 '--name', '>(out32)',
190 '--objdir', '>(objdir)', 230 '--objdir', '>(objdir)',
191 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(incl ude_dirs)', 231 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(incl ude_dirs)',
192 '--lib-dirs', '>(lib_dirs) ', 232 '--lib-dirs', '>(lib_dirs)',
193 '--compile_flags', '-m32 >@(compile_flags)', 233 '--compile_flags', '-m32 >@(compile_flags)',
194 '>@(defines)', '-DNACL_BUILD_SUBARCH=32', 234 '>@(defines)', '-DNACL_BUILD_SUBARCH=32',
195 '--link_flags', '-m32 -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/ lib32 >(link_flags)', 235 '--link_flags', '-m32 -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/ lib32 >(link_flags)',
196 '>@(sources)', 236 '>@(sources)',
197 ], 237 ],
198 }, 238 },
199 ], 239 ],
200 }], 240 }],
201 ], 241 ],
202 }, 242 },
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 '>@(defines)', '-DNACL_BUILD_SUBARCH=32', 278 '>@(defines)', '-DNACL_BUILD_SUBARCH=32',
239 '--link_flags', '-m32 -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/ lib32 >(link_flags)', 279 '--link_flags', '-m32 -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/ lib32 >(link_flags)',
240 '>@(sources)', 280 '>@(sources)',
241 ], 281 ],
242 }, 282 },
243 ], 283 ],
244 }], 284 }],
245 ], 285 ],
246 }, 286 },
247 }], 287 }],
248 ['target_arch=="x64" or OS=="win"', { 288 ['target_arch=="arm"', {
249 'target_defaults': { 289 'target_defaults': {
250 'target_conditions': [ 290 'target_conditions': [
251 ['nexe_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable _glibc==0', { 291 ['nexe_target!="" and build_newlib!=0', {
Mark Seaborn 2012/03/28 07:21:02 It's a bit disconcerting that this chunk appears a
Nikolay 2012/03/28 13:24:23 Thanks, it was indeed indent changes which confuse
252 'variables': { 292 'variables': {
253 'tool_name': 'glibc', 293 'tool_name': 'newlib',
254 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc', 294 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
255 'out64%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x64.nexe', 295 'out_arm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe',
256 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)', 296 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-arm/>(_target_name)' ,
257 }, 297 },
258 'actions': [ 298 'actions': [
259 { 299 {
260 'action_name': 'build glibc x86-64 nexe', 300 'action_name': 'build newlib arm nexe',
261 'msvs_cygwin_shell': 0, 301 'msvs_cygwin_shell': 0,
262 'description': 'building >(out64)', 302 'description': 'building >(out_arm)',
263 'inputs': [ 303 'inputs': [
264 '<(DEPTH)/native_client/build/build_nexe.py', 304 '<(DEPTH)/native_client/build/build_nexe.py',
265 '<(DEPTH)/ppapi/ppapi_cpp.gypi', 305 '<(DEPTH)/ppapi/ppapi_cpp.gypi',
266 '>!@(>(get_sources) >(sources))', 306 '>!@(>(get_sources) >(sources))',
267 '>@(extra_deps64)', 307 '>@(extra_deps_arm)',
268 ], 308 ],
269 'outputs': ['>(out64)'], 309 'outputs': ['>(out_arm)'],
270 'action': [ 310 'action': [
271 '>(python_exe)', 311 '>(python_exe)',
272 '<(DEPTH)/native_client/build/build_nexe.py', 312 '<(DEPTH)/native_client/build/build_nexe.py',
273 '>@(extra_args)', 313 '>@(extra_args)',
274 '--arch', 'x86-64', 314 '--arch', 'arm',
275 '--build', 'glibc_nexe', 315 '--build', 'newlib_nexe',
276 '--root', '<(DEPTH)', 316 '--root', '<(DEPTH)',
277 '--name', '>(out64)', 317 '--name', '>(out_arm)',
278 '--objdir', '>(objdir)', 318 '--objdir', '>(objdir)',
279 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(incl ude_dirs)', 319 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(incl ude_dirs)',
280 '--lib-dirs', '>(lib_dirs) ', 320 '--lib-dirs', '>(lib_dirs) ',
281 '--compile_flags', '-m64 >@(compile_flags) ', 321 '--compile_flags', '>@(compile_flags)',
282 '>@(defines)', '-DNACL_BUILD_SUBARCH=64', 322 '>@(defines)', '-DNACL_BUILD_SUBARCH=32',
283 '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64 >(link_flags) ', 323 '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32 >(link_flags)',
284 '>@(sources)', 324 '>@(sources)',
285 ], 325 ],
286 }, 326 },
287 ], 327 ],
288 }], 328 }],
289 ], 329 ],
290 }, 330 },
291 }], 331 }],
332 ['target_arch=="arm"', {
333 'target_defaults': {
334 'target_conditions': [
335 ['nlib_target!="" and build_newlib!=0', {
336 'variables': {
337 'tool_name': 'newlib',
338 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
339 'out_arm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>(n lib_target)',
340 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-arm/>(_target_name)',
341 },
342 'actions': [
343 {
344 'action_name': 'build newlib arm nlib',
345 'msvs_cygwin_shell': 0,
346 'description': 'building >(out_arm)',
347 'inputs': [
348 '<(DEPTH)/native_client/build/build_nexe.py',
349 '<(DEPTH)/ppapi/ppapi_cpp.gypi',
350 '>!@(>(get_sources) >(sources))',
351 '>@(extra_deps_arm)',
352 ],
353 'outputs': ['>(out_arm)'],
354 'action': [
355 '>(python_exe)',
356 '<(DEPTH)/native_client/build/build_nexe.py',
357 '>@(extra_args)',
358 '--arch', 'arm',
359 '--build', 'newlib_nlib',
360 '--root', '<(DEPTH)',
361 '--name', '>(out_arm)',
362 '--objdir', '>(objdir)',
363 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(inclu de_dirs)',
364 '--lib-dirs', '>(lib_dirs) ',
365 '--compile_flags', '>@(compile_flags)',
366 '>@(defines)', '-DNACL_BUILD_SUBARCH=32',
367 '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm >(link_flags)',
368 '>@(sources)',
369 ],
370 },
371 ],
372 }],
373 ],
374 },
375 }],
376 ['target_arch=="x64" or OS=="win"', {
377 'target_defaults': {
378 'target_conditions': [
379 ['nexe_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_ glibc==0', {
380 'variables': {
381 'tool_name': 'glibc',
Mark Seaborn 2012/03/28 07:21:02 I think you've changed the indentation in this blo
Nikolay 2012/03/28 13:24:23 Done.
382 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc',
383 'out64%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x64.nexe',
384 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_name )',
385 },
386 'actions': [
387 {
388 'action_name': 'build glibc x86-64 nexe',
389 'msvs_cygwin_shell': 0,
390 'description': 'building >(out64)',
391 'inputs': [
392 '<(DEPTH)/native_client/build/build_nexe.py',
393 '<(DEPTH)/ppapi/ppapi_cpp.gypi',
394 '>!@(>(get_sources) >(sources))',
395 '>@(extra_deps64)',
396 ],
397 'outputs': ['>(out64)'],
398 'action': [
399 '>(python_exe)',
400 '<(DEPTH)/native_client/build/build_nexe.py',
401 '>@(extra_args)',
402 '--arch', 'x86-64',
403 '--build', 'glibc_nexe',
404 '--root', '<(DEPTH)',
405 '--name', '>(out64)',
406 '--objdir', '>(objdir)',
407 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(inclu de_dirs)',
408 '--lib-dirs', '>(lib_dirs) ',
409 '--compile_flags', '-m64 >@(compile_flags) ',
410 '>@(defines)', '-DNACL_BUILD_SUBARCH=64',
411 '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64 > (link_flags) ',
412 '>@(sources)',
413 ],
414 },
415 ],
416 }],
417 ],
418 },
419 }],
292 ['target_arch=="x64" or OS=="win"', { 420 ['target_arch=="x64" or OS=="win"', {
293 'target_defaults': { 421 'target_defaults': {
294 'target_conditions': [ 422 'target_conditions': [
295 ['nlib_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable _glibc==0', { 423 ['nlib_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable _glibc==0', {
296 'variables': { 424 'variables': {
297 'tool_name': 'glibc', 425 'tool_name': 'glibc',
298 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc', 426 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc',
299 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)', 427 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)',
300 'out64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nl ib_target)', 428 'out64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nl ib_target)',
301 }, 429 },
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 '>@(sources)', 544 '>@(sources)',
417 ], 545 ],
418 }, 546 },
419 ], 547 ],
420 }], 548 }],
421 ], 549 ],
422 }, 550 },
423 }], 551 }],
424 ], 552 ],
425 } 553 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | src/shared/gio/gio.gyp » ('j') | src/shared/platform/platform.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698