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

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

Issue 2036683002: [iOS] Remove dependency third_party/WebKit on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 | « third_party/WebKit/Source/wtf/wtf.gyp ('k') | url/url.gyp » ('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 python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 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 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 import os 8 import os
9 import sys 9 import sys
10 10
11 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) 11 THIS_DIR = os.path.abspath(os.path.dirname(__file__))
12 SRC_DIR = os.path.join(THIS_DIR, '..', '..', '..') 12 SRC_DIR = os.path.join(THIS_DIR, '..', '..', '..')
13 CLANG_LIB_PATH = os.path.normpath(os.path.join( 13 CLANG_LIB_PATH = os.path.normpath(os.path.join(
14 SRC_DIR, 'third_party', 'llvm-build', 'Release+Asserts', 'lib')) 14 SRC_DIR, 'third_party', 'llvm-build', 'Release+Asserts', 'lib'))
15 15
16 FLAGS = '-Xclang -add-plugin -Xclang blink-gc-plugin' 16 FLAGS = '-Xclang -add-plugin -Xclang blink-gc-plugin'
17 PREFIX= ' -Xclang -plugin-arg-blink-gc-plugin -Xclang ' 17 PREFIX= ' -Xclang -plugin-arg-blink-gc-plugin -Xclang '
18 18
19 for arg in sys.argv[1:]: 19 for arg in sys.argv[1:]:
20 if arg == 'dump-graph=1': 20 if arg == 'dump-graph=1':
21 FLAGS += PREFIX + 'dump-graph' 21 FLAGS += PREFIX + 'dump-graph'
22 elif arg == 'warn-unneeded-finalizer=1': 22 elif arg == 'warn-unneeded-finalizer=1':
23 FLAGS += PREFIX + 'warn-unneeded-finalizer' 23 FLAGS += PREFIX + 'warn-unneeded-finalizer'
24 elif arg.startswith('custom_clang_lib_path='): 24 elif arg.startswith('custom_clang_lib_path='):
25 CLANG_LIB_PATH = arg[len('custom_clang_lib_path='):] 25 CLANG_LIB_PATH = arg[len('custom_clang_lib_path='):]
26 elif arg == 'target_os=ios':
27 sys.stderr.write('error: blink is unsupported on iOS\n')
28 sys.exit(1)
26 29
27 if not sys.platform in ['win32', 'cygwin']: 30 if not sys.platform in ['win32', 'cygwin']:
28 LIBSUFFIX = 'dylib' if sys.platform == 'darwin' else 'so' 31 LIBSUFFIX = 'dylib' if sys.platform == 'darwin' else 'so'
29 FLAGS = ('-Xclang -load -Xclang "%s/libBlinkGCPlugin.%s" ' + FLAGS) % \ 32 FLAGS = ('-Xclang -load -Xclang "%s/libBlinkGCPlugin.%s" ' + FLAGS) % \
30 (CLANG_LIB_PATH, LIBSUFFIX) 33 (CLANG_LIB_PATH, LIBSUFFIX)
31 34
32 print FLAGS 35 print FLAGS
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/wtf.gyp ('k') | url/url.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698