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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 # supported. Append our extra flags to CC/CXX. | 116 # supported. Append our extra flags to CC/CXX. |
117 make_args.append('CC="%s %s"' % (environment['CC'], environment['CFLAGS'])) | 117 make_args.append('CC="%s %s"' % (environment['CC'], environment['CFLAGS'])) |
118 make_args.append('CXX="%s %s"' % | 118 make_args.append('CXX="%s %s"' % |
119 (environment['CXX'], environment['CXXFLAGS'])) | 119 (environment['CXX'], environment['CXXFLAGS'])) |
120 # We need to override ZDEFS_FLAGS at least to prevent -Wl,-z,defs. | 120 # We need to override ZDEFS_FLAGS at least to prevent -Wl,-z,defs. |
121 # Might as well use this to pass the linker flags, since ZDEF_FLAGS is always | 121 # Might as well use this to pass the linker flags, since ZDEF_FLAGS is always |
122 # added during linking on Linux. | 122 # added during linking on Linux. |
123 make_args.append('ZDEFS_FLAG="-Wl,-z,nodefs %s"' % environment['LDFLAGS']) | 123 make_args.append('ZDEFS_FLAG="-Wl,-z,nodefs %s"' % environment['LDFLAGS']) |
124 make_args.append('NSPR_INCLUDE_DIR=/usr/include/nspr') | 124 make_args.append('NSPR_INCLUDE_DIR=/usr/include/nspr') |
125 make_args.append('NSPR_LIB_DIR=%s/lib' % install_prefix) | 125 make_args.append('NSPR_LIB_DIR=%s/lib' % install_prefix) |
| 126 make_args.append('NSS_ENABLE_ECC=1') |
126 with ScopedChangeDirectory('nss') as cd_nss: | 127 with ScopedChangeDirectory('nss') as cd_nss: |
127 # -j is not supported | 128 # -j is not supported |
128 shell_call('make %s' % ' '.join(make_args), parsed_arguments.verbose, | 129 shell_call('make %s' % ' '.join(make_args), parsed_arguments.verbose, |
129 environment) | 130 environment) |
130 # 'make install' is not supported. Copy the DSOs manually. | 131 # 'make install' is not supported. Copy the DSOs manually. |
131 install_dir = '%s/lib/' % install_prefix | 132 install_dir = '%s/lib/' % install_prefix |
132 for (dirpath, dirnames, filenames) in os.walk('./lib/'): | 133 for (dirpath, dirnames, filenames) in os.walk('./lib/'): |
133 for filename in filenames: | 134 for filename in filenames: |
134 if filename.endswith('.so'): | 135 if filename.endswith('.so'): |
135 full_path = os.path.join(dirpath, filename) | 136 full_path = os.path.join(dirpath, filename) |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 os.chdir(get_script_absolute_path()) | 268 os.chdir(get_script_absolute_path()) |
268 # Ensure all build dependencies are installed. | 269 # Ensure all build dependencies are installed. |
269 if parsed_arguments.check_build_deps: | 270 if parsed_arguments.check_build_deps: |
270 check_library_build_dependencies(parsed_arguments.library) | 271 check_library_build_dependencies(parsed_arguments.library) |
271 | 272 |
272 download_build_install(parsed_arguments) | 273 download_build_install(parsed_arguments) |
273 | 274 |
274 | 275 |
275 if __name__ == '__main__': | 276 if __name__ == '__main__': |
276 main() | 277 main() |
OLD | NEW |