OLD | NEW |
1 { | 1 { |
2 'variables': { | 2 'variables': { |
3 'chromium_code': 1, | 3 'chromium_code': 1, |
4 'pdf_engine%': 0, # 0 PDFium | 4 'pdf_engine%': 0, # 0 PDFium |
5 }, | 5 }, |
6 'target_defaults': { | |
7 'cflags': [ | |
8 '-fPIC', | |
9 ], | |
10 }, | |
11 'targets': [ | 6 'targets': [ |
12 { | 7 { |
13 'target_name': 'pdf', | 8 'target_name': 'pdf', |
14 'type': 'loadable_module', | 9 'type': 'static_library', |
15 'msvs_guid': '647863C0-C7A3-469A-B1ED-AD7283C34BED', | |
16 'dependencies': [ | 10 'dependencies': [ |
17 '../base/base.gyp:base', | 11 '../base/base.gyp:base', |
| 12 '../components/components.gyp:ui_zoom', |
| 13 '../content/content.gyp:content_common', |
18 '../net/net.gyp:net', | 14 '../net/net.gyp:net', |
19 '../ppapi/ppapi.gyp:ppapi_cpp', | 15 '../ppapi/ppapi.gyp:ppapi_internal_module', |
20 '../third_party/pdfium/pdfium.gyp:pdfium', | 16 '../third_party/pdfium/pdfium.gyp:pdfium', |
21 ], | 17 ], |
22 'xcode_settings': { | |
23 'INFOPLIST_FILE': 'Info.plist', | |
24 }, | |
25 'mac_framework_dirs': [ | |
26 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Fram
eworks', | |
27 ], | |
28 'ldflags': [ '-L<(PRODUCT_DIR)',], | 18 'ldflags': [ '-L<(PRODUCT_DIR)',], |
29 'sources': [ | 19 'sources': [ |
30 'button.h', | 20 'button.h', |
31 'button.cc', | 21 'button.cc', |
32 'chunk_stream.h', | 22 'chunk_stream.h', |
33 'chunk_stream.cc', | 23 'chunk_stream.cc', |
34 'control.h', | 24 'control.h', |
35 'control.cc', | 25 'control.cc', |
36 'document_loader.h', | 26 'document_loader.h', |
37 'document_loader.cc', | 27 'document_loader.cc', |
(...skipping 10 matching lines...) Expand all Loading... |
48 'out_of_process_instance.cc', | 38 'out_of_process_instance.cc', |
49 'out_of_process_instance.h', | 39 'out_of_process_instance.h', |
50 'page_indicator.cc', | 40 'page_indicator.cc', |
51 'page_indicator.h', | 41 'page_indicator.h', |
52 'paint_aggregator.cc', | 42 'paint_aggregator.cc', |
53 'paint_aggregator.h', | 43 'paint_aggregator.h', |
54 'paint_manager.cc', | 44 'paint_manager.cc', |
55 'paint_manager.h', | 45 'paint_manager.h', |
56 'pdf.cc', | 46 'pdf.cc', |
57 'pdf.h', | 47 'pdf.h', |
58 'pdf.rc', | |
59 'progress_control.cc', | 48 'progress_control.cc', |
60 'progress_control.h', | 49 'progress_control.h', |
61 'pdf_engine.h', | 50 'pdf_engine.h', |
62 'preview_mode_client.cc', | 51 'preview_mode_client.cc', |
63 'preview_mode_client.h', | 52 'preview_mode_client.h', |
64 'resource.h', | 53 'resource.h', |
65 'resource_consts.h', | 54 'resource_consts.h', |
66 'thumbnail_control.cc', | 55 'thumbnail_control.cc', |
67 'thumbnail_control.h', | 56 'thumbnail_control.h', |
68 '../components/ui/zoom/page_zoom_constants.cc', | |
69 '../content/common/page_zoom.cc', | |
70 ], | 57 ], |
71 'conditions': [ | 58 'conditions': [ |
72 ['pdf_engine==0', { | 59 ['pdf_engine==0', { |
73 'sources': [ | 60 'sources': [ |
74 'pdfium/pdfium_api_string_buffer_adapter.cc', | 61 'pdfium/pdfium_api_string_buffer_adapter.cc', |
75 'pdfium/pdfium_api_string_buffer_adapter.h', | 62 'pdfium/pdfium_api_string_buffer_adapter.h', |
76 'pdfium/pdfium_assert_matching_enums.cc', | 63 'pdfium/pdfium_assert_matching_enums.cc', |
77 'pdfium/pdfium_engine.cc', | 64 'pdfium/pdfium_engine.cc', |
78 'pdfium/pdfium_engine.h', | 65 'pdfium/pdfium_engine.h', |
79 'pdfium/pdfium_mem_buffer_file_read.cc', | 66 'pdfium/pdfium_mem_buffer_file_read.cc', |
80 'pdfium/pdfium_mem_buffer_file_read.h', | 67 'pdfium/pdfium_mem_buffer_file_read.h', |
81 'pdfium/pdfium_mem_buffer_file_write.cc', | 68 'pdfium/pdfium_mem_buffer_file_write.cc', |
82 'pdfium/pdfium_mem_buffer_file_write.h', | 69 'pdfium/pdfium_mem_buffer_file_write.h', |
83 'pdfium/pdfium_page.cc', | 70 'pdfium/pdfium_page.cc', |
84 'pdfium/pdfium_page.h', | 71 'pdfium/pdfium_page.h', |
85 'pdfium/pdfium_range.cc', | 72 'pdfium/pdfium_range.cc', |
86 'pdfium/pdfium_range.h', | 73 'pdfium/pdfium_range.h', |
87 ], | 74 ], |
88 }], | 75 }], |
89 ['OS!="win"', { | |
90 'sources!': [ | |
91 'pdf.rc', | |
92 ], | |
93 }], | |
94 ['OS=="mac"', { | |
95 'mac_bundle': 1, | |
96 'product_name': 'PDF', | |
97 'product_extension': 'plugin', | |
98 # Strip the shipping binary of symbols so "Foxit" doesn't appear in | |
99 # the binary. Symbols are stored in a separate .dSYM. | |
100 'variables': { | |
101 'mac_real_dsym': 1, | |
102 }, | |
103 'sources+': [ | |
104 'Info.plist' | |
105 ], | |
106 }], | |
107 ['OS=="win"', { | 76 ['OS=="win"', { |
108 'defines': [ | 77 'defines': [ |
109 'COMPILE_CONTENT_STATICALLY', | 78 'COMPILE_CONTENT_STATICALLY', |
110 ], | 79 ], |
111 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 80 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
112 'msvs_disabled_warnings': [ 4267, ], | 81 'msvs_disabled_warnings': [ 4267, ], |
113 }], | 82 }], |
114 ['OS=="linux"', { | |
115 'configurations': { | |
116 'Release_Base': { | |
117 #'cflags': [ '-fno-weak',], # get rid of symbols that strip doesn
't remove. | |
118 # Don't do this for now since official builder will take care of i
t. That | |
119 # way symbols can still be uploaded to the crash server. | |
120 #'ldflags': [ '-s',], # strip local symbols from binary. | |
121 }, | |
122 }, | |
123 }], | |
124 ], | 83 ], |
125 }, | 84 }, |
126 ], | 85 ], |
127 'conditions': [ | |
128 # CrOS has a separate step to do this. | |
129 ['OS=="linux" and chromeos==0', | |
130 { 'targets': [ | |
131 { | |
132 'target_name': 'pdf_linux_symbols', | |
133 'type': 'none', | |
134 'conditions': [ | |
135 ['linux_dump_symbols==1', { | |
136 'actions': [ | |
137 { | |
138 'action_name': 'dump_symbols', | |
139 'inputs': [ | |
140 '<(DEPTH)/build/linux/dump_app_syms', | |
141 '<(PRODUCT_DIR)/dump_syms', | |
142 '<(PRODUCT_DIR)/libpdf.so', | |
143 ], | |
144 'outputs': [ | |
145 '<(PRODUCT_DIR)/libpdf.so.breakpad.<(target_arch)', | |
146 ], | |
147 'action': ['<(DEPTH)/build/linux/dump_app_syms', | |
148 '<(PRODUCT_DIR)/dump_syms', | |
149 '<(linux_strip_binary)', | |
150 '<(PRODUCT_DIR)/libpdf.so', | |
151 '<@(_outputs)'], | |
152 'message': 'Dumping breakpad symbols to <(_outputs)', | |
153 'process_outputs_as_sources': 1, | |
154 }, | |
155 ], | |
156 'dependencies': [ | |
157 'pdf', | |
158 '../breakpad/breakpad.gyp:dump_syms', | |
159 ], | |
160 }], | |
161 ], | |
162 }, | |
163 ], | |
164 },], # OS=="linux" and chromeos==0 | |
165 ['OS=="win" and fastbuild==0 and target_arch=="ia32" and syzyasan==1', { | |
166 'variables': { | |
167 'dest_dir': '<(PRODUCT_DIR)/syzygy', | |
168 }, | |
169 'targets': [ | |
170 { | |
171 'target_name': 'pdf_syzyasan', | |
172 'type': 'none', | |
173 'sources' : [], | |
174 'dependencies': [ | |
175 'pdf', | |
176 ], | |
177 # Instrument PDFium with SyzyAsan. | |
178 'actions': [ | |
179 { | |
180 'action_name': 'Instrument PDFium with SyzyAsan', | |
181 'inputs': [ | |
182 '<(PRODUCT_DIR)/pdf.dll', | |
183 ], | |
184 'outputs': [ | |
185 '<(dest_dir)/pdf.dll', | |
186 '<(dest_dir)/pdf.dll.pdb', | |
187 ], | |
188 'action': [ | |
189 'python', | |
190 '<(DEPTH)/chrome/tools/build/win/syzygy/instrument.py', | |
191 '--mode', 'asan', | |
192 '--input_executable', '<(PRODUCT_DIR)/pdf.dll', | |
193 '--input_symbol', '<(PRODUCT_DIR)/pdf.dll.pdb', | |
194 '--destination_dir', '<(dest_dir)', | |
195 ], | |
196 }, | |
197 ], | |
198 }, | |
199 ], | |
200 }], # OS=="win" and fastbuild==0 and target_arch=="ia32" and syzyasan==1 | |
201 ], | |
202 } | 86 } |
OLD | NEW |