• Home
  • Raw
  • Download

Lines Matching +full:clang +full:- +full:format

9 #      http://www.apache.org/licenses/LICENSE-2.0
17 """Builds the Android Clang toolchain."""
37 # pylint: disable=missing-docstring
47 # Set True to skip all actions (log only). Controlled by --dry-run.
77 """Proxy for subprocess.check_call with logging and dry-run support."""
85 extra_env = dict(set(kwargs['env'].items()) - set(os.environ.items()))
94 """Proxy for shutil.copy2 with logging and dry-run support."""
102 """Proxy for shutil.copytree with logging and dry-run support."""
110 """Proxy for shutil.rmtree with logging and dry-run support."""
118 """Proxy for os.rename with logging and dry-run support."""
125 """Proxy for os.makedirs with logging and dry-run support."""
132 """Proxy for os.symlink with logging and dry-run support."""
175 overrides.append('LLVM_PREBUILTS_BASE={}'.format(prebuilts_path))
177 overrides.append('LLVM_PREBUILTS_VERSION={}'.format(prebuilts_version))
180 jobs_arg = '-j{}'.format(
183 targets = ['clang-toolchain-minimal']
185 targets += ['clang-toolchain-full']
187 targets += ['llvm-tools']
193 package_name = 'clang-' + build_name
206 version_file.write('{}.{}.{}\n'.format(
209 tarball_name = package_name + '-' + host
213 'tar', '-cjC', install_host_dir, '-f', package_path, package_name
241 is_darwin = host.startswith('darwin-x86')
252 'bin/clang' + bin_ext,
253 'bin/clang++' + bin_ext,
262 'bin/clang-format' + bin_ext,
263 'bin/clang-tidy' + bin_ext,
273 'bin/llvm-as' + bin_ext,
274 'bin/llvm-dis' + bin_ext,
275 'bin/llvm-link' + bin_ext,
276 'bin/llvm-symbolizer' + bin_ext,
297 is_darwin = host.startswith('darwin-x86')
304 'external/compiler-rt/lib/asan/scripts/asan_device_setup')
309 """Create and install bash scripts for invoking Clang for analysis."""
312 'if [ "$1" != "-cc1" ]; then\n'
313 ' `dirname $0`/../clang{clang_suffix} -target {target} "$@"\n'
316 ' `dirname $0`/../clang{clang_suffix} "$@"\n'
321 ('arm64-v8a', 'aarch64-none-linux-android'),
322 ('armeabi', 'armv5te-none-linux-androideabi'),
323 ('armeabi-v7a', 'armv7-none-linux-androideabi'),
324 ('armeabi-v7a-hard', 'armv7-none-linux-androideabi'),
325 ('mips', 'mipsel-none-linux-android'),
326 ('mips64', 'mips64el-none-linux-android'),
327 ('x86', 'i686-none-linux-android'),
328 ('x86_64', 'x86_64-none-linux-android'),
339 analyzer_text.format(clang_suffix='', target=target))
346 analyzer_text.format(clang_suffix='++', target=target))
353 tools = ('scan-build', 'scan-view')
354 tools_dir = android_path('external/clang/tools')
370 headers_src = android_path('external/clang/lib/Headers')
372 install_dir, 'lib64/clang', short_version(), 'include')
381 # arm_neon.h gets produced as part of external/clang/Android.bp.
382 # We must bundle the resulting file as part of the official Clang headers.
384 … build_dir, 'soong/.intermediates/external/clang/clang-gen-arm-neon/gen/clang/Basic/arm_neon.h')
388 os.path.join(install_dir, 'lib64/clang', long_version()))
393 install_dir, 'lib64/clang', short_version(), 'lib/linux')
399 if host == 'linux-x86':
418 lib_name = 'libclang_rt.profile-{}-android.a'.format(arch)
433 lib_name = 'libclang_rt.profile-{}.a'.format(arch)
439 if host == 'darwin-x86':
443 install_dir, 'lib64/clang', short_version(), 'lib/linux')
455 module = 'libomp-' + arch
460 '{}_intermediates/PACKED/{}.so'.format(module, module))
465 headers_src = android_path('external/compiler-rt/include/sanitizer')
466 clang_lib = os.path.join(install_dir, 'lib64/clang', short_version())
474 if host == 'linux-x86':
490 module = 'libclang_rt.{}-{}-android'.format(sanitizer, arch)
493 '{}_intermediates'.format(module))
494 lib_name = '{}.so'.format(module)
500 # platform sources for compiler-rt are potentially different from our
506 # device-targeted objects.
521 '{}_intermediates'.format(test_module))
542 built_lib_name = 'lib{}.a'.format(lib)
544 obj64_dir = os.path.join(obj64, 'lib{}_intermediates'.format(lib))
545 lib64_name = 'libclang_rt.{}-x86_64.a'.format(lib)
549 obj32_dir = os.path.join(obj32, 'lib{}_intermediates'.format(lib))
550 lib32_name = 'libclang_rt.{}-i686.a'.format(lib)
557 'clang',
558 'clang-tools-extra',
559 'compiler-rt',
590 'repo', 'forall', '-c',
591 'echo $REPO_PROJECT $(git rev-parse HEAD)',
601 'bin/clang' + bin_ext,
602 'bin/clang++' + bin_ext,
610 wrapper_dir = android_path('external/clang')
623 parser.add_argument('-j', action='store', dest='jobs', type=int,
628 '--build-name', default='dev', help='Release name for the package.')
630 '--dry-run', action='store_true', default=False,
633 '-v', '--verbose', action='store_true', default=False,
638 '--multi-stage', action='store_true', default=True,
639 help='Perform multi-stage build (enabled by default).')
641 '--no-multi-stage', action='store_false', dest='multi_stage',
642 help='Do not perform multi-stage build.')
646 '--build-all-llvm-tools', action='store_true', default=True,
649 '--no-build-all-llvm-tools', action='store_false',
655 '--debug-clang', action='store_true', default=True,
656 help='Also generate a debug version of clang (enabled by default).')
658 '--no-debug-clang', action='store_false',
660 help='Skip generating a debug version of clang.')
678 hosts = ['linux-x86', 'windows-x86']
680 hosts = ['darwin-x86']
682 raise RuntimeError('Unsupported host: {}'.format(sys.platform))
686 # For a multi-stage build, build a minimum clang for the first stage that is
695 stage_1_install_dir = build_path('stage1-install')
697 package_name = 'clang-' + args.build_name
727 debug_package_name = 'clang-debug'
728 base_debug_install_dir = build_path('debug-install')