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

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

Issue 2213743002: Clang update.py: enable debug info for ToT builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/update.py
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index a719649702c0a031fd5d3791c45bb451d76d42ee..279ed579e5209fee1f1d74997ea0984df3baa17d 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -470,7 +470,6 @@ def UpdateClang(args):
ldflags = []
base_cmake_args = ['-GNinja',
- '-DCMAKE_BUILD_TYPE=Release',
'-DLLVM_ENABLE_ASSERTIONS=ON',
'-DLLVM_ENABLE_THREADS=OFF',
'-DLLVM_ENABLE_TIMESTAMPS=OFF',
@@ -478,6 +477,13 @@ def UpdateClang(args):
'-DLLVM_USE_CRT_RELEASE=MT',
]
+ if use_head_revision:
+ # For ToT builds, which are used to catch compiler bugs early, enable debug
+ # info for better backtraces when crashing.
+ base_cmake_args += ['-DCMAKE_BUILD_TYPE=RelWithDebInfo']
+ else:
+ base_cmake_args += ['-DCMAKE_BUILD_TYPE=Release']
+
binutils_incdir = ''
if sys.platform.startswith('linux'):
binutils_incdir = os.path.join(BINUTILS_DIR, 'Linux_x64/Release/include')
@@ -652,11 +658,13 @@ def UpdateClang(args):
# If any Chromium tools were built, install those now.
RunCommand(['ninja', 'cr-install'], msvc_arch='x64')
- if sys.platform == 'darwin':
- # See http://crbug.com/256342
- RunCommand(['strip', '-x', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')])
- elif sys.platform.startswith('linux'):
- RunCommand(['strip', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')])
+ if not use_head_revision:
+ # Strip the binaries to save size, except for ToT builds.
+ if sys.platform == 'darwin':
+ # See http://crbug.com/256342
+ RunCommand(['strip', '-x', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')])
+ elif sys.platform.startswith('linux'):
+ RunCommand(['strip', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')])
# TODO(thakis): Check that `clang --version` matches VERSION.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698