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

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 }, 12 },
13 'conditions': [ 13 'conditions': [
14 # NOTE: we do not support untrusted gyp build on arm yet.
15 ['target_arch!="arm"', { 14 ['target_arch!="arm"', {
16 'target_defaults': { 15 'target_defaults': {
17 'conditions': [ 16 'conditions': [
18 ['OS=="win"', { 17 ['OS=="win"', {
19 'variables': { 18 'variables': {
20 'python_exe': 'call <(DEPTH)/native_client/tools/win_py.cmd', 19 'python_exe': 'call <(DEPTH)/native_client/tools/win_py.cmd',
21 }, 20 },
22 }, { 21 }, {
23 'variables': { 22 'variables': {
24 'python_exe': 'python', 23 'python_exe': 'python',
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 '>(python_exe)', '<(DEPTH)/native_client/build/scan_sources.py', 60 '>(python_exe)', '<(DEPTH)/native_client/build/scan_sources.py',
62 # This is needed to open the .c filenames, which are given 61 # This is needed to open the .c filenames, which are given
63 # relative to the .gyp file. 62 # relative to the .gyp file.
64 '-I.', 63 '-I.',
65 # This is needed to open the .h filenames, which are given 64 # This is needed to open the .h filenames, which are given
66 # relative to the native_client directory's parent. 65 # relative to the native_client directory's parent.
67 '-I<(DEPTH)', 66 '-I<(DEPTH)',
68 ], 67 ],
69 }, 68 },
70 }, 69 },
70 }, {
71 # ARM case
72 'target_defaults': {
73 'variables': {
Mark Seaborn 2012/03/22 17:13:21 Indent -1
Nikolay 2012/03/23 11:35:20 Done.
74 'python_exe': 'python',
75 'nexe_target': '',
76 'nlib_target': '',
77 'build_newlib': 0,
78 'build_glibc': 0,
79 'disable_glibc%': 1,
80 'extra_args': [],
81 'enable_arm': 1,
82 'extra_depsarm': [],
Mark Seaborn 2012/03/22 17:13:21 This is only set in the Chromium tree, right? I'd
Nikolay 2012/03/23 11:35:20 Yep, sounds reasonable, but matching variables for
83 'lib_dirs': [],
84 'include_dirs': ['<(DEPTH)','<(DEPTH)/ppapi'],
Mark Seaborn 2012/03/22 17:13:21 Space after ','. (I realise you're copying existi
Nikolay 2012/03/23 11:35:20 Done.
85 'defines': [
86 '-DNACL_BUILD_ARCH=arm',
87 '-D__linux__',
88 '-D__STDC_LIMIT_MACROS=1',
89 '-D__STDC_FORMAT_MACROS=1',
90 '-D_GNU_SOURCE=1',
91 '-D_BSD_SOURCE=1',
92 '-D_POSIX_C_SOURCE=199506',
93 '-D_XOPEN_SOURCE=600',
94 '-DDYNAMIC_ANNOTATIONS_ENABLED=1',
95 '-DDYNAMIC_ANNOTATIONS_PREFIX=NACL_',
96 ],
97 'compile_flags': [
98 #'-std=gnu99', Added by build_nexe
99 '-O2',
Mark Seaborn 2012/03/22 17:13:21 The x86 version uses -O3. I'm curious why you use
Nikolay 2012/03/23 11:35:20 Thanks for catching, fixed. Originally I was unsur
100 ],
101 'link_flags': [],
102 'get_sources': [
103 '>(python_exe)', '<(DEPTH)/native_client/build/scan_sources.py',
104 # This is needed to open the .c filenames, which are given
105 # relative to the .gyp file.
106 '-I.',
107 # This is needed to open the .h filenames, which are given
108 # relative to the native_client directory's parent.
109 '-I<(DEPTH)',
110 ],
111 },
112 },
71 }], 113 }],
72 ['target_arch=="x64" or OS=="win"', { 114 ['target_arch=="x64" or OS=="win"', {
73 'target_defaults': { 115 'target_defaults': {
74 'target_conditions': [ 116 'target_conditions': [
75 ['nexe_target!="" and build_newlib!=0 and enable_x86_64!=0', { 117 ['nexe_target!="" and build_newlib!=0 and enable_x86_64!=0', {
76 'variables': { 118 'variables': {
77 'tool_name': 'newlib', 119 'tool_name': 'newlib',
78 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', 120 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
79 'out64%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x64.nexe', 121 'out64%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_x64.nexe',
80 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)', 122 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)',
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 '>@(defines)', '-DNACL_BUILD_SUBARCH=32', 280 '>@(defines)', '-DNACL_BUILD_SUBARCH=32',
239 '--link_flags', '-m32 -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/ lib32 >(link_flags)', 281 '--link_flags', '-m32 -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/ lib32 >(link_flags)',
240 '>@(sources)', 282 '>@(sources)',
241 ], 283 ],
242 }, 284 },
243 ], 285 ],
244 }], 286 }],
245 ], 287 ],
246 }, 288 },
247 }], 289 }],
290 ['target_arch=="arm"', {
291 'target_defaults': {
292 'target_conditions': [
293 ['nexe_target!="" and build_newlib!=0', {
Mark Seaborn 2012/03/22 17:13:21 Indent -1. Generally blocks should be indented by
Nikolay 2012/03/23 11:35:20 Thanks, actually it seems gyp-mode in Emacs know t
294 'variables': {
295 'tool_name': 'newlib',
Mark Seaborn 2012/03/22 17:13:21 Indent -1
Nikolay 2012/03/23 11:36:18 Done.
296 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
297 'outarm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe',
Mark Seaborn 2012/03/22 17:13:21 Can you rename 'outarm' -> 'out_arm'?
Nikolay 2012/03/23 11:35:20 Same as above? x86 version called out32 and out64,
298 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-arm/>(_target_name) ',
299 },
300 'actions': [
301 {
302 'action_name': 'build newlib arm nexe',
303 'msvs_cygwin_shell': 0,
304 'description': 'building >(outarm)',
305 'inputs': [
306 '<(DEPTH)/native_client/build/build_nexe.py',
Mark Seaborn 2012/03/22 17:13:21 Indent -1
Nikolay 2012/03/23 11:35:20 Done.
307 '<(DEPTH)/ppapi/ppapi_cpp.gypi',
308 '>!@(>(get_sources) >(sources))',
309 '>@(extra_depsarm)',
310 ],
311 'outputs': ['>(outarm)'],
312 'action': [
313 '>(python_exe)',
314 '<(DEPTH)/native_client/build/build_nexe.py',
315 '>@(extra_args)',
316 '--arch', 'arm',
317 '--build', 'newlib_nexe',
318 '--root', '<(DEPTH)',
319 '--name', '>(outarm)',
320 '--objdir', '>(objdir)',
321 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(incl ude_dirs)',
322 '--lib-dirs', '>(lib_dirs) ',
323 '--compile_flags', ' >@(compile_flags)',
Mark Seaborn 2012/03/22 17:13:21 Remove space: '>@(compile_flags)'
Nikolay 2012/03/23 11:35:20 Done.
324 '>@(defines)', '-DNACL_BUILD_SUBARCH=32',
325 '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32 >(link_flags)',
326 '>@(sources)',
327 ],
328 },
329 ],
330 }],
331 ],
332 },
333 }],
334 ['target_arch=="arm"', {
335 'target_defaults': {
336 'target_conditions': [
337 ['nlib_target!="" and build_newlib!=0', {
338 'variables': {
339 'tool_name': 'newlib',
340 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
341 'outarm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>( nlib_target)',
342 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-arm/>(_target_name) ',
343 },
344 'actions': [
345 {
346 'action_name': 'build newlib arm nlib',
347 'msvs_cygwin_shell': 0,
348 'description': 'building >(outarm)',
349 'inputs': [
350 '<(DEPTH)/native_client/build/build_nexe.py',
351 '<(DEPTH)/ppapi/ppapi_cpp.gypi',
352 '>!@(>(get_sources) >(sources))',
353 '>@(extra_depsarm)',
354 ],
355 'outputs': ['>(outarm)'],
356 'action': [
357 '>(python_exe)',
358 '<(DEPTH)/native_client/build/build_nexe.py',
359 '>@(extra_args)',
360 '--arch', 'arm',
361 '--build', 'newlib_nlib',
362 '--root', '<(DEPTH)',
363 '--name', '>(outarm)',
364 '--objdir', '>(objdir)',
365 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(incl ude_dirs)',
366 '--lib-dirs', '>(lib_dirs) ',
367 '--compile_flags', ' >@(compile_flags)',
368 '>@(defines)', '-DNACL_BUILD_SUBARCH=32',
369 '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libar m >(link_flags)',
370 '>@(sources)',
371 ],
372 },
373 ],
374 }],
375 ],
376 },
377 }],
248 ['target_arch=="x64" or OS=="win"', { 378 ['target_arch=="x64" or OS=="win"', {
249 'target_defaults': { 379 'target_defaults': {
250 'target_conditions': [ 380 'target_conditions': [
251 ['nexe_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable _glibc==0', { 381 ['nexe_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable _glibc==0', {
252 'variables': { 382 'variables': {
253 'tool_name': 'glibc', 383 'tool_name': 'glibc',
254 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc', 384 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc',
255 'out64%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x64.nexe', 385 'out64%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x64.nexe',
256 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)', 386 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)',
257 }, 387 },
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 '>@(sources)', 546 '>@(sources)',
417 ], 547 ],
418 }, 548 },
419 ], 549 ],
420 }], 550 }],
421 ], 551 ],
422 }, 552 },
423 }], 553 }],
424 ], 554 ],
425 } 555 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698