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 }, |
6 'targets': [ | 11 'targets': [ |
7 { | 12 { |
8 'target_name': 'pdf', | 13 'target_name': 'pdf', |
9 'type': 'static_library', | 14 'type': 'loadable_module', |
| 15 'msvs_guid': '647863C0-C7A3-469A-B1ED-AD7283C34BED', |
10 'dependencies': [ | 16 'dependencies': [ |
11 '../base/base.gyp:base', | 17 '../base/base.gyp:base', |
12 '../components/components.gyp:ui_zoom', | |
13 '../content/content.gyp:content_common', | |
14 '../net/net.gyp:net', | 18 '../net/net.gyp:net', |
15 '../ppapi/ppapi.gyp:ppapi_internal_module', | 19 '../ppapi/ppapi.gyp:ppapi_cpp', |
16 '../third_party/pdfium/pdfium.gyp:pdfium', | 20 '../third_party/pdfium/pdfium.gyp:pdfium', |
17 ], | 21 ], |
| 22 'xcode_settings': { |
| 23 'INFOPLIST_FILE': 'Info.plist', |
| 24 }, |
| 25 'mac_framework_dirs': [ |
| 26 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Fram
eworks', |
| 27 ], |
18 'ldflags': [ '-L<(PRODUCT_DIR)',], | 28 'ldflags': [ '-L<(PRODUCT_DIR)',], |
19 'sources': [ | 29 'sources': [ |
20 'button.h', | 30 'button.h', |
21 'button.cc', | 31 'button.cc', |
22 'chunk_stream.h', | 32 'chunk_stream.h', |
23 'chunk_stream.cc', | 33 'chunk_stream.cc', |
24 'control.h', | 34 'control.h', |
25 'control.cc', | 35 'control.cc', |
26 'document_loader.h', | 36 'document_loader.h', |
27 'document_loader.cc', | 37 'document_loader.cc', |
(...skipping 10 matching lines...) Loading... |
38 'out_of_process_instance.cc', | 48 'out_of_process_instance.cc', |
39 'out_of_process_instance.h', | 49 'out_of_process_instance.h', |
40 'page_indicator.cc', | 50 'page_indicator.cc', |
41 'page_indicator.h', | 51 'page_indicator.h', |
42 'paint_aggregator.cc', | 52 'paint_aggregator.cc', |
43 'paint_aggregator.h', | 53 'paint_aggregator.h', |
44 'paint_manager.cc', | 54 'paint_manager.cc', |
45 'paint_manager.h', | 55 'paint_manager.h', |
46 'pdf.cc', | 56 'pdf.cc', |
47 'pdf.h', | 57 'pdf.h', |
| 58 'pdf.rc', |
48 'progress_control.cc', | 59 'progress_control.cc', |
49 'progress_control.h', | 60 'progress_control.h', |
50 'pdf_engine.h', | 61 'pdf_engine.h', |
51 'preview_mode_client.cc', | 62 'preview_mode_client.cc', |
52 'preview_mode_client.h', | 63 'preview_mode_client.h', |
53 'resource.h', | 64 'resource.h', |
54 'resource_consts.h', | 65 'resource_consts.h', |
55 'thumbnail_control.cc', | 66 'thumbnail_control.cc', |
56 'thumbnail_control.h', | 67 'thumbnail_control.h', |
| 68 '../components/ui/zoom/page_zoom_constants.cc', |
| 69 '../content/common/page_zoom.cc', |
57 ], | 70 ], |
58 'conditions': [ | 71 'conditions': [ |
59 ['pdf_engine==0', { | 72 ['pdf_engine==0', { |
60 'sources': [ | 73 'sources': [ |
61 'pdfium/pdfium_api_string_buffer_adapter.cc', | 74 'pdfium/pdfium_api_string_buffer_adapter.cc', |
62 'pdfium/pdfium_api_string_buffer_adapter.h', | 75 'pdfium/pdfium_api_string_buffer_adapter.h', |
63 'pdfium/pdfium_assert_matching_enums.cc', | 76 'pdfium/pdfium_assert_matching_enums.cc', |
64 'pdfium/pdfium_engine.cc', | 77 'pdfium/pdfium_engine.cc', |
65 'pdfium/pdfium_engine.h', | 78 'pdfium/pdfium_engine.h', |
66 'pdfium/pdfium_mem_buffer_file_read.cc', | 79 'pdfium/pdfium_mem_buffer_file_read.cc', |
67 'pdfium/pdfium_mem_buffer_file_read.h', | 80 'pdfium/pdfium_mem_buffer_file_read.h', |
68 'pdfium/pdfium_mem_buffer_file_write.cc', | 81 'pdfium/pdfium_mem_buffer_file_write.cc', |
69 'pdfium/pdfium_mem_buffer_file_write.h', | 82 'pdfium/pdfium_mem_buffer_file_write.h', |
70 'pdfium/pdfium_page.cc', | 83 'pdfium/pdfium_page.cc', |
71 'pdfium/pdfium_page.h', | 84 'pdfium/pdfium_page.h', |
72 'pdfium/pdfium_range.cc', | 85 'pdfium/pdfium_range.cc', |
73 'pdfium/pdfium_range.h', | 86 'pdfium/pdfium_range.h', |
74 ], | 87 ], |
75 }], | 88 }], |
| 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 }], |
76 ['OS=="win"', { | 107 ['OS=="win"', { |
| 108 'defines': [ |
| 109 'COMPILE_CONTENT_STATICALLY', |
| 110 ], |
77 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 111 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
78 'msvs_disabled_warnings': [ 4267, ], | 112 'msvs_disabled_warnings': [ 4267, ], |
79 }], | 113 }], |
| 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 }], |
80 ], | 124 ], |
81 }, | 125 }, |
82 ], | 126 ], |
| 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 ], |
83 } | 202 } |
OLD | NEW |