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

Side by Side Diff: pdfium.gyp

Issue 2115813002: Enable compiling with clang chrome plugins for GYP build (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix on xfa Created 4 years, 5 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 | « build_gyp/standalone.gypi ('k') | xfa.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 # Copyright 2015 PDFium Authors. All rights reserved. 1 # Copyright 2015 PDFium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 { 5 {
6 'variables': { 6 'variables': {
7 'chromium_code': 1, 7 'chromium_code': 1,
8
9 'variables': {
10 'clang_use_pdfium_plugins%': 0,
11 },
12 'clang_use_pdfium_plugins%': '<(clang_use_pdfium_plugins)',
13
14 'pdf_use_skia%': 0, 8 'pdf_use_skia%': 0,
15 'pdf_enable_v8%': 1, 9 'pdf_enable_v8%': 1,
16 'pdf_enable_xfa%': 0, # Set to 1 by standalone.gypi in a standalone build. 10 'pdf_enable_xfa%': 0, # Set to 1 by standalone.gypi in a standalone build.
11 'variables': {
12 'clang_use_chrome_plugins': 1,
13 },
17 'conditions': [ 14 'conditions': [
18 ['OS=="linux"', { 15 ['OS=="linux"', {
19 'bundle_freetype%': 0, 16 'bundle_freetype%': 0,
20 }, { # On Android there's no system FreeType. On Windows and Mac, only a 17 }, { # On Android there's no system FreeType. On Windows and Mac, only a
21 # few methods are used from it. 18 # few methods are used from it.
22 'bundle_freetype%': 1, 19 'bundle_freetype%': 1,
23 }], 20 }],
24 ['clang_use_pdfium_plugins==1', {
25 'variables': {
26 'conditions': [
27 ['OS!="win"', {
28 'variables': {
29 'conditions': [
30 ['OS=="mac" or OS=="ios"', {
31 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/ll vm-build/Release+Asserts/lib/libFindBadConstructs.dylib',
32 }, { # OS != "mac" or OS != "ios"
33 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/ll vm-build/Release+Asserts/lib/libFindBadConstructs.so',
34 }],
35 ],
36 },
37 'clang_dynlib_flags%': '-Xclang -load -Xclang <(clang_lib_path) ',
38 }, { # OS == "win"
39 # On Windows, the plugin is built directly into clang, so there's
40 # no need to load it dynamically.
41 'clang_dynlib_flags%': '',
42 }],
43 ],
44 'clang_plugin_args%': '-Xclang -plugin-arg-find-bad-constructs -Xclang check-templates '
45 '-Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansio n ',
46 },
47 'clang_pdfium_plugins_flags%':
48 '<(clang_dynlib_flags)'
49 '-Xclang -add-plugin -Xclang find-bad-constructs <(clang_plugin_args)' ,
50 }],
51 ], 21 ],
52 }, 22 },
53 'target_defaults': { 23 'target_defaults': {
54 'defines' : [ 24 'defines' : [
55 'OPJ_STATIC', 25 'OPJ_STATIC',
56 'PNG_PREFIX', 26 'PNG_PREFIX',
57 'PNG_USE_READ_MACROS', 27 'PNG_USE_READ_MACROS',
58 'V8_DEPRECATION_WARNINGS', 28 'V8_DEPRECATION_WARNINGS',
59 ], 29 ],
60 'include_dirs': [ 30 'include_dirs': [
(...skipping 17 matching lines...) Expand all
78 'conditions': [ 48 'conditions': [
79 ['target_arch=="x64"', { 49 ['target_arch=="x64"', {
80 'defines' : [ '_FX_CPU_=_FX_X64_', ], 50 'defines' : [ '_FX_CPU_=_FX_X64_', ],
81 'cflags': [ '-fPIC', ], 51 'cflags': [ '-fPIC', ],
82 }], 52 }],
83 ['target_arch=="ia32"', { 53 ['target_arch=="ia32"', {
84 'defines' : [ '_FX_CPU_=_FX_X86_', ], 54 'defines' : [ '_FX_CPU_=_FX_X86_', ],
85 }], 55 }],
86 ], 56 ],
87 }], 57 }],
88 ['clang==1 and clang_use_pdfium_plugins==1', {
89 'cflags': [
90 '<@(clang_pdfium_plugins_flags)',
91 ],
92 }],
93 ], 58 ],
94 'msvs_disabled_warnings': [ 59 'msvs_disabled_warnings': [
95 4267, 60 4267,
96 ], 61 ],
97 }, 62 },
98 'targets': [ 63 'targets': [
99 { 64 {
100 'target_name': 'pdfium', 65 'target_name': 'pdfium',
101 'type': 'static_library', 66 'type': 'static_library',
102 'dependencies': [ 67 'dependencies': [
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 'fpdfsdk/fpdfxfa/include/fpdfxfa_app.h', 1028 'fpdfsdk/fpdfxfa/include/fpdfxfa_app.h',
1064 'fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h', 1029 'fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h',
1065 'fpdfsdk/fpdfxfa/include/fpdfxfa_page.h', 1030 'fpdfsdk/fpdfxfa/include/fpdfxfa_page.h',
1066 'fpdfsdk/fpdfxfa/include/fpdfxfa_util.h', 1031 'fpdfsdk/fpdfxfa/include/fpdfxfa_util.h',
1067 ], 1032 ],
1068 }, 1033 },
1069 ] 1034 ]
1070 }], 1035 }],
1071 ] 1036 ]
1072 } 1037 }
OLDNEW
« no previous file with comments | « build_gyp/standalone.gypi ('k') | xfa.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698