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

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

Issue 1141793003: Update from https://crrev.com/329939 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
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 # TODO(thakis): Remove this script once Source/config.gyp refers the the .py
7 7 # file.
8 SRC_DIR=$(cd $(dirname $0)/../../.. && echo $PWD) 8 THIS_DIR="$(dirname "${0}")"
9 CLANG_LIB_PATH=$SRC_DIR/third_party/llvm-build/Release+Asserts/lib 9 ABS_THIS_DIR="${PWD}/${THIS_DIR}"
10 10 exec python "${ABS_THIS_DIR}/blink_gc_plugin_flags.py" "$@"
11 if uname -s | grep -q Darwin; then
12 LIBSUFFIX=dylib
13 else
14 LIBSUFFIX=so
15 fi
16
17 FLAGS=""
18 PREFIX="-Xclang -plugin-arg-blink-gc-plugin -Xclang"
19 for arg in "$@"; do
20 if [[ "$arg" = "enable-oilpan=1" ]]; then
21 FLAGS="$FLAGS $PREFIX enable-oilpan"
22 elif [[ "$arg" = "dump-graph=1" ]]; then
23 FLAGS="$FLAGS $PREFIX dump-graph"
24 elif [[ "$arg" = "warn-raw-ptr=1" ]]; then
25 FLAGS="$FLAGS $PREFIX warn-raw-ptr"
26 elif [[ "$arg" = "warn-unneeded-finalizer=1" ]]; then
27 FLAGS="$FLAGS $PREFIX warn-unneeded-finalizer"
28 elif [[ "$arg" = custom_clang_lib_path=* ]]; then
29 CLANG_LIB_PATH="$(cd "${arg#*=}" && echo $PWD)"
30 fi
31 done
32
33 echo -Xclang -load -Xclang \"$CLANG_LIB_PATH/libBlinkGCPlugin.$LIBSUFFIX\" \
34 -Xclang -add-plugin -Xclang blink-gc-plugin $FLAGS
OLDNEW
« no previous file with comments | « tools/clang/scripts/blink_gc_plugin_flags.py ('k') | tools/clang/scripts/posix-print-revision.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698