OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2016 The Dart project authors. All rights reserved. | 2 # Copyright 2016 The Dart project 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 import argparse | 6 import argparse |
7 import multiprocessing | 7 import multiprocessing |
8 import os | 8 import os |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 # should leave this set to 'develop', which causes the build to defer to | 105 # should leave this set to 'develop', which causes the build to defer to |
106 # 'is_debug', 'is_release' and 'is_product'. | 106 # 'is_debug', 'is_release' and 'is_product'. |
107 gn_args['dart_runtime_mode'] = 'develop' | 107 gn_args['dart_runtime_mode'] = 'develop' |
108 | 108 |
109 # TODO(zra): Investigate using clang with these configurations. | 109 # TODO(zra): Investigate using clang with these configurations. |
110 # Clang compiles tcmalloc's inline assembly for ia32 on Linux wrong, so we | 110 # Clang compiles tcmalloc's inline assembly for ia32 on Linux wrong, so we |
111 # don't use clang in that configuration. | 111 # don't use clang in that configuration. |
112 has_clang = (host_os != 'win' | 112 has_clang = (host_os != 'win' |
113 and args.os not in ['android'] | 113 and args.os not in ['android'] |
114 and not (gn_args['target_os'] == 'linux' and | 114 and not (gn_args['target_os'] == 'linux' and |
115 gn_args['host_cpu'] == 'x86') | 115 gn_args['host_cpu'] == 'x86' and |
| 116 not args.asan) # Use clang for asan builds. |
116 and not gn_args['target_cpu'].startswith('arm') | 117 and not gn_args['target_cpu'].startswith('arm') |
117 and not gn_args['target_cpu'].startswith('mips')) | 118 and not gn_args['target_cpu'].startswith('mips')) |
118 gn_args['is_clang'] = args.clang and has_clang | 119 gn_args['is_clang'] = args.clang and has_clang |
119 | 120 |
120 gn_args['is_asan'] = args.asan and gn_args['is_clang'] | 121 gn_args['is_asan'] = args.asan and gn_args['is_clang'] |
121 | 122 |
122 # Setup the user-defined sysroot. | 123 # Setup the user-defined sysroot. |
123 if gn_args['target_os'] == 'linux' and args.wheezy: | 124 if gn_args['target_os'] == 'linux' and args.wheezy: |
124 gn_args['dart_use_wheezy_sysroot'] = True | 125 gn_args['dart_use_wheezy_sysroot'] = True |
125 else: | 126 else: |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 return 1 | 347 return 1 |
347 | 348 |
348 endtime = time.time() | 349 endtime = time.time() |
349 if args.verbose: | 350 if args.verbose: |
350 print ("GN Time: %.3f seconds" % (endtime - starttime)) | 351 print ("GN Time: %.3f seconds" % (endtime - starttime)) |
351 return 0 | 352 return 0 |
352 | 353 |
353 | 354 |
354 if __name__ == '__main__': | 355 if __name__ == '__main__': |
355 sys.exit(main(sys.argv)) | 356 sys.exit(main(sys.argv)) |
OLD | NEW |