OLD | NEW |
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 platform | 10 import platform |
(...skipping 11 matching lines...) Expand all Loading... |
22 SUPPORTED_SANITIZERS = { | 22 SUPPORTED_SANITIZERS = { |
23 'asan': { | 23 'asan': { |
24 'compiler_flags': '-fsanitize=address -gline-tables-only -fPIC -w', | 24 'compiler_flags': '-fsanitize=address -gline-tables-only -fPIC -w', |
25 'linker_flags': '-fsanitize=address -Wl,-z,origin -Wl,-R,XORIGIN/.' | 25 'linker_flags': '-fsanitize=address -Wl,-z,origin -Wl,-R,XORIGIN/.' |
26 }, | 26 }, |
27 'msan': { | 27 'msan': { |
28 'compiler_flags': '-fsanitize=memory -fsanitize-memory-track-origins ' | 28 'compiler_flags': '-fsanitize=memory -fsanitize-memory-track-origins ' |
29 '-gline-tables-only -fPIC -w', | 29 '-gline-tables-only -fPIC -w', |
30 'linker_flags': '-fsanitize=memory -Wl,-z,origin -Wl,-R,XORIGIN/.' | 30 'linker_flags': '-fsanitize=memory -Wl,-z,origin -Wl,-R,XORIGIN/.' |
31 }, | 31 }, |
| 32 'tsan': { |
| 33 'compiler_flags': '-fsanitize=thread -gline-tables-only -fPIC -w', |
| 34 'linker_flags': '-fsanitize=thread -Wl,-z,origin -Wl,-R,XORIGIN/.' |
| 35 }, |
32 } | 36 } |
33 | 37 |
34 | 38 |
35 class ScopedChangeDirectory(object): | 39 class ScopedChangeDirectory(object): |
36 """Changes current working directory and restores it back automatically.""" | 40 """Changes current working directory and restores it back automatically.""" |
37 def __init__(self, path): | 41 def __init__(self, path): |
38 self.path = path | 42 self.path = path |
39 self.old_path = '' | 43 self.old_path = '' |
40 | 44 |
41 def __enter__(self): | 45 def __enter__(self): |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 os.chdir(get_script_absolute_path()) | 272 os.chdir(get_script_absolute_path()) |
269 # Ensure all build dependencies are installed. | 273 # Ensure all build dependencies are installed. |
270 if parsed_arguments.check_build_deps: | 274 if parsed_arguments.check_build_deps: |
271 check_library_build_dependencies(parsed_arguments.library) | 275 check_library_build_dependencies(parsed_arguments.library) |
272 | 276 |
273 download_build_install(parsed_arguments) | 277 download_build_install(parsed_arguments) |
274 | 278 |
275 | 279 |
276 if __name__ == '__main__': | 280 if __name__ == '__main__': |
277 main() | 281 main() |
OLD | NEW |