OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 '''Entry point for both build and try bots''' | 6 '''Entry point for both build and try bots''' |
7 | 7 |
8 import build_utils | 8 import build_utils |
9 import lastchange | 9 import lastchange |
10 import os | 10 import os |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
172 args = [scons, mode, plat, bin, lib, '-j10', | 172 args = [scons, mode, plat, bin, lib, '-j10', |
173 'install_bin', 'install_lib'] | 173 'install_bin', 'install_lib'] |
174 if tcname == 'glibc': | 174 if tcname == 'glibc': |
175 args.append('--nacl_glibc') | 175 args.append('--nacl_glibc') |
176 return args | 176 return args |
177 | 177 |
178 header_map = { | 178 header_map = { |
179 'newlib': { | 179 'newlib': { |
180 'pthread.h': 'src/untrusted/pthread/pthread.h', | 180 'pthread.h': 'src/untrusted/pthread/pthread.h', |
181 'semaphore.h': 'src/untrusted/pthread/semaphore.h', | 181 'semaphore.h': 'src/untrusted/pthread/semaphore.h', |
182 'dynamic_annotations.h': 'src/untrusted/valgrind/dynamic_annotations.h', | 182 'nacl/dynamic_annotations.h': |
183 'dynamic_annotations.h': 'src/untrusted/valgrind/dynamic_annotations.h', | 183 'src/untrusted/valgrind/dynamic_annotations.h', |
184 'nacl_dyncode.h': 'src/untrusted/nacl/nacl_dyncode.h', | 184 'nacl/nacl_dyncode.h': 'src/untrusted/nacl/nacl_dyncode.h', |
185 'nacl_startup.h': 'src/untrusted/nacl/nacl_startup.h', | 185 'nacl/nacl_startup.h': 'src/untrusted/nacl/nacl_startup.h', |
186 'nacl_thread.h': 'src/untrusted/nacl/nacl_thread.h', | 186 'nacl/nacl_thread.h': 'src/untrusted/nacl/nacl_thread.h', |
187 'pnacl.h': 'src/untrusted/nacl/pnacl.h', | 187 'pnacl.h': 'src/untrusted/nacl/pnacl.h', |
188 'irt.h': 'src/untrusted/irt/irt.h', | 188 'irt.h': 'src/untrusted/irt/irt.h', |
189 'irt_ppapi.h': 'src/untrusted/irt/irt_ppapi.h', | 189 'irt_ppapi.h': 'src/untrusted/irt/irt_ppapi.h', |
190 }, | 190 }, |
191 'glibc': { | 191 'glibc': { |
192 'dynamic_annotations.h': 'src/untrusted/valgrind/dynamic_annotations.h', | 192 'nacl/dynamic_annotations.h': |
193 'dynamic_annotations.h': 'src/untrusted/valgrind/dynamic_annotations.h', | 193 'src/untrusted/valgrind/dynamic_annotations.h', |
194 'nacl_dyncode.h': 'src/untrusted/nacl/nacl_dyncode.h', | 194 'nacl/nacl_dyncode.h': 'src/untrusted/nacl/nacl_dyncode.h', |
195 'nacl_startup.h': 'src/untrusted/nacl/nacl_startup.h', | 195 'nacl/nacl_startup.h': 'src/untrusted/nacl/nacl_startup.h', |
196 'nacl_thread.h': 'src/untrusted/nacl/nacl_thread.h', | 196 'nacl/nacl_thread.h': 'src/untrusted/nacl/nacl_thread.h', |
197 'pnacl.h': 'src/untrusted/nacl/pnacl.h', | 197 'pnacl.h': 'src/untrusted/nacl/pnacl.h', |
198 'irt.h': 'src/untrusted/irt/irt.h', | 198 'irt.h': 'src/untrusted/irt/irt.h', |
199 'irt_ppapi.h': 'src/untrusted/irt/irt_ppapi.h', | 199 'irt_ppapi.h': 'src/untrusted/irt/irt_ppapi.h', |
200 }, | 200 }, |
201 } | 201 } |
202 | 202 |
203 | 203 |
204 def InstallHeaders(tc_dst_inc, pepper_ver, tc_name): | 204 def InstallHeaders(tc_dst_inc, pepper_ver, tc_name): |
205 """Copies NaCl headers to expected locations in the toolchain.""" | 205 """Copies NaCl headers to expected locations in the toolchain.""" |
206 tc_map = header_map[tc_name] | 206 tc_map = header_map[tc_name] |
207 for filename in tc_map: | 207 for filename in tc_map: |
208 src = os.path.join(NACL_DIR, tc_map[filename]) | 208 src = os.path.join(NACL_DIR, tc_map[filename]) |
209 dst = os.path.join(tc_dst_inc, filename) | 209 dst = os.path.join(tc_dst_inc, filename) |
210 if not os.path.exists(os.path.dirname(dst)): | |
noelallen1
2012/01/31 23:57:14
Shouldn't need the exists check, MakeDir uses '-p'
| |
211 MakeDir(os.path.dirname(dst)) | |
210 oshelpers.Copy(['-v', src, dst]) | 212 oshelpers.Copy(['-v', src, dst]) |
211 | 213 |
212 # Clean out per toolchain ppapi directory | 214 # Clean out per toolchain ppapi directory |
213 ppapi = os.path.join(tc_dst_inc, 'ppapi') | 215 ppapi = os.path.join(tc_dst_inc, 'ppapi') |
214 RemoveDir(ppapi) | 216 RemoveDir(ppapi) |
215 | 217 |
216 # Copy in c and c/dev headers | 218 # Copy in c and c/dev headers |
217 MakeDir(os.path.join(ppapi, 'c', 'dev')) | 219 MakeDir(os.path.join(ppapi, 'c', 'dev')) |
218 CopyDir(os.path.join(PPAPI_DIR, 'c', '*.h'), | 220 CopyDir(os.path.join(PPAPI_DIR, 'c', '*.h'), |
219 os.path.join(ppapi, 'c')) | 221 os.path.join(ppapi, 'c')) |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
378 AddMakeBat(dirnode) | 380 AddMakeBat(dirnode) |
379 print "\n\nMake: " + dirnode | 381 print "\n\nMake: " + dirnode |
380 Run(['make', 'all', '-j8'], cwd=os.path.abspath(dirnode), shell=True) | 382 Run(['make', 'all', '-j8'], cwd=os.path.abspath(dirnode), shell=True) |
381 | 383 |
382 return 0 | 384 return 0 |
383 | 385 |
384 | 386 |
385 if __name__ == '__main__': | 387 if __name__ == '__main__': |
386 sys.exit(main()) | 388 sys.exit(main()) |
387 | 389 |
OLD | NEW |