| Index: tools/clang/scripts/package.py
|
| diff --git a/tools/clang/scripts/package.py b/tools/clang/scripts/package.py
|
| index d0aded21d6e3bef6d325687c6006124b02b8711c..dc507d1d780d37b4587ebd67a6b42330e9c7403a 100755
|
| --- a/tools/clang/scripts/package.py
|
| +++ b/tools/clang/scripts/package.py
|
| @@ -24,7 +24,14 @@ LLVM_BOOTSTRAP_DIR = os.path.join(THIRD_PARTY_DIR, 'llvm-bootstrap')
|
| LLVM_BOOTSTRAP_INSTALL_DIR = os.path.join(THIRD_PARTY_DIR,
|
| 'llvm-bootstrap-install')
|
| LLVM_BUILD_DIR = os.path.join(THIRD_PARTY_DIR, 'llvm-build')
|
| -LLVM_RELEASE_DIR = os.path.join(LLVM_BUILD_DIR, 'Release+Asserts')
|
| +
|
| +if sys.platform == 'win32':
|
| + LLVM_RELEASE_DIR = os.path.join(LLVM_BUILD_DIR, 'Release+Asserts', 'tools',
|
| + 'clang', 'stage2-bins')
|
| +else:
|
| + LLVM_RELEASE_DIR = os.path.join(LLVM_BUILD_DIR, 'Release+Asserts', 'tools',
|
| + 'clang', 'stage2-instrumented-bins', 'tools',
|
| + 'clang', 'stage2-bins')
|
| LLVM_LTO_GOLD_PLUGIN_DIR = os.path.join(THIRD_PARTY_DIR, 'llvm-lto-gold-plugin')
|
| BINUTILS_LIB_DIR = os.path.join(THIRD_PARTY_DIR, 'binutils', 'Linux_x64',
|
| 'Release', 'lib')
|
| @@ -228,12 +235,12 @@ def main():
|
| shutil.rmtree(LLVM_BOOTSTRAP_INSTALL_DIR, ignore_errors=True)
|
| shutil.rmtree(LLVM_BUILD_DIR, ignore_errors=True)
|
|
|
| - opt_flags = []
|
| + opt_flags = ['--bootstrap' if sys.platform == 'win32' else '--enable-pgo']
|
| if sys.platform.startswith('linux'):
|
| opt_flags += ['--lto-gold-plugin']
|
| +
|
| build_cmd = [sys.executable, os.path.join(THIS_DIR, 'update.py'),
|
| - '--bootstrap', '--force-local-build',
|
| - '--run-tests'] + opt_flags
|
| + '--force-local-build', '--run-tests'] + opt_flags
|
| TeeCmd(build_cmd, log)
|
|
|
| stamp = open(STAMP_FILE).read().rstrip()
|
| @@ -321,7 +328,7 @@ def main():
|
|
|
| # Copy libc++ headers.
|
| if sys.platform == 'darwin':
|
| - shutil.copytree(os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'include', 'c++'),
|
| + shutil.copytree(os.path.join(LLVM_RELEASE_DIR, 'include', 'c++'),
|
| os.path.join(pdir, 'include', 'c++'))
|
|
|
| # Copy tcmalloc from the binutils package.
|
|
|