Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: tools/build_shaderc.py

Issue 1847643002: Update shaderc to ToT. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright 2016 Google Inc. 3 # Copyright 2016 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 8
9 """ 9 """
10 Script to build the shaderc library. 10 Script to build the shaderc library.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 sys.exit('Invalid project type: ' + args.project_type); 57 sys.exit('Invalid project type: ' + args.project_type);
58 58
59 if not os.path.isdir(args.output_dir): 59 if not os.path.isdir(args.output_dir):
60 try: 60 try:
61 os.makedirs(args.output_dir) 61 os.makedirs(args.output_dir)
62 except os.error: 62 except os.error:
63 sys.exit('Error creating output dir ' + args.output_dir) 63 sys.exit('Error creating output dir ' + args.output_dir)
64 64
65 try: 65 try:
66 subprocess.check_call(['cmake', '-G', generator, 66 subprocess.check_call(['cmake', '-G', generator,
67 '-DSPIRV_SKIP_EXECUTABLES=ON', args.src_dir], cwd=args.output_dir) 67 '-DSPIRV_SKIP_EXECUTABLES=ON', '-DSHADERC_ENABLE_SHARED_CRT=ON',
68 args.src_dir], cwd=args.output_dir)
68 except subprocess.CalledProcessError as error: 69 except subprocess.CalledProcessError as error:
69 sys.exit('Error (ret code: {code}) calling "{cmd}" in {dir}'.format( 70 sys.exit('Error (ret code: {code}) calling "{cmd}" in {dir}'.format(
70 code = error.returncode, cmd = error.cmd, dir = args.src_dir)) 71 code = error.returncode, cmd = error.cmd, dir = args.src_dir))
71 72
72 try: 73 try:
73 subprocess.check_call(['cmake', '--build', args.output_dir, '--config', 74 subprocess.check_call(['cmake', '--build', args.output_dir, '--config',
74 args.build_type], cwd=args.output_dir) 75 args.build_type], cwd=args.output_dir)
75 except subprocess.CalledProcessError as error: 76 except subprocess.CalledProcessError as error:
76 sys.exit('Error (ret code: {code}) calling "{cmd}" in {dir}'.format( 77 sys.exit('Error (ret code: {code}) calling "{cmd}" in {dir}'.format(
77 code = error.returncode, cmd = error.cmd, dir = args.src_dir)) 78 code = error.returncode, cmd = error.cmd, dir = args.src_dir))
78 79
79 if __name__ == '__main__': 80 if __name__ == '__main__':
80 main() 81 main()
81 82
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698