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

Side by Side Diff: tools/clang/scripts/update.sh

Issue 12223047: Make it easier to build new tools for Clang. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 # This script will check out llvm and clang into third_party/llvm and build it. 6 # This script will check out llvm and clang into third_party/llvm and build it.
7 7
8 # Do NOT CHANGE this if you don't know what you're doing -- see 8 # Do NOT CHANGE this if you don't know what you're doing -- see
9 # https://code.google.com/p/chromium/wiki/UpdatingClang 9 # https://code.google.com/p/chromium/wiki/UpdatingClang
10 # Reverting problematic clang rolls is safe, though. 10 # Reverting problematic clang rolls is safe, though.
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 mv "${TC}/libexec/gcc/arm-linux-androideabi/4.6.x-google" \ 306 mv "${TC}/libexec/gcc/arm-linux-androideabi/4.6.x-google" \
307 "${TC}/libexec/gcc/arm-linux-androideabi/4.6" 307 "${TC}/libexec/gcc/arm-linux-androideabi/4.6"
308 fi 308 fi
309 309
310 # Build ASan runtime for Android. 310 # Build ASan runtime for Android.
311 cd "${LLVM_BUILD_DIR}" 311 cd "${LLVM_BUILD_DIR}"
312 make -C tools/clang/runtime/ LLVM_ANDROID_TOOLCHAIN_DIR="../../../../${TC}" 312 make -C tools/clang/runtime/ LLVM_ANDROID_TOOLCHAIN_DIR="../../../../${TC}"
313 cd - 313 cd -
314 fi 314 fi
315 315
316 # Build plugin. 316 # Build Chrome-specific clang tools. Paths in this list should be relative to
317 # Copy it into the clang tree and use clang's build system to compile the 317 # tools/clang.
318 # plugin. 318 CHROME_TOOL_DIRS="plugins"
319 PLUGIN_SRC_DIR="${THIS_DIR}/../plugins" 319 # For each tool directory, copy it into the clang tree and use clang's build
320 PLUGIN_DST_DIR="${LLVM_DIR}/tools/clang/tools/chrome-plugin" 320 # system to compile it.
321 PLUGIN_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-plugin" 321 for CHROME_TOOL_DIR in ${CHROME_TOOL_DIRS}; do
322 rm -rf "${PLUGIN_DST_DIR}" 322 TOOL_SRC_DIR="${THIS_DIR}/../${CHROME_TOOL_DIR}"
323 cp -R "${PLUGIN_SRC_DIR}" "${PLUGIN_DST_DIR}" 323 TOOL_DST_DIR="${LLVM_DIR}/tools/clang/tools/chrome-${CHROME_TOOL_DIR}"
324 rm -rf "${PLUGIN_BUILD_DIR}" 324 TOOL_BUILD_DIR="${LLVM_BUILD_DIR}/tools/clang/tools/chrome-${CHROME_TOOL_DIR}"
325 mkdir -p "${PLUGIN_BUILD_DIR}" 325 rm -rf "${TOOL_DST_DIR}"
326 cp "${PLUGIN_SRC_DIR}/Makefile" "${PLUGIN_BUILD_DIR}" 326 cp -R "${TOOL_SRC_DIR}" "${TOOL_DST_DIR}"
327 MACOSX_DEPLOYMENT_TARGET=10.5 make -j"${NUM_JOBS}" -C "${PLUGIN_BUILD_DIR}" 327 rm -rf "${TOOL_BUILD_DIR}"
328 mkdir -p "${TOOL_BUILD_DIR}"
329 cp "${TOOL_SRC_DIR}/Makefile" "${TOOL_BUILD_DIR}"
330 MACOSX_DEPLOYMENT_TARGET=10.5 make -j"${NUM_JOBS}" -C "${TOOL_BUILD_DIR}"
331 done
328 332
329 if [[ -n "$run_tests" ]]; then 333 if [[ -n "$run_tests" ]]; then
330 # Run a few tests. 334 # Run a few tests.
335 PLUGIN_SRC_DIR="${THIS_DIR}/../plugins"
331 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts" 336 "${PLUGIN_SRC_DIR}/tests/test.sh" "${LLVM_BUILD_DIR}/Release+Asserts"
332 cd "${LLVM_BUILD_DIR}" 337 cd "${LLVM_BUILD_DIR}"
333 make check-all 338 make check-all
334 cd - 339 cd -
335 fi 340 fi
336 341
337 # After everything is done, log success for this revision. 342 # After everything is done, log success for this revision.
338 echo "${CLANG_REVISION}" > "${STAMP_FILE}" 343 echo "${CLANG_REVISION}" > "${STAMP_FILE}"
OLDNEW
« 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