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

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

Issue 572413002: Revert "Roll Clang 214024:216630 (+216684) and switch to CMake (try 2)" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « tools/clang/plugins/tests/test.sh ('k') | tools/clang/scripts/package.sh » ('j') | 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 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 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 returns the flags that should be passed to clang. 6 # This script returns the flags that should be passed to clang.
7 7
8 THIS_ABS_DIR=$(cd $(dirname $0) && echo $PWD) 8 THIS_ABS_DIR=$(cd $(dirname $0) && echo $PWD)
9 CLANG_LIB_PATH=$THIS_ABS_DIR/../../../third_party/llvm-build/Release+Asserts/lib 9 CLANG_LIB_PATH=$THIS_ABS_DIR/../../../third_party/llvm-build/Release+Asserts/lib
10 10
11 if uname -s | grep -q Darwin; then 11 if uname -s | grep -q Darwin; then
12 LIBSUFFIX=dylib 12 LIBSUFFIX=dylib
13 else 13 else
14 LIBSUFFIX=so 14 LIBSUFFIX=so
15 fi 15 fi
16
16 LIBNAME=\ 17 LIBNAME=\
17 $(grep 'set(LIBRARYNAME' "$THIS_ABS_DIR"/../blink_gc_plugin/CMakeLists.txt \ 18 $(grep LIBRARYNAME "$THIS_ABS_DIR"/../blink_gc_plugin/Makefile \
18 | cut -d ' ' -f 2 | tr -d ')') 19 | cut -d ' ' -f 3)
19 20
20 FLAGS="" 21 FLAGS=""
21 PREFIX="-Xclang -plugin-arg-blink-gc-plugin -Xclang" 22 PREFIX="-Xclang -plugin-arg-blink-gc-plugin -Xclang"
22 for arg in "$@"; do 23 for arg in "$@"; do
23 if [[ "$arg" = "enable-oilpan=1" ]]; then 24 if [[ "$arg" = "enable-oilpan=1" ]]; then
24 FLAGS="$FLAGS $PREFIX enable-oilpan" 25 FLAGS="$FLAGS $PREFIX enable-oilpan"
25 elif [[ "$arg" = "dump-graph=1" ]]; then 26 elif [[ "$arg" = "dump-graph=1" ]]; then
26 FLAGS="$FLAGS $PREFIX dump-graph" 27 FLAGS="$FLAGS $PREFIX dump-graph"
27 elif [[ "$arg" = "warn-raw-ptr=1" ]]; then 28 elif [[ "$arg" = "warn-raw-ptr=1" ]]; then
28 FLAGS="$FLAGS $PREFIX warn-raw-ptr" 29 FLAGS="$FLAGS $PREFIX warn-raw-ptr"
29 elif [[ "$arg" = "warn-unneeded-finalizer=1" ]]; then 30 elif [[ "$arg" = "warn-unneeded-finalizer=1" ]]; then
30 FLAGS="$FLAGS $PREFIX warn-unneeded-finalizer" 31 FLAGS="$FLAGS $PREFIX warn-unneeded-finalizer"
31 fi 32 fi
32 done 33 done
33 34
34 echo -Xclang -load -Xclang $CLANG_LIB_PATH/lib$LIBNAME.$LIBSUFFIX \ 35 echo -Xclang -load -Xclang $CLANG_LIB_PATH/lib$LIBNAME.$LIBSUFFIX \
35 -Xclang -add-plugin -Xclang blink-gc-plugin $FLAGS 36 -Xclang -add-plugin -Xclang blink-gc-plugin $FLAGS
OLDNEW
« no previous file with comments | « tools/clang/plugins/tests/test.sh ('k') | tools/clang/scripts/package.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698