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

Side by Side Diff: third_party/instrumented_libraries/download_build_install.py

Issue 96083003: Add instrumented libraries build with msan (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 """Downloads, builds (with instrumentation) and installs shared libraries.""" 6 """Downloads, builds (with instrumentation) and installs shared libraries."""
7 7
8 import argparse 8 import argparse
9 import os 9 import os
10 import shutil 10 import shutil
11 import subprocess 11 import subprocess
12 import sys 12 import sys
13 13
14 # Should be a dict from 'sanitizer type' to 'compiler flag'. 14 # Should be a dict from 'sanitizer type' to 'compiler flag'.
15 SUPPORTED_SANITIZERS = {'asan': 'address'} 15 SUPPORTED_SANITIZERS = {'asan': 'address', 'msan': 'memory'}
Alexander Potapenko 2013/12/03 10:23:54 Please modify SUPPORTED_SANITIZERS to allow multip
alextaran1 2013/12/03 11:35:47 Done.
16 16
17 17
18 class ScopedChangeDirectory(object): 18 class ScopedChangeDirectory(object):
19 """Changes current working directory and restores it back automatically.""" 19 """Changes current working directory and restores it back automatically."""
20 def __init__(self, path): 20 def __init__(self, path):
21 self.path = path 21 self.path = path
22 self.old_path = '' 22 self.old_path = ''
23 23
24 def __enter__(self): 24 def __enter__(self):
25 self.old_path = os.getcwd() 25 self.old_path = os.getcwd()
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 print >> sys.stderr, 'One-liner for APT:' 122 print >> sys.stderr, 'One-liner for APT:'
123 print >> sys.stderr, 'sudo apt-get -y --no-remove build-dep %s' % \ 123 print >> sys.stderr, 'sudo apt-get -y --no-remove build-dep %s' % \
124 parsed_arguments.library 124 parsed_arguments.library
125 sys.exit(1) 125 sys.exit(1)
126 126
127 download_build_install(parsed_arguments) 127 download_build_install(parsed_arguments)
128 128
129 129
130 if __name__ == '__main__': 130 if __name__ == '__main__':
131 main() 131 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698