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

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

Issue 1385193002: Bisect clang Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 246985 Created 5 years, 2 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
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 # This script returns the flags that should be passed to clang.
7
8 import os
9 import sys
10
11 THIS_DIR = os.path.abspath(os.path.dirname(__file__))
12 SRC_DIR = os.path.join(THIS_DIR, '..', '..', '..')
13 CLANG_LIB_PATH = os.path.normpath(os.path.join(
14 SRC_DIR, 'third_party', 'llvm-build', 'Release+Asserts', 'lib'))
15
16 FLAGS = '-Xclang -add-plugin -Xclang blink-gc-plugin'
17 PREFIX= ' -Xclang -plugin-arg-blink-gc-plugin -Xclang '
18 for arg in sys.argv[1:]:
19 if arg == 'enable-oilpan=1':
20 FLAGS += PREFIX + 'enable-oilpan'
21 elif arg == 'dump-graph=1':
22 FLAGS += PREFIX + 'dump-graph'
23 elif arg == 'warn-raw-ptr=1':
24 FLAGS += PREFIX + 'warn-raw-ptr'
25 elif arg == 'warn-unneeded-finalizer=1':
26 FLAGS += PREFIX + 'warn-unneeded-finalizer'
27 elif arg.startswith('custom_clang_lib_path='):
28 CLANG_LIB_PATH = arg[len('custom_clang_lib_path='):]
29
30 if not sys.platform in ['win32', 'cygwin']:
31 LIBSUFFIX = 'dylib' if sys.platform == 'darwin' else 'so'
32 FLAGS = ('-Xclang -load -Xclang "%s/libBlinkGCPlugin.%s" ' + FLAGS) % \
33 (CLANG_LIB_PATH, LIBSUFFIX)
34
35 print FLAGS
OLDNEW
« no previous file with comments | « tools/clang/rewrite_scoped_refptr/tests/test9-original.cc ('k') | tools/clang/scripts/generate_win_compdb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698