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

Unified 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 side-by-side diff with in-line comments
Download patch
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': {
+ 'python_exe': 'python',
+ 'nexe_target': '',
+ 'nlib_target': '',
+ 'build_newlib': 0,
+ 'build_glibc': 0,
+ 'disable_glibc%': 1,
+ 'extra_args': [],
+ 'enable_arm': 1,
+ 'extra_depsarm': [],
+ 'lib_dirs': [],
+ 'include_dirs': ['<(DEPTH)','<(DEPTH)/ppapi'],
+ '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',
+ ],
+ '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', {
+ 'variables': {
+ 'tool_name': 'newlib',
+ 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib',
+ 'outarm%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_arm.nexe',
+ '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',
+ '<(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)',
+ '>@(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': [
« no previous file with comments | « build/common.gypi ('k') | src/untrusted/irt/irt.gyp » ('j') | src/untrusted/irt/irt.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698