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

Side by Side Diff: tools/gn.py

Issue 2496383002: GN: Make sure we use clang when ASAN is specificed for ia32 Linux (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | 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/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
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
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))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698