Chromium Code Reviews| Index: build/untrusted.gypi |
| =================================================================== |
| --- build/untrusted.gypi (revision 8056) |
| +++ build/untrusted.gypi (working copy) |
| @@ -11,7 +11,6 @@ |
| 'NACL_IRT_TEXT_START': '0x0fc00000', |
| }, |
| 'conditions': [ |
| - # NOTE: we do not support untrusted gyp build on arm yet. |
| ['target_arch!="arm"', { |
| 'target_defaults': { |
| 'conditions': [ |
| @@ -68,6 +67,49 @@ |
| ], |
| }, |
| }, |
| + }, { |
| + # ARM case |
| + 'target_defaults': { |
| + 'variables': { |
|
Mark Seaborn
2012/03/22 17:13:21
Indent -1
Nikolay
2012/03/23 11:35:20
Done.
|
| + 'python_exe': 'python', |
| + 'nexe_target': '', |
| + 'nlib_target': '', |
| + 'build_newlib': 0, |
| + 'build_glibc': 0, |
| + 'disable_glibc%': 1, |
| + 'extra_args': [], |
| + 'enable_arm': 1, |
| + '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
|
| + 'lib_dirs': [], |
| + '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.
|
| + 'defines': [ |
| + '-DNACL_BUILD_ARCH=arm', |
| + '-D__linux__', |
| + '-D__STDC_LIMIT_MACROS=1', |
| + '-D__STDC_FORMAT_MACROS=1', |
| + '-D_GNU_SOURCE=1', |
| + '-D_BSD_SOURCE=1', |
| + '-D_POSIX_C_SOURCE=199506', |
| + '-D_XOPEN_SOURCE=600', |
| + '-DDYNAMIC_ANNOTATIONS_ENABLED=1', |
| + '-DDYNAMIC_ANNOTATIONS_PREFIX=NACL_', |
| + ], |
| + 'compile_flags': [ |
| + #'-std=gnu99', Added by build_nexe |
| + '-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
|
| + ], |
| + 'link_flags': [], |
| + 'get_sources': [ |
| + '>(python_exe)', '<(DEPTH)/native_client/build/scan_sources.py', |
| + # This is needed to open the .c filenames, which are given |
| + # relative to the .gyp file. |
| + '-I.', |
| + # This is needed to open the .h filenames, which are given |
| + # relative to the native_client directory's parent. |
| + '-I<(DEPTH)', |
| + ], |
| + }, |
| + }, |
| }], |
| ['target_arch=="x64" or OS=="win"', { |
| 'target_defaults': { |
| @@ -245,6 +287,94 @@ |
| ], |
| }, |
| }], |
| + ['target_arch=="arm"', { |
| + 'target_defaults': { |
| + 'target_conditions': [ |
| + ['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
|
| + 'variables': { |
| + 'tool_name': 'newlib', |
|
Mark Seaborn
2012/03/22 17:13:21
Indent -1
Nikolay
2012/03/23 11:36:18
Done.
|
| + 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', |
| + '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,
|
| + 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-arm/>(_target_name)', |
| + }, |
| + 'actions': [ |
| + { |
| + 'action_name': 'build newlib arm nexe', |
| + 'msvs_cygwin_shell': 0, |
| + 'description': 'building >(outarm)', |
| + 'inputs': [ |
| + '<(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.
|
| + '<(DEPTH)/ppapi/ppapi_cpp.gypi', |
| + '>!@(>(get_sources) >(sources))', |
| + '>@(extra_depsarm)', |
| + ], |
| + 'outputs': ['>(outarm)'], |
| + 'action': [ |
| + '>(python_exe)', |
| + '<(DEPTH)/native_client/build/build_nexe.py', |
| + '>@(extra_args)', |
| + '--arch', 'arm', |
| + '--build', 'newlib_nexe', |
| + '--root', '<(DEPTH)', |
| + '--name', '>(outarm)', |
| + '--objdir', '>(objdir)', |
| + '--include-dirs', '>(inst_dir)/include >(include_dirs) >(include_dirs)', |
| + '--lib-dirs', '>(lib_dirs) ', |
| + '--compile_flags', ' >@(compile_flags)', |
|
Mark Seaborn
2012/03/22 17:13:21
Remove space: '>@(compile_flags)'
Nikolay
2012/03/23 11:35:20
Done.
|
| + '>@(defines)', '-DNACL_BUILD_SUBARCH=32', |
| + '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32 >(link_flags)', |
| + '>@(sources)', |
| + ], |
| + }, |
| + ], |
| + }], |
| + ], |
| + }, |
| + }], |
| + ['target_arch=="arm"', { |
| + 'target_defaults': { |
| + 'target_conditions': [ |
| + ['nlib_target!="" and build_newlib!=0', { |
| + 'variables': { |
| + 'tool_name': 'newlib', |
| + 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib', |
| + 'outarm%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libarm/>(nlib_target)', |
| + 'objdir%': '>(INTERMEDIATE_DIR)/>(tool_name)-arm/>(_target_name)', |
| + }, |
| + 'actions': [ |
| + { |
| + 'action_name': 'build newlib arm nlib', |
| + 'msvs_cygwin_shell': 0, |
| + 'description': 'building >(outarm)', |
| + 'inputs': [ |
| + '<(DEPTH)/native_client/build/build_nexe.py', |
| + '<(DEPTH)/ppapi/ppapi_cpp.gypi', |
| + '>!@(>(get_sources) >(sources))', |
| + '>@(extra_depsarm)', |
| + ], |
| + 'outputs': ['>(outarm)'], |
| + 'action': [ |
| + '>(python_exe)', |
| + '<(DEPTH)/native_client/build/build_nexe.py', |
| + '>@(extra_args)', |
| + '--arch', 'arm', |
| + '--build', 'newlib_nlib', |
| + '--root', '<(DEPTH)', |
| + '--name', '>(outarm)', |
| + '--objdir', '>(objdir)', |
| + '--include-dirs', '>(inst_dir)/include >(include_dirs) >(include_dirs)', |
| + '--lib-dirs', '>(lib_dirs) ', |
| + '--compile_flags', ' >@(compile_flags)', |
| + '>@(defines)', '-DNACL_BUILD_SUBARCH=32', |
| + '--link_flags', '-B<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libarm >(link_flags)', |
| + '>@(sources)', |
| + ], |
| + }, |
| + ], |
| + }], |
| + ], |
| + }, |
| + }], |
| ['target_arch=="x64" or OS=="win"', { |
| 'target_defaults': { |
| 'target_conditions': [ |