| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 'includes': [ | 6 'includes': [ |
| 7 '../../../../native_client/build/untrusted.gypi', | 7 '../native_client/build/untrusted.gypi', |
| 8 ], | 8 ], |
| 9 'target_defaults': { | 9 'targets': [ |
| 10 { |
| 11 'target_name': 'nacl_test_common', |
| 12 'type': 'none', |
| 13 'dependencies': [ |
| 14 '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib', |
| 15 '<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib', |
| 16 '<(DEPTH)/ppapi/ppapi_untrusted.gyp:ppapi_cpp_lib', |
| 17 ], |
| 18 'direct_dependent_settings': { |
| 10 # We need to override the variables in untrusted.gypi outside of a | 19 # We need to override the variables in untrusted.gypi outside of a |
| 11 # target_condition block because the target_condition block in | 20 # target_condition block because the target_condition block in |
| 12 # untrusted gypi is fully evaluated and interpolated before any of the | 21 # untrusted gypi is fully evaluated and interpolated before any of the |
| 13 # target_condition blocks in this file are expanded. This means that any | 22 # target_condition blocks in this file are expanded. This means that |
| 14 # variables overriden inside a target_condition block in this file will not | 23 # any variables overriden inside a target_condition block in this file |
| 15 # affect the values in untrusted.gypi. | 24 # will not affect the values in untrusted.gypi. |
| 16 'variables': { | 25 'variables': { |
| 17 'test_files': [], | 26 'test_files': [], |
| 18 'nacl_newlib_out_dir': '<(PRODUCT_DIR)/nacl_test_data/newlib', | 27 'nacl_newlib_out_dir': '<(PRODUCT_DIR)/>(nexe_destination_dir)/newlib', |
| 19 'nacl_glibc_out_dir': '<(PRODUCT_DIR)/nacl_test_data/glibc', | 28 'nacl_glibc_out_dir': '<(PRODUCT_DIR)/>(nexe_destination_dir)/glibc', |
| 20 'nacl_pnacl_newlib_out_dir': '<(PRODUCT_DIR)/nacl_test_data/pnacl', | 29 'nacl_pnacl_newlib_out_dir': '<(PRODUCT_DIR)/>(nexe_destination_dir)/pnacl
', |
| 21 'target_conditions': [ | 30 'target_conditions': [ |
| 22 ['nexe_target!=""', { | 31 ['nexe_target!=""', { |
| 23 # These variables are used for nexe building and for library building, | 32 # Patch over the fact that untrusted.gypi doesn't define these in |
| 24 # so they should be unconditionally re-defined. | 33 # all cases. |
| 34 'enable_x86_64%': 0, |
| 35 'enable_x86_32%': 0, |
| 36 'enable_arm%': 0, |
| 37 'link_flags': [ |
| 38 '-lppapi_cpp', |
| 39 '-lppapi', |
| 40 '-pthread', |
| 41 ], |
| 42 'extra_args': [ |
| 43 '--strip-all', |
| 44 ], |
| 45 # These variables are used for nexe building and for library |
| 46 # building, so they should be unconditionally re-defined. |
| 25 'out_newlib32': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_x86_32.n
exe', | 47 'out_newlib32': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_x86_32.n
exe', |
| 26 'out_newlib64': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_x86_64.n
exe', | 48 'out_newlib64': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_x86_64.n
exe', |
| 27 'out_newlib_arm': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_arm.ne
xe', | 49 'out_newlib_arm': '>(nacl_newlib_out_dir)/>(nexe_target)_newlib_arm.ne
xe', |
| 28 'nmf_newlib': '>(nacl_newlib_out_dir)/>(nexe_target).nmf', | 50 'nmf_newlib': '>(nacl_newlib_out_dir)/>(nexe_target).nmf', |
| 29 'out_glibc32': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_x86_32.nexe
', | 51 'out_glibc32': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_x86_32.nexe
', |
| 30 'out_glibc64': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_x86_64.nexe
', | 52 'out_glibc64': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_x86_64.nexe
', |
| 31 'out_glibc_arm': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_arm.nexe'
, | 53 'out_glibc_arm': '>(nacl_glibc_out_dir)/>(nexe_target)_glibc_arm.nexe'
, |
| 32 'nmf_glibc': '>(nacl_glibc_out_dir)/>(nexe_target).nmf', | 54 'nmf_glibc': '>(nacl_glibc_out_dir)/>(nexe_target).nmf', |
| 33 'out_pnacl_newlib': '>(nacl_pnacl_newlib_out_dir)/>(nexe_target)_newli
b_pnacl.pexe', | 55 'out_pnacl_newlib': '>(nacl_pnacl_newlib_out_dir)/>(nexe_target)_newli
b_pnacl.pexe', |
| 34 'nmf_pnacl_newlib': '>(nacl_pnacl_newlib_out_dir)/>(nexe_target).nmf', | 56 'nmf_pnacl_newlib': '>(nacl_pnacl_newlib_out_dir)/>(nexe_target).nmf', |
| 35 }], | 57 }], |
| 36 ], | 58 ], |
| 37 }, | 59 }, |
| 38 'dependencies': [ | |
| 39 '<(DEPTH)/native_client/src/untrusted/nacl/nacl.gyp:nacl_lib', | |
| 40 '<(DEPTH)/ppapi/ppapi_untrusted.gyp:ppapi_cpp_lib', | |
| 41 '<(DEPTH)/ppapi/native_client/native_client.gyp:ppapi_lib', | |
| 42 ], | |
| 43 'target_conditions': [ | 60 'target_conditions': [ |
| 44 ['test_files!=[] and build_newlib==1', { | 61 ['test_files!=[] and build_newlib==1', { |
| 45 'copies': [ | 62 'copies': [ |
| 46 { | 63 { |
| 47 'destination': '>(nacl_newlib_out_dir)', | 64 'destination': '>(nacl_newlib_out_dir)', |
| 48 'files': [ | 65 'files': [ |
| 49 '>@(test_files)', | 66 '>@(test_files)', |
| 50 ], | 67 ], |
| 51 }, | 68 }, |
| 52 ], | 69 ], |
| (...skipping 12 matching lines...) Expand all Loading... |
| 65 'copies': [ | 82 'copies': [ |
| 66 { | 83 { |
| 67 'destination': '>(nacl_pnacl_newlib_out_dir)', | 84 'destination': '>(nacl_pnacl_newlib_out_dir)', |
| 68 'files': [ | 85 'files': [ |
| 69 '>@(test_files)', | 86 '>@(test_files)', |
| 70 ], | 87 ], |
| 71 }, | 88 }, |
| 72 ], | 89 ], |
| 73 }], | 90 }], |
| 74 ['nexe_target!=""', { | 91 ['nexe_target!=""', { |
| 75 'variables': { | |
| 76 # Patch over the fact that untrusted.gypi doesn't define these in all | |
| 77 # cases. | |
| 78 'enable_x86_64%': 0, | |
| 79 'enable_x86_32%': 0, | |
| 80 'enable_arm%': 0, | |
| 81 'include_dirs': [ | |
| 82 '<(DEPTH)', | |
| 83 ], | |
| 84 'link_flags': [ | |
| 85 '-lppapi_cpp', | |
| 86 '-lppapi', | |
| 87 '-pthread', | |
| 88 ], | |
| 89 'extra_args': [ | |
| 90 '--strip-all', | |
| 91 ], | |
| 92 }, | |
| 93 'target_conditions': [ | 92 'target_conditions': [ |
| 94 ['build_newlib==1', { | 93 ['build_newlib==1', { |
| 95 'actions': [ | 94 'actions': [ |
| 96 { | 95 { |
| 97 'action_name': 'Generate NEWLIB NMF', | 96 'action_name': 'Generate NEWLIB NMF', |
| 98 # Unlike glibc, nexes are not actually inputs - only the names m
atter. | 97 # Unlike glibc, nexes are not actually inputs - only the |
| 99 # We don't have the nexes as inputs because the ARM nexe may not | 98 # names matter. We don't have the nexes as inputs because |
| 100 # exist. However, VS 2010 seems to blackhole this entire target
if | 99 # the ARM nexe may not exist. However, VS 2010 seems to |
| 101 # there are no inputs to this action. To work around this we ad
d a | 100 # blackhole this entire target if there are no inputs to |
| 102 # bogus input. | 101 # this action. To work around this we add a bogus input. |
| 103 'inputs': [], | 102 'inputs': [], |
| 104 'outputs': ['>(nmf_newlib)'], | 103 'outputs': ['>(nmf_newlib)'], |
| 105 'action': [ | 104 'action': [ |
| 106 'python', | 105 'python', |
| 107 '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', | 106 '>(current_depth)/native_client_sdk/src/tools/create_nmf.py', |
| 108 '>@(_inputs)', | 107 '>@(_inputs)', |
| 109 '--output=>(nmf_newlib)', | 108 '--output=>(nmf_newlib)', |
| 110 ], | 109 ], |
| 111 'target_conditions': [ | 110 'target_conditions': [ |
| 112 ['enable_x86_64==1', { | 111 ['enable_x86_64==1', { |
| 113 'inputs': ['>(out_newlib64)'], | 112 'inputs': ['>(out_newlib64)'], |
| 114 }], | 113 }], |
| 115 ['enable_x86_32==1', { | 114 ['enable_x86_32==1', { |
| 116 'inputs': ['>(out_newlib32)'], | 115 'inputs': ['>(out_newlib32)'], |
| 117 }], | 116 }], |
| (...skipping 15 matching lines...) Expand all Loading... |
| 133 'actions': [ | 132 'actions': [ |
| 134 { | 133 { |
| 135 'action_name': 'Generate GLIBC NMF and copy libs', | 134 'action_name': 'Generate GLIBC NMF and copy libs', |
| 136 'inputs': [], | 135 'inputs': [], |
| 137 # NOTE: There is no explicit dependency for the lib32 | 136 # NOTE: There is no explicit dependency for the lib32 |
| 138 # and lib64 directories created in the PRODUCT_DIR. | 137 # and lib64 directories created in the PRODUCT_DIR. |
| 139 # They are created as a side-effect of NMF creation. | 138 # They are created as a side-effect of NMF creation. |
| 140 'outputs': ['>(nmf_glibc)'], | 139 'outputs': ['>(nmf_glibc)'], |
| 141 'action': [ | 140 'action': [ |
| 142 'python', | 141 'python', |
| 143 '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', | 142 '>(current_depth)/native_client_sdk/src/tools/create_nmf.py', |
| 144 '>@(_inputs)', | 143 '>@(_inputs)', |
| 145 '--objdump=>(nacl_objdump)', | 144 '--objdump=>(nacl_objdump)', |
| 146 '--output=>(nmf_glibc)', | 145 '--output=>(nmf_glibc)', |
| 147 '--path-prefix=>(nexe_target)_libs', | 146 '--path-prefix=>(nexe_target)_libs', |
| 148 '--stage-dependencies=<(nacl_glibc_out_dir)', | 147 '--stage-dependencies=<(nacl_glibc_out_dir)', |
| 149 ], | 148 ], |
| 150 'target_conditions': [ | 149 'target_conditions': [ |
| 151 ['enable_x86_64==1', { | 150 ['enable_x86_64==1', { |
| 152 'inputs': ['>(out_glibc64)'], | 151 'inputs': ['>(out_glibc64)'], |
| 153 'action': [ | 152 'action': [ |
| 154 '--library-path=>(libdir_glibc64)', | 153 '--library-path=>(libdir_glibc64)', |
| 155 '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64'
, | 154 '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib64'
, |
| 156 ], | 155 ], |
| 157 }], | 156 }], |
| 158 ['enable_x86_32==1', { | 157 ['enable_x86_32==1', { |
| 159 'inputs': ['>(out_glibc32)'], | 158 'inputs': ['>(out_glibc32)'], |
| 160 'action': [ | 159 'action': [ |
| 161 '--library-path=>(libdir_glibc32)', | 160 '--library-path=>(libdir_glibc32)', |
| 162 '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32'
, | 161 '--library-path=<(SHARED_INTERMEDIATE_DIR)/tc_glibc/lib32'
, |
| 163 ], | 162 ], |
| 164 }], | 163 }], |
| 165 # TODO(ncbray) handle arm case. We don't have ARM glibc yet. | 164 # TODO(ncbray) handle arm case. We don't have ARM glibc |
| 165 # yet. |
| 166 ], | 166 ], |
| 167 }, | 167 }, |
| 168 ], | 168 ], |
| 169 }], | 169 }], |
| 170 ['build_pnacl_newlib==1 and disable_pnacl==0', { | 170 ['build_pnacl_newlib==1 and disable_pnacl==0', { |
| 171 'actions': [ | 171 'actions': [ |
| 172 { | 172 { |
| 173 'action_name': 'Generate PNACL NEWLIB NMF', | 173 'action_name': 'Generate PNACL NEWLIB NMF', |
| 174 'inputs': ['>(out_pnacl_newlib)'], | 174 'inputs': ['>(out_pnacl_newlib)'], |
| 175 'outputs': ['>(nmf_pnacl_newlib)'], | 175 'outputs': ['>(nmf_pnacl_newlib)'], |
| 176 'action': [ | 176 'action': [ |
| 177 'python', | 177 'python', |
| 178 '<(DEPTH)/native_client_sdk/src/tools/create_nmf.py', | 178 '>(current_depth)/native_client_sdk/src/tools/create_nmf.py', |
| 179 '>@(_inputs)', | 179 '>@(_inputs)', |
| 180 '--output=>(nmf_pnacl_newlib)', | 180 '--output=>(nmf_pnacl_newlib)', |
| 181 ], | 181 ], |
| 182 }, | 182 }, |
| 183 ], | 183 ], |
| 184 }], | 184 }], |
| 185 ], | 185 ], |
| 186 }], | 186 }], |
| 187 ], | 187 ], |
| 188 }, | 188 }, |
| 189 }, |
| 190 ], |
| 189 } | 191 } |
| OLD | NEW |