| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 # The CC/CXX environment variables take precedence over the command line | 222 # The CC/CXX environment variables take precedence over the command line |
| 223 # flags. | 223 # flags. |
| 224 if 'CC' not in environment and parsed_arguments.cc: | 224 if 'CC' not in environment and parsed_arguments.cc: |
| 225 environment['CC'] = parsed_arguments.cc | 225 environment['CC'] = parsed_arguments.cc |
| 226 if 'CXX' not in environment and parsed_arguments.cxx: | 226 if 'CXX' not in environment and parsed_arguments.cxx: |
| 227 environment['CXX'] = parsed_arguments.cxx | 227 environment['CXX'] = parsed_arguments.cxx |
| 228 | 228 |
| 229 cflags = unescape_flags(parsed_arguments.cflags) | 229 cflags = unescape_flags(parsed_arguments.cflags) |
| 230 if parsed_arguments.sanitizer_blacklist: | 230 if parsed_arguments.sanitizer_blacklist: |
| 231 cflags += ' -fsanitize-blacklist=%s/%s' % ( | 231 cflags += ' -fsanitize-blacklist=%s/%s' % ( |
| 232 product_directory, | 232 get_script_absolute_path(), |
| 233 parsed_arguments.sanitizer_blacklist) | 233 parsed_arguments.sanitizer_blacklist) |
| 234 environment['CFLAGS'] = cflags | 234 environment['CFLAGS'] = cflags |
| 235 environment['CXXFLAGS'] = cflags | 235 environment['CXXFLAGS'] = cflags |
| 236 | 236 |
| 237 ldflags = unescape_flags(parsed_arguments.ldflags) | 237 ldflags = unescape_flags(parsed_arguments.ldflags) |
| 238 # Make sure the linker searches the instrumented libraries dir for | 238 # Make sure the linker searches the instrumented libraries dir for |
| 239 # library dependencies. | 239 # library dependencies. |
| 240 environment['LDFLAGS'] = '%s -L%s/lib' % (ldflags, install_prefix) | 240 environment['LDFLAGS'] = '%s -L%s/lib' % (ldflags, install_prefix) |
| 241 | 241 |
| 242 if parsed_arguments.sanitizer_type == 'asan': | 242 if parsed_arguments.sanitizer_type == 'asan': |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 os.chdir(get_script_absolute_path()) | 358 os.chdir(get_script_absolute_path()) |
| 359 # Ensure all build dependencies are installed. | 359 # Ensure all build dependencies are installed. |
| 360 if parsed_arguments.check_build_deps: | 360 if parsed_arguments.check_build_deps: |
| 361 check_package_build_dependencies(parsed_arguments.package) | 361 check_package_build_dependencies(parsed_arguments.package) |
| 362 | 362 |
| 363 download_build_install(parsed_arguments) | 363 download_build_install(parsed_arguments) |
| 364 | 364 |
| 365 | 365 |
| 366 if __name__ == '__main__': | 366 if __name__ == '__main__': |
| 367 main() | 367 main() |
| OLD | NEW |