Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: tools/clang/scripts/package.py

Issue 2793343002: Add --enable-pgo option to build clang with PGO
Patch Set: Add clang build with PGO Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/CMakeLists.txt ('k') | tools/clang/scripts/update.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « tools/clang/CMakeLists.txt ('k') | tools/clang/scripts/update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698