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 This script is invoked from XXX, usually without arguments | 8 This script is invoked from XXX, usually without arguments |
9 to package an SDK. It automatically determines whether | 9 to package an SDK. It automatically determines whether |
10 this SDK is for mac, win, linux. | 10 this SDK is for mac, win, linux. |
(...skipping 24 matching lines...) Expand all Loading... |
35 import build_projects | 35 import build_projects |
36 import build_updater | 36 import build_updater |
37 import build_version | 37 import build_version |
38 import generate_make | 38 import generate_make |
39 import generate_notice | 39 import generate_notice |
40 import manifest_util | 40 import manifest_util |
41 import parse_dsc | 41 import parse_dsc |
42 import verify_filelist | 42 import verify_filelist |
43 | 43 |
44 from build_paths import SCRIPT_DIR, SDK_SRC_DIR, SRC_DIR, NACL_DIR, OUT_DIR | 44 from build_paths import SCRIPT_DIR, SDK_SRC_DIR, SRC_DIR, NACL_DIR, OUT_DIR |
45 from build_paths import PPAPI_DIR, NACLPORTS_DIR, GSTORE | 45 from build_paths import NACLPORTS_DIR, GSTORE |
46 | 46 |
47 # Add SDK make tools scripts to the python path. | 47 # Add SDK make tools scripts to the python path. |
48 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) | 48 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) |
49 sys.path.append(os.path.join(NACL_DIR, 'build')) | 49 sys.path.append(os.path.join(NACL_DIR, 'build')) |
50 | 50 |
51 import getos | 51 import getos |
52 import oshelpers | 52 import oshelpers |
53 | 53 |
54 CYGTAR = os.path.join(NACL_DIR, 'build', 'cygtar.py') | 54 CYGTAR = os.path.join(NACL_DIR, 'build', 'cygtar.py') |
55 | 55 |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 ('src/untrusted/irt/irt_ppapi.h', ''), | 267 ('src/untrusted/irt/irt_ppapi.h', ''), |
268 ('src/untrusted/nacl/nacl_dyncode.h', 'nacl/'), | 268 ('src/untrusted/nacl/nacl_dyncode.h', 'nacl/'), |
269 ('src/untrusted/nacl/nacl_startup.h', 'nacl/'), | 269 ('src/untrusted/nacl/nacl_startup.h', 'nacl/'), |
270 ('src/untrusted/nacl/nacl_thread.h', 'nacl/'), | 270 ('src/untrusted/nacl/nacl_thread.h', 'nacl/'), |
271 ('src/untrusted/nacl/pnacl.h', ''), | 271 ('src/untrusted/nacl/pnacl.h', ''), |
272 ('src/untrusted/valgrind/dynamic_annotations.h', 'nacl/'), | 272 ('src/untrusted/valgrind/dynamic_annotations.h', 'nacl/'), |
273 ], | 273 ], |
274 'host': [] | 274 'host': [] |
275 } | 275 } |
276 | 276 |
277 # Source relative to 'ppapi' foler. Destiniation relative | |
278 # to SDK include folder. | |
279 PPAPI_HEADER_MAP = [ | |
280 # Copy the KHR headers | |
281 ('lib/gl/include/KHR/khrplatform.h', 'KHR/'), | |
282 | |
283 # Copy the GLES2 headers | |
284 ('lib/gl/include/GLES2/gl2.h', 'GLES2/'), | |
285 ('lib/gl/include/GLES2/gl2ext.h', 'GLES2/'), | |
286 ('lib/gl/include/GLES2/gl2platform.h', 'GLES2/'), | |
287 | |
288 # Copy the EGL headers | |
289 ('lib/gl/include/EGL/egl.h', 'EGL/'), | |
290 ('lib/gl/include/EGL/eglext.h', 'EGL/'), | |
291 ('lib/gl/include/EGL/eglplatform.h', 'EGL/'), | |
292 | |
293 # Copy in the gles2 headers | |
294 ('lib/gl/gles2/gl2ext_ppapi.h', 'ppapi/gles2/'), | |
295 # Create a duplicate copy of this header | |
296 # TODO(sbc), remove this copy once we find a way to build gl2ext_ppapi.c. | |
297 ('lib/gl/gles2/gl2ext_ppapi.h', 'ppapi/lib/gl/gles2/'), | |
298 | |
299 # Copy in the C++ headers | |
300 ('utility/graphics/paint_aggregator.h', 'ppapi/utility/graphics/'), | |
301 ('utility/graphics/paint_manager.h', 'ppapi/utility/graphics/'), | |
302 ('utility/threading/lock.h', 'ppapi/utility/threading/'), | |
303 ('utility/threading/simple_thread.h', 'ppapi/utility/threading/'), | |
304 ('utility/websocket/websocket_api.h', 'ppapi/utility/websocket/'), | |
305 ('utility/completion_callback_factory.h','ppapi/utility/'), | |
306 ('utility/completion_callback_factory_thread_traits.h', 'ppapi/utility/'), | |
307 | |
308 # Copy in c, c/dev and c/extensions/dev headers | |
309 # TODO(sbc): remove the use of wildcards here so that we can more | |
310 # tightly control what ends up in the SDK. | |
311 ('c/*.h', 'ppapi/c/'), | |
312 ('c/dev/*.h', 'ppapi/c/dev/'), | |
313 ('c/extensions/dev/*.h', 'ppapi/c/extensions/dev/'), | |
314 | |
315 # Copy in cpp, cpp/dev, cpp/extensions/, cpp/extensions/dev | |
316 ('cpp/*.h', 'ppapi/cpp/'), | |
317 ('cpp/extensions/*.h', 'ppapi/cpp/extensions/'), | |
318 ('cpp/dev/*.h', 'ppapi/cpp/dev/'), | |
319 ('cpp/extensions/dev/*.h', 'ppapi/cpp/extensions/dev/'), | |
320 | |
321 # Copy certain private headers (specifically these are the ones | |
322 # that are used by nacl-mounts) | |
323 ('cpp/private/ext_crx_file_system_private.h', 'ppapi/cpp/private/'), | |
324 ('cpp/private/file_io_private.h', 'ppapi/cpp/private/'), | |
325 ('cpp/private/net_address_private.h', 'ppapi/cpp/private/'), | |
326 ('cpp/private/tcp_server_socket_private.h', 'ppapi/cpp/private/'), | |
327 ('cpp/private/host_resolver_private.h', 'ppapi/cpp/private/'), | |
328 ('cpp/private/pass_file_handle.h', 'ppapi/cpp/private/'), | |
329 ('cpp/private/tcp_socket_private.h', 'ppapi/cpp/private/'), | |
330 ('cpp/private/udp_socket_private.h', 'ppapi/cpp/private/'), | |
331 ('cpp/private/x509_certificate_private.h', 'ppapi/cpp/private/'), | |
332 | |
333 ('c/private/pp_file_handle.h', 'ppapi/c/private/'), | |
334 ('c/private/ppb_ext_crx_file_system_private.h', 'ppapi/c/private/'), | |
335 ('c/private/ppb_file_io_private.h', 'ppapi/c/private/'), | |
336 ('c/private/ppb_file_ref_private.h', 'ppapi/c/private/'), | |
337 ('c/private/ppb_host_resolver_private.h', 'ppapi/c/private/'), | |
338 ('c/private/ppb_tcp_server_socket_private.h', 'ppapi/c/private/'), | |
339 ('c/private/ppb_net_address_private.h', 'ppapi/c/private/'), | |
340 ('c/private/ppb_tcp_socket_private.h', 'ppapi/c/private/'), | |
341 ('c/private/ppb_udp_socket_private.h', 'ppapi/c/private/'), | |
342 ('c/private/ppb_x509_certificate_private.h', 'ppapi/c/private/'), | |
343 ] | |
344 | |
345 | |
346 def InstallCommonHeaders(inc_path): | |
347 InstallFiles(PPAPI_DIR, inc_path, PPAPI_HEADER_MAP) | |
348 | |
349 | |
350 def InstallFiles(src_root, dest_root, file_list): | 277 def InstallFiles(src_root, dest_root, file_list): |
351 """Copy a set of files from src_root to dest_root according | 278 """Copy a set of files from src_root to dest_root according |
352 to the given mapping. This allows files to be copied from | 279 to the given mapping. This allows files to be copied from |
353 to a location in the destination tree that is different to the | 280 to a location in the destination tree that is different to the |
354 location in the source tree. | 281 location in the source tree. |
355 | 282 |
356 If the destination mapping ends with a '/' then the destination | 283 If the destination mapping ends with a '/' then the destination |
357 basename is inherited from the the source file. | 284 basename is inherited from the the source file. |
358 | 285 |
359 Wildcards can be used in the source list but it is not recommended | 286 Wildcards can be used in the source list but it is not recommended |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 | 917 |
991 BuildStepCleanPepperDirs(pepperdir, pepperdir_old) | 918 BuildStepCleanPepperDirs(pepperdir, pepperdir_old) |
992 BuildStepMakePepperDirs(pepperdir, ['include', 'toolchain', 'tools']) | 919 BuildStepMakePepperDirs(pepperdir, ['include', 'toolchain', 'tools']) |
993 | 920 |
994 if not options.skip_toolchain: | 921 if not options.skip_toolchain: |
995 BuildStepDownloadToolchains() | 922 BuildStepDownloadToolchains() |
996 BuildStepUntarToolchains(pepperdir, platform, arch, toolchains) | 923 BuildStepUntarToolchains(pepperdir, platform, arch, toolchains) |
997 | 924 |
998 BuildStepCopyTextFiles(pepperdir, pepper_ver, clnumber) | 925 BuildStepCopyTextFiles(pepperdir, pepper_ver, clnumber) |
999 BuildStepBuildToolchains(pepperdir, platform, toolchains) | 926 BuildStepBuildToolchains(pepperdir, platform, toolchains) |
1000 InstallCommonHeaders(os.path.join(pepperdir, 'include')) | |
1001 | 927 |
1002 BuildStepUpdateHelpers(pepperdir, platform, True) | 928 BuildStepUpdateHelpers(pepperdir, platform, True) |
1003 BuildStepUpdateUserProjects(pepperdir, platform, toolchains, | 929 BuildStepUpdateUserProjects(pepperdir, platform, toolchains, |
1004 options.build_experimental, True) | 930 options.build_experimental, True) |
1005 | 931 |
1006 # Ship with libraries prebuilt, so run that first. | 932 # Ship with libraries prebuilt, so run that first. |
1007 BuildStepBuildLibraries(pepperdir, platform, 'src') | 933 BuildStepBuildLibraries(pepperdir, platform, 'src') |
1008 GenerateNotice(pepperdir) | 934 GenerateNotice(pepperdir) |
1009 | 935 |
1010 # Verify the SDK contains what we expect. | 936 # Verify the SDK contains what we expect. |
(...skipping 17 matching lines...) Expand all Loading... |
1028 BuildStepArchiveSDKTools() | 954 BuildStepArchiveSDKTools() |
1029 | 955 |
1030 return 0 | 956 return 0 |
1031 | 957 |
1032 | 958 |
1033 if __name__ == '__main__': | 959 if __name__ == '__main__': |
1034 try: | 960 try: |
1035 sys.exit(main(sys.argv)) | 961 sys.exit(main(sys.argv)) |
1036 except KeyboardInterrupt: | 962 except KeyboardInterrupt: |
1037 buildbot_common.ErrorExit('build_sdk: interrupted') | 963 buildbot_common.ErrorExit('build_sdk: interrupted') |
OLD | NEW |