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

Side by Side Diff: scripts/slave/compile.py

Issue 357673002: Do not pass additional TSan options when building and running TSan tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | scripts/slave/runtest.py » ('j') | 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 (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 """A tool to build chrome, executed by buildbot. 6 """A tool to build chrome, executed by buildbot.
7 7
8 When this is run, the current directory (cwd) should be the outer build 8 When this is run, the current directory (cwd) should be the outer build
9 directory (e.g., chrome-release/build/). 9 directory (e.g., chrome-release/build/).
10 10
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 env['AS'] = crosstool + '-as' 565 env['AS'] = crosstool + '-as'
566 env['CC'] = ccache + crosstool + '-gcc' 566 env['CC'] = ccache + crosstool + '-gcc'
567 env['CXX'] = ccache + crosstool + '-g++' 567 env['CXX'] = ccache + crosstool + '-g++'
568 env['LD'] = crosstool + '-ld' 568 env['LD'] = crosstool + '-ld'
569 env['RANLIB'] = crosstool + '-ranlib' 569 env['RANLIB'] = crosstool + '-ranlib'
570 command.append('-j%d' % jobs) 570 command.append('-j%d' % jobs)
571 # Don't use build-in rules. 571 # Don't use build-in rules.
572 command.append('-r') 572 command.append('-r')
573 return 573 return
574 574
575 if options.llvm_tsan:
576 supp_path = os.path.join(options.src_dir,
577 'tools', 'valgrind', 'tsan_v2', 'suppressions.txt')
578 # Do not report thread leaks when running executables compiled with TSan.
579 # Use the suppressions file to avoid reporting known errors during
580 # compilation.
581 # http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2
582 # contains other options that might be worth adding.
583 env['TSAN_OPTIONS'] = 'report_thread_leaks=0 suppressions=%s' % supp_path
584
585 if compiler in ('goma', 'goma-clang', 'jsonclang'): 575 if compiler in ('goma', 'goma-clang', 'jsonclang'):
586 print 'using', compiler 576 print 'using', compiler
587 if compiler == 'goma': 577 if compiler == 'goma':
588 assert options.goma_dir 578 assert options.goma_dir
589 env['CC'] = 'gcc' 579 env['CC'] = 'gcc'
590 env['CXX'] = 'g++' 580 env['CXX'] = 'g++'
591 env['PATH'] = ':'.join([options.goma_dir, env['PATH']]) 581 env['PATH'] = ':'.join([options.goma_dir, env['PATH']])
592 elif compiler == 'goma-clang': 582 elif compiler == 'goma-clang':
593 assert options.goma_dir 583 assert options.goma_dir
594 env['CC'] = 'clang' 584 env['CC'] = 'clang'
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 # from compile.py. 750 # from compile.py.
761 ninja_clobber(options.target_output_dir) 751 ninja_clobber(options.target_output_dir)
762 752
763 if options.verbose: 753 if options.verbose:
764 command.append('-v') 754 command.append('-v')
765 command.extend(options.build_args) 755 command.extend(options.build_args)
766 command.extend(args) 756 command.extend(args)
767 757
768 maybe_set_official_build_envvars(options, env) 758 maybe_set_official_build_envvars(options, env)
769 759
770 if options.llvm_tsan:
771 # Do not report thread leaks when running executables compiled with TSan.
772 # http://dev.chromium.org/developers/testing/threadsanitizer-tsan-v2
773 # contains other options that might be worth adding.
774 env['TSAN_OPTIONS'] = 'report_thread_leaks=0'
775
776 if options.compiler: 760 if options.compiler:
777 print 'using', options.compiler 761 print 'using', options.compiler
778 762
779 if options.compiler in ('goma', 'goma-clang', 'jsonclang'): 763 if options.compiler in ('goma', 'goma-clang', 'jsonclang'):
780 assert options.goma_dir 764 assert options.goma_dir
781 if chromium_utils.IsWindows(): 765 if chromium_utils.IsWindows():
782 # rewrite cc, cxx line in output_dir\build.ninja. 766 # rewrite cc, cxx line in output_dir\build.ninja.
783 # in winja, ninja -t msvc is used to run $cc/$cxx to collect 767 # in winja, ninja -t msvc is used to run $cc/$cxx to collect
784 # dependency with "cl /showIncludes" and generates dependency info. 768 # dependency with "cl /showIncludes" and generates dependency info.
785 # ninja -t msvc uses environment in output_dir\environment.*, 769 # ninja -t msvc uses environment in output_dir\environment.*,
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 options.target_output_dir = get_target_build_dir(options.build_tool, 1229 options.target_output_dir = get_target_build_dir(options.build_tool,
1246 options.src_dir, options.target, 'iphoneos' in args) 1230 options.src_dir, options.target, 'iphoneos' in args)
1247 options.clobber = (options.clobber or 1231 options.clobber = (options.clobber or
1248 landmines_triggered(options.target_output_dir)) 1232 landmines_triggered(options.target_output_dir))
1249 1233
1250 return main(options, args) 1234 return main(options, args)
1251 1235
1252 1236
1253 if '__main__' == __name__: 1237 if '__main__' == __name__:
1254 sys.exit(real_main()) 1238 sys.exit(real_main())
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/runtest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698