| 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 MakeDir(os.path.dirname(dst)) |
| 210 oshelpers.Copy(['-v', src, dst]) | 211 oshelpers.Copy(['-v', src, dst]) |
| 211 | 212 |
| 212 # Clean out per toolchain ppapi directory | 213 # Clean out per toolchain ppapi directory |
| 213 ppapi = os.path.join(tc_dst_inc, 'ppapi') | 214 ppapi = os.path.join(tc_dst_inc, 'ppapi') |
| 214 RemoveDir(ppapi) | 215 RemoveDir(ppapi) |
| 215 | 216 |
| 216 # Copy in c and c/dev headers | 217 # Copy in c and c/dev headers |
| 217 MakeDir(os.path.join(ppapi, 'c', 'dev')) | 218 MakeDir(os.path.join(ppapi, 'c', 'dev')) |
| 218 CopyDir(os.path.join(PPAPI_DIR, 'c', '*.h'), | 219 CopyDir(os.path.join(PPAPI_DIR, 'c', '*.h'), |
| 219 os.path.join(ppapi, 'c')) | 220 os.path.join(ppapi, 'c')) |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 AddMakeBat(dirnode) | 379 AddMakeBat(dirnode) |
| 379 print "\n\nMake: " + dirnode | 380 print "\n\nMake: " + dirnode |
| 380 Run(['make', 'all', '-j8'], cwd=os.path.abspath(dirnode), shell=True) | 381 Run(['make', 'all', '-j8'], cwd=os.path.abspath(dirnode), shell=True) |
| 381 | 382 |
| 382 return 0 | 383 return 0 |
| 383 | 384 |
| 384 | 385 |
| 385 if __name__ == '__main__': | 386 if __name__ == '__main__': |
| 386 sys.exit(main()) | 387 sys.exit(main()) |
| 387 | 388 |
| OLD | NEW |