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

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
robertm 2012/03/23 15:03:38 can this be better merged with the one above so th
Nikolay 2012/03/26 13:29:56 I tried to follow style of the rest of this file.
72 'target_defaults': {
73 'variables': {
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': [],
83 'lib_dirs': [],
84 'include_dirs': ['<(DEPTH)','<(DEPTH)/ppapi'],
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 '-O3',
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 'action': [ 224 'action': [
183 '>(python_exe)', 225 '>(python_exe)',
184 '<(DEPTH)/native_client/build/build_nexe.py', 226 '<(DEPTH)/native_client/build/build_nexe.py',
185 '>@(extra_args)', 227 '>@(extra_args)',
186 '--arch', 'x86-32', 228 '--arch', 'x86-32',
187 '--build', 'newlib_nexe', 229 '--build', 'newlib_nexe',
188 '--root', '<(DEPTH)', 230 '--root', '<(DEPTH)',
189 '--name', '>(out32)', 231 '--name', '>(out32)',
190 '--objdir', '>(objdir)', 232 '--objdir', '>(objdir)',
191 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(incl ude_dirs)', 233 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(incl ude_dirs)',
192 '--lib-dirs', '>(lib_dirs) ', 234 '--lib-dirs', '>(lib_dirs)',
193 '--compile_flags', '-m32 >@(compile_flags)', 235 '--compile_flags', '-m32 >@(compile_flags)',
194 '>@(defines)', '-DNACL_BUILD_SUBARCH=32', 236 '>@(defines)', '-DNACL_BUILD_SUBARCH=32',
195 '--link_flags', '-m32 -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/ lib32 >(link_flags)', 237 '--link_flags', '-m32 -B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/ lib32 >(link_flags)',
196 '>@(sources)', 238 '>@(sources)',
197 ], 239 ],
198 }, 240 },
199 ], 241 ],
200 }], 242 }],
201 ], 243 ],
202 }, 244 },
(...skipping 35 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 }],
248 ['target_arch=="x64" or OS=="win"', { 290 ['target_arch=="arm"', {
249 'target_defaults': { 291 'target_defaults': {
250 'target_conditions': [ 292 'target_conditions': [
251 ['nexe_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable _glibc==0', { 293 ['nexe_target!="" and build_newlib!=0', {
252 'variables': { 294 'variables': {
253 'tool_name': 'glibc', 295 'tool_name': 'newlib',
254 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc', 296 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
255 'out64%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x64.nexe', 297 'outarm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe',
256 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)', 298 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-arm/>(_target_name)' ,
257 }, 299 },
258 'actions': [ 300 'actions': [
259 { 301 {
260 'action_name': 'build glibc x86-64 nexe', 302 'action_name': 'build newlib arm nexe',
261 'msvs_cygwin_shell': 0, 303 'msvs_cygwin_shell': 0,
262 'description': 'building >(out64)', 304 'description': 'building >(outarm)',
263 'inputs': [ 305 'inputs': [
264 '<(DEPTH)/native_client/build/build_nexe.py', 306 '<(DEPTH)/native_client/build/build_nexe.py',
265 '<(DEPTH)/ppapi/ppapi_cpp.gypi', 307 '<(DEPTH)/ppapi/ppapi_cpp.gypi',
266 '>!@(>(get_sources) >(sources))', 308 '>!@(>(get_sources) >(sources))',
267 '>@(extra_deps64)', 309 '>@(extra_depsarm)',
268 ], 310 ],
269 'outputs': ['>(out64)'], 311 'outputs': ['>(outarm)'],
270 'action': [ 312 'action': [
271 '>(python_exe)', 313 '>(python_exe)',
272 '<(DEPTH)/native_client/build/build_nexe.py', 314 '<(DEPTH)/native_client/build/build_nexe.py',
273 '>@(extra_args)', 315 '>@(extra_args)',
274 '--arch', 'x86-64', 316 '--arch', 'arm',
275 '--build', 'glibc_nexe', 317 '--build', 'newlib_nexe',
276 '--root', '<(DEPTH)', 318 '--root', '<(DEPTH)',
277 '--name', '>(out64)', 319 '--name', '>(outarm)',
278 '--objdir', '>(objdir)', 320 '--objdir', '>(objdir)',
279 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(incl ude_dirs)', 321 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(incl ude_dirs)',
280 '--lib-dirs', '>(lib_dirs) ', 322 '--lib-dirs', '>(lib_dirs) ',
281 '--compile_flags', '-m64 >@(compile_flags) ', 323 '--compile_flags', '>@(compile_flags)',
282 '>@(defines)', '-DNACL_BUILD_SUBARCH=64', 324 '>@(defines)', '-DNACL_BUILD_SUBARCH=32',
283 '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64 >(link_flags) ', 325 '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32 >(link_flags)',
284 '>@(sources)', 326 '>@(sources)',
285 ], 327 ],
286 }, 328 },
287 ], 329 ],
288 }], 330 }],
289 ], 331 ],
290 }, 332 },
291 }], 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/>(nl ib_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) >(inclu de_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/libarm >(link_flags)',
370 '>@(sources)',
371 ],
372 },
373 ],
374 }],
375 ],
376 },
377 }],
378 ['target_arch=="x64" or OS=="win"', {
379 'target_defaults': {
380 'target_conditions': [
381 ['nexe_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_ glibc==0', {
382 'variables': {
383 'tool_name': 'glibc',
384 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc',
385 'out64%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x64.nexe',
386 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_name )',
387 },
388 'actions': [
389 {
390 'action_name': 'build glibc x86-64 nexe',
391 'msvs_cygwin_shell': 0,
392 'description': 'building >(out64)',
393 'inputs': [
394 '<(DEPTH)/native_client/build/build_nexe.py',
395 '<(DEPTH)/ppapi/ppapi_cpp.gypi',
396 '>!@(>(get_sources) >(sources))',
397 '>@(extra_deps64)',
398 ],
399 'outputs': ['>(out64)'],
400 'action': [
401 '>(python_exe)',
402 '<(DEPTH)/native_client/build/build_nexe.py',
403 '>@(extra_args)',
404 '--arch', 'x86-64',
405 '--build', 'glibc_nexe',
406 '--root', '<(DEPTH)',
407 '--name', '>(out64)',
408 '--objdir', '>(objdir)',
409 '--include-dirs', '>(inst_dir)/include >(include_dirs) >(inclu de_dirs)',
410 '--lib-dirs', '>(lib_dirs) ',
411 '--compile_flags', '-m64 >@(compile_flags) ',
412 '>@(defines)', '-DNACL_BUILD_SUBARCH=64',
413 '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64 > (link_flags) ',
414 '>@(sources)',
415 ],
416 },
417 ],
418 }],
419 ],
420 },
421 }],
292 ['target_arch=="x64" or OS=="win"', { 422 ['target_arch=="x64" or OS=="win"', {
293 'target_defaults': { 423 'target_defaults': {
294 'target_conditions': [ 424 'target_conditions': [
295 ['nlib_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable _glibc==0', { 425 ['nlib_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable _glibc==0', {
296 'variables': { 426 'variables': {
297 'tool_name': 'glibc', 427 'tool_name': 'glibc',
298 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc', 428 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_glibc',
299 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)', 429 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-x86-64/>(_target_na me)',
300 'out64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nl ib_target)', 430 'out64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nl ib_target)',
301 }, 431 },
(...skipping 114 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