Index: build/untrusted.gypi |
diff --git a/build/untrusted.gypi b/build/untrusted.gypi |
index 99c362380dafb582bd4e26bd40debea69bea57cf..23767018d19c93f1199adef693eb5ac090c2ef69 100755 |
--- a/build/untrusted.gypi |
+++ b/build/untrusted.gypi |
@@ -178,7 +178,7 @@ |
}, |
}, |
}], |
- ['target_arch=="ia32" or target_arch=="x64"', { |
+ ['target_arch=="x64" or (target_arch=="ia32" and OS=="win")', { |
'target_defaults': { |
# x86-64 newlib nexe action |
'target_conditions': [ |
@@ -362,6 +362,12 @@ |
}, |
], |
}], |
+ ], |
+ }, |
+ }], |
+ ['target_arch=="ia32"', { |
+ 'target_defaults': { |
+ 'target_conditions': [ |
# x86-32 newlib nexe action |
['nexe_target!="" and build_newlib!=0 and enable_x86_32!=0', { |
'variables': { |
@@ -957,7 +963,7 @@ |
], # end target_conditions for mips newlib |
}, |
}], # end target_arch = mips |
- ['target_arch=="ia32" or target_arch=="x64"', { |
+ ['target_arch=="x64" or (OS=="win" and target_arch=="ia32")', { |
'target_defaults': { |
# x86-64 glibc nexe action |
'target_conditions': [ |
@@ -1004,62 +1010,62 @@ |
}, |
], |
}], |
- # x86-32 glibc nexe action |
- ['nexe_target!="" and build_glibc!=0 and enable_x86_32!=0 and disable_glibc==0', { |
+ # x86-64 glibc static library action |
+ ['nlib_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_glibc==0', { |
'variables': { |
'tool_name': 'glibc', |
- 'out_glibc32%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x32.nexe', |
- 'objdir_glibc32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)', |
+ 'objdir_glibc64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)', |
+ 'out_glibc64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nlib_target)', |
}, |
'actions': [ |
{ |
- 'action_name': 'build glibc x86-32 nexe', |
+ 'action_name': 'build glibc x86-64 nlib', |
'variables': { |
- 'source_list_glibc32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))', |
+ 'source_list_glibc64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))', |
}, |
'msvs_cygwin_shell': 0, |
- 'description': 'building >(out_glibc32)', |
+ 'description': 'building >(out_glibc64)', |
'inputs': [ |
'<(DEPTH)/native_client/build/build_nexe.py', |
'>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))', |
'>@(extra_deps)', |
- '>@(extra_deps_glibc32)', |
- '^(source_list_glibc32)', |
+ '>@(extra_deps_glibc64)', |
+ '^(source_list_glibc64)', |
'<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep', |
], |
- 'outputs': ['>(out_glibc32)'], |
+ 'outputs': ['>(out_glibc64)'], |
'action': [ |
'python', |
'<(DEPTH)/native_client/build/build_nexe.py', |
'-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/', |
'>@(extra_args)', |
- '--arch', 'x86-32', |
- '--build', 'glibc_nexe', |
+ '--arch', 'x86-64', |
+ '--build', 'glibc_nlib', |
'--root', '<(DEPTH)', |
- '--name', '>(out_glibc32)', |
- '--objdir', '>(objdir_glibc32)', |
+ '--name', '>(out_glibc64)', |
+ '--objdir', '>(objdir_glibc64)', |
'--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)', |
- '--compile_flags=-m32 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
+ '--compile_flags=-m64 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
'--gomadir', '<(gomadir)', |
'--defines=^(defines) >(_defines)', |
- '--link_flags=-m32 -B>(tc_lib_dir_glibc32) ^(link_flags) >(_link_flags)', |
- '--source-list=^(source_list_glibc32)', |
+ '--link_flags=-B>(tc_lib_dir_glibc64) ^(link_flags) >(_link_flags)', |
+ '--source-list=^(source_list_glibc64)', |
], |
}, |
], |
}], |
- # x86-64 glibc static library action |
- ['nlib_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_glibc==0', { |
+ # x86-64 glibc shared library action |
+ ['nso_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_glibc==0', { |
'variables': { |
'tool_name': 'glibc', |
- 'objdir_glibc64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64/>(_target_name)', |
- 'out_glibc64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nlib_target)', |
+ 'objdir_glibc64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64-so/>(_target_name)', |
+ 'out_glibc64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nso_target)', |
}, |
'actions': [ |
{ |
- 'action_name': 'build glibc x86-64 nlib', |
+ 'action_name': 'build glibc x86-64 nso', |
'variables': { |
- 'source_list_glibc64%': '^|(<(tool_name)-x86-64.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))', |
+ 'source_list_glibc64%': '^|(<(tool_name)-x86-64-so.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))', |
}, |
'msvs_cygwin_shell': 0, |
'description': 'building >(out_glibc64)', |
@@ -1075,15 +1081,15 @@ |
'action': [ |
'python', |
'<(DEPTH)/native_client/build/build_nexe.py', |
- '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/', |
'>@(extra_args)', |
+ '-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/', |
'--arch', 'x86-64', |
- '--build', 'glibc_nlib', |
+ '--build', 'glibc_nso', |
'--root', '<(DEPTH)', |
'--name', '>(out_glibc64)', |
'--objdir', '>(objdir_glibc64)', |
'--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)', |
- '--compile_flags=-m64 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
+ '--compile_flags=-m64 -fPIC ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
'--gomadir', '<(gomadir)', |
'--defines=^(defines) >(_defines)', |
'--link_flags=-B>(tc_lib_dir_glibc64) ^(link_flags) >(_link_flags)', |
@@ -1092,16 +1098,22 @@ |
}, |
], |
}], |
- # x86-32 glibc static library action |
- ['nlib_target!="" and build_glibc!=0 and enable_x86_32!=0 and disable_glibc==0', { |
+ ], |
+ }, |
+ }], |
+ ['target_arch=="ia32"', { |
+ 'target_defaults': { |
+ 'target_conditions': [ |
+ # x86-32 glibc nexe action |
+ ['nexe_target!="" and build_glibc!=0 and enable_x86_32!=0 and disable_glibc==0', { |
'variables': { |
'tool_name': 'glibc', |
- 'out_glibc32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nlib_target)', |
+ 'out_glibc32%': '<(PRODUCT_DIR)/>(nexe_target)_glibc_x32.nexe', |
'objdir_glibc32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)', |
}, |
'actions': [ |
{ |
- 'action_name': 'build glibc x86-32 nlib', |
+ 'action_name': 'build glibc x86-32 nexe', |
'variables': { |
'source_list_glibc32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))', |
}, |
@@ -1122,7 +1134,7 @@ |
'-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/', |
'>@(extra_args)', |
'--arch', 'x86-32', |
- '--build', 'glibc_nlib', |
+ '--build', 'glibc_nexe', |
'--root', '<(DEPTH)', |
'--name', '>(out_glibc32)', |
'--objdir', '>(objdir_glibc32)', |
@@ -1136,46 +1148,46 @@ |
}, |
], |
}], |
- # x86-64 glibc shared library action |
- ['nso_target!="" and build_glibc!=0 and enable_x86_64!=0 and disable_glibc==0', { |
+ # x86-32 glibc static library action |
+ ['nlib_target!="" and build_glibc!=0 and enable_x86_32!=0 and disable_glibc==0', { |
'variables': { |
'tool_name': 'glibc', |
- 'objdir_glibc64%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-64-so/>(_target_name)', |
- 'out_glibc64%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib64/>(nso_target)', |
+ 'out_glibc32%': '<(SHARED_INTERMEDIATE_DIR)/tc_<(tool_name)/lib32/>(nlib_target)', |
+ 'objdir_glibc32%': '>(INTERMEDIATE_DIR)/<(tool_name)-x86-32/>(_target_name)', |
}, |
'actions': [ |
{ |
- 'action_name': 'build glibc x86-64 nso', |
+ 'action_name': 'build glibc x86-32 nlib', |
'variables': { |
- 'source_list_glibc64%': '^|(<(tool_name)-x86-64-so.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))', |
+ 'source_list_glibc32%': '^|(<(tool_name)-x86-32.>(_target_name).source_list.gypcmd ^(_sources) ^(sources))', |
}, |
'msvs_cygwin_shell': 0, |
- 'description': 'building >(out_glibc64)', |
+ 'description': 'building >(out_glibc32)', |
'inputs': [ |
'<(DEPTH)/native_client/build/build_nexe.py', |
'>!@pymod_do_main(scan_sources -I . >(include_dirs) >(_include_dirs) -S >(sources) >(_sources))', |
'>@(extra_deps)', |
- '>@(extra_deps_glibc64)', |
- '^(source_list_glibc64)', |
+ '>@(extra_deps_glibc32)', |
+ '^(source_list_glibc32)', |
'<(SHARED_INTERMEDIATE_DIR)/sdk/<(TOOLCHAIN_OS)_x86/nacl_x86_glibc/stamp.prep', |
], |
- 'outputs': ['>(out_glibc64)'], |
+ 'outputs': ['>(out_glibc32)'], |
'action': [ |
'python', |
'<(DEPTH)/native_client/build/build_nexe.py', |
- '>@(extra_args)', |
'-t', '<(SHARED_INTERMEDIATE_DIR)/sdk/', |
- '--arch', 'x86-64', |
- '--build', 'glibc_nso', |
+ '>@(extra_args)', |
+ '--arch', 'x86-32', |
+ '--build', 'glibc_nlib', |
'--root', '<(DEPTH)', |
- '--name', '>(out_glibc64)', |
- '--objdir', '>(objdir_glibc64)', |
+ '--name', '>(out_glibc32)', |
+ '--objdir', '>(objdir_glibc32)', |
'--include-dirs=>(tc_include_dir_glibc) ^(include_dirs) >(_include_dirs)', |
- '--compile_flags=-m64 -fPIC ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
+ '--compile_flags=-m32 ^(gcc_compile_flags) >(_gcc_compile_flags) ^(compile_flags) >(_compile_flags)', |
'--gomadir', '<(gomadir)', |
'--defines=^(defines) >(_defines)', |
- '--link_flags=-B>(tc_lib_dir_glibc64) ^(link_flags) >(_link_flags)', |
- '--source-list=^(source_list_glibc64)', |
+ '--link_flags=-m32 -B>(tc_lib_dir_glibc32) ^(link_flags) >(_link_flags)', |
+ '--source-list=^(source_list_glibc32)', |
], |
}, |
], |
@@ -1226,7 +1238,7 @@ |
}], |
], # end target_conditions for glibc (nexe/nlib/nso, x86-32/64) |
}, |
- }], # end target_arch == ia32 or x64 |
+ }], |
], |
'target_defaults': { |
'gcc_compile_flags': [], |
@@ -1559,7 +1571,7 @@ |
], |
}], # end ARM |
# ia32 or x64 (want to build both for Windows) |
- ['target_arch=="ia32" or target_arch=="x64"', { |
+ ['target_arch=="x64" or (OS=="win" and target_arch=="ia32")', { |
'target_conditions': [ |
# x64 |
['enable_x86_64!=0 and disable_pnacl==0 and pnacl_native_biased==1 ' |
@@ -1606,6 +1618,10 @@ |
}, |
], |
}], # end x64 |
+ ], |
+ }], |
+ ['target_arch=="ia32"', { |
+ 'target_conditions': [ |
# ia32 |
['enable_x86_32!=0 and disable_pnacl==0 and pnacl_native_biased==1 ' |
'and nlib_target!="" and build_pnacl_newlib!=0', { |