Chromium Code Reviews| Index: build/untrusted.gypi |
| diff --git a/build/untrusted.gypi b/build/untrusted.gypi |
| index 7471ef56a6fabf9eef9da4ea267929987bb71cec..b0303889fa0270c83cdde153565756ac251b8ac8 100755 |
| --- a/build/untrusted.gypi |
| +++ b/build/untrusted.gypi |
| @@ -48,7 +48,7 @@ |
| ] |
| }, |
| 'conditions': [ |
| - ['target_arch!="arm"', { |
| + ['target_arch=="ia32" or target_arch=="x64"', { |
| # Common defaults for all x86 nacl-gcc targets |
| 'target_defaults': { |
| 'conditions': [ |
| @@ -122,7 +122,8 @@ |
| ], |
| }, |
| }, |
| - }, { |
| + }], |
| + ['target_arch=="arm"', { |
| # Common defaults for all ARM nacl-gcc targets |
| 'target_defaults': { |
| 'defines': [], |
| @@ -169,7 +170,52 @@ |
| }, |
| }, |
| }], |
| - ['target_arch!="arm"', { |
| + ['target_arch=="mipsel"', { |
| + # Common defaults for all mips pnacl-clang targets |
| + 'target_defaults': { |
| + 'defines': [], |
| + 'sources': [], |
| + 'compile_flags': [], |
| + 'link_flags': [], |
| + 'include_dirs': [], |
| + 'variables': { |
| + 'newlib_tls_flags': [], |
| + 'python_exe': 'python', |
| + 'nexe_target': '', |
| + 'nlib_target': '', |
| + 'nso_target': '', |
| + 'build_newlib': 0, |
| + 'build_glibc': 0, |
| + 'build_irt': 0, |
| + 'disable_glibc%': 1, |
| + 'extra_args': [], |
| + 'enable_x86_32': 0, |
| + 'enable_x86_64': 0, |
| + 'enable_arm': 0, |
| + 'extra_deps_newlib_mips': [], |
| + 'tc_lib_dir_newlib_mips': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/libmips', |
| + 'tc_lib_dir_irt_mips': '<(SHARED_INTERMEDIATE_DIR)/tc_irt/libmips', |
| + 'tc_include_dir_newlib': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/include', |
| + 'include_dirs': ['<(DEPTH)'], |
| + 'defines': [ |
| + '<@(nacl_default_defines)', |
| + 'NACL_BUILD_ARCH=mips', |
| + ], |
| + 'sources': [], |
| + 'link_flags': [], |
| + 'get_sources': [ |
| + 'scan_sources', |
| + # 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=="ia32" or target_arch=="x64"', { |
| 'target_defaults': { |
| # x86-64 newlib nexe action |
| 'target_conditions': [ |
| @@ -703,7 +749,133 @@ |
| ], # end target_conditions for arm newlib (nexe/nlib, force_arm_pnacl) |
| }, |
| }], # end target_arch = arm |
| - ['target_arch!="arm"', { |
| + ['target_arch=="mipsel"', { |
| + 'target_defaults': { |
| + 'target_conditions': [ |
| + # mips newlib library action |
|
Mark Seaborn
2013/09/23 19:15:28
I'm comparing this with the target_arch=="arm" sec
petarj
2013/09/25 23:21:31
We planned that to be part of a different patch, b
|
| + ['nlib_target!="" and build_newlib!=0', { |
| + 'variables': { |
| + 'tool_name': 'newlib', |
| + 'out_newlib_mips%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libmips/>(nlib_target)', |
| + 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)', |
| + 'source_list_newlib_mips%': '<(tool_name)-mips.>(_target_name).source_list.gypcmd', |
| + }, |
| + 'actions': [ |
| + { |
| + 'action_name': 'build newlib mips nlib', |
| + 'msvs_cygwin_shell': 0, |
| + 'description': 'building >(out_newlib_mips)', |
| + 'inputs': [ |
| + '<(DEPTH)/native_client/build/build_nexe.py', |
| + '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))', |
| + '>@(extra_deps_newlib_mips)', |
| + '>(source_list_newlib_mips)', |
| + '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_pnacl/stamp.prep', |
| + ], |
| + 'outputs': ['>(out_newlib_mips)'], |
| + 'action': [ |
| + '>(python_exe)', |
| + '<(DEPTH)/native_client/build/build_nexe.py', |
| + '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', |
| + '>@(extra_args)', |
| + '--arch', 'mips', |
| + '--build', 'newlib_nlib', |
| + '--root', '<(DEPTH)', |
| + '--name', '>(out_newlib_mips)', |
| + '--objdir', '>(objdir_newlib_mips)', |
| + '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)', |
| + '--compile_flags= ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
| + '--defines=^(defines) >(_defines)', |
| + '--link_flags=-B>(tc_lib_dir_newlib_mips) ^(link_flags) >(_link_flags)', |
| + '--source-list=^|(<(source_list_newlib_mips) ^(_sources) ^(sources))', |
| + ], |
| + }, |
| + ], |
| + }], |
| + # mips irt nexe action |
| + ['nexe_target!="" and build_irt!=0', { |
| + 'variables': { |
| + 'tool_name': 'irt', |
| + 'out_newlib_mips%': '<(PRODUCT_DIR)/>(nexe_target)_newlib_mips.nexe', |
| + 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)', |
| + 'source_list_newlib_mips%': '<(tool_name)-mips.>(_target_name).source_list.gypcmd', |
| + }, |
| + 'actions': [ |
| + { |
| + 'action_name': 'build IRT mips nexe', |
| + 'msvs_cygwin_shell': 0, |
| + 'description': 'building >(out_newlib_mips)', |
| + 'inputs': [ |
| + '<(DEPTH)/native_client/build/build_nexe.py', |
| + '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))', |
| + '>@(extra_deps_newlib_mips)', |
| + '>(source_list_newlib_mips)', |
| + '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_pnacl/stamp.prep', |
| + ], |
| + 'outputs': ['>(out_newlib_mips)'], |
| + 'action': [ |
| + '>(python_exe)', |
| + '<(DEPTH)/native_client/build/build_nexe.py', |
| + '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', |
| + '>@(extra_args)', |
| + '--arch', 'mips', |
| + '--build', 'newlib_nexe', |
| + '--root', '<(DEPTH)', |
| + '--name', '>(out_newlib_mips)', |
| + '--objdir', '>(objdir_newlib_mips)', |
| + '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)', |
| + '--compile_flags= ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
| + '--defines=^(defines) >(_defines)', |
| + '--link_flags= -arch mips --pnacl-allow-translate --pnacl-allow-native -Wt,-mtls-use-call --pnacl-disable-abi-check -Wn,--section-start=.rodata=<(NACL_IRT_DATA_START) -Wn,--section-start=.text=<(NACL_IRT_TEXT_START) -B>(tc_lib_dir_irt_mips) ^(link_flags) >(_link_flags)', |
|
Mark Seaborn
2013/09/23 19:15:28
Why do you need "--pnacl-disable-abi-check" here?
petarj
2013/09/25 23:21:31
This is needed for two reasons when we build IRT.N
|
| + '--source-list=^|(<(source_list_newlib_mips) ^(_sources) ^(sources))', |
| + ], |
| + }, |
| + ], |
| + }], |
| + # mips IRT library action |
| + ['nlib_target!="" and build_irt!=0', { |
| + 'variables': { |
| + 'tool_name': 'irt', |
| + 'out_newlib_mips%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/libmips/>(nlib_target)', |
| + 'objdir_newlib_mips%': '>(INTERMEDIATE_DIR)/<(tool_name)-mips/>(_target_name)', |
| + 'source_list_newlib_mips%': '<(tool_name)-mips.>(_target_name).source_list.gypcmd', |
| + }, |
| + 'actions': [ |
| + { |
| + 'action_name': 'build IRT mips nlib', |
| + 'msvs_cygwin_shell': 0, |
| + 'description': 'building >(out_newlib_mips)', |
| + 'inputs': [ |
| + '<(DEPTH)/native_client/build/build_nexe.py', |
| + '>!@pymod_do_main(>(get_sources) >(sources) >(_sources))', |
| + '>@(extra_deps_newlib_mips)', |
| + '>(source_list_newlib_mips)', |
| + '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/<(OS)_pnacl/stamp.prep', |
| + ], |
| + 'outputs': ['>(out_newlib_mips)'], |
| + 'action': [ |
| + '>(python_exe)', |
| + '<(DEPTH)/native_client/build/build_nexe.py', |
| + '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/toolchain/', |
| + '>@(extra_args)', |
| + '--arch', 'mips', |
| + '--build', 'newlib_nlib', |
| + '--root', '<(DEPTH)', |
| + '--name', '>(out_newlib_mips)', |
| + '--objdir', '>(objdir_newlib_mips)', |
| + '--include-dirs=>(tc_include_dir_newlib) ^(include_dirs) >(_include_dirs)', |
| + '--compile_flags= ^(compile_flags) >(_compile_flags) ^(pnacl_compile_flags) >(_pnacl_compile_flags)', |
| + '--defines=^(defines) >(_defines)', |
| + '--link_flags=-B>(tc_lib_dir_irt_mips) ^(link_flags) >(_link_flags)', |
| + '--source-list=^|(<(source_list_newlib_mips) ^(_sources) ^(sources))', |
| + ], |
| + }, |
| + ], |
| + }], |
| + ], # end target_conditions for mips newlib |
| + }, |
| + }], # end target_arch = mips |
| + ['target_arch=="ia32" or target_arch=="x64"', { |
| 'target_defaults': { |
| # x86-64 glibc nexe action |
| 'target_conditions': [ |
| @@ -948,7 +1120,7 @@ |
| }], |
| ], # end target_conditions for glibc (nexe/nlib/nso, x86-32/64) |
| }, |
| - }], # end target_arch != arm |
| + }], # end target_arch == ia32 or x64 |
| ], |
| # Common defaults for pnacl targets |
| 'target_defaults': { |
| @@ -990,6 +1162,7 @@ |
| 'out_pnacl_newlib_x86_32_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_x32.nexe', |
| 'out_pnacl_newlib_x86_64_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_x64.nexe', |
| 'out_pnacl_newlib_arm_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_arm.nexe', |
| + 'out_pnacl_newlib_mips_nexe%': '<(PRODUCT_DIR)/>(nexe_target)_pnacl_newlib_mips.nexe', |
| 'tool_name': 'pnacl_newlib', |
| 'inst_dir': '<(SHARED_INTERMEDIATE_DIR)/tc_pnacl_newlib', |
| 'out_pnacl_newlib%': '<(PRODUCT_DIR)/>(nexe_target)_newlib.pexe', |