Roll pdfium, add GN build for pdf and pdfium.
Pdfium changes: d68f9a3 Add GN build file for pdfium, rename GYP target. f0a5576 fix two uninitialized reads https://code.google.com/p/pdfium/issues/detail?id=9 https://code.google.com/p/pdfium/issues/detail?id=10 bb2b1e7 Use unsigned type for iteration to avoid int overflow. 62a7fd6 Wrong variable assignment in Pdfium. In the GN build this separates out the no-exceptions flag since pdfium must be compiled with exceptions enabled. Updates pdfium naming in GYP from fpdfsdk. Removes src/pdf from .gitignore now that it is checked in. BUG= R=jam@chromium.org Review URL: https://codereview.chromium.org/315313002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275269 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -175,7 +175,6 @@ v8.log
|
||||
/net/testserver.log
|
||||
/out
|
||||
/out_*
|
||||
/pdf
|
||||
/ppapi/native_client/nacl_irt.xml
|
||||
/ppapi/native_client/ppapi_lib.xml
|
||||
/ppapi/native_client/src/shared/ppapi_proxy/nacl_ppapi_browser.xml
|
||||
|
2
BUILD.gn
2
BUILD.gn
@ -47,6 +47,7 @@ group("root") {
|
||||
"//ipc",
|
||||
"//mojo",
|
||||
"//net",
|
||||
"//pdf",
|
||||
"//ppapi:ppapi_c",
|
||||
"//printing",
|
||||
"//sandbox",
|
||||
@ -120,6 +121,7 @@ group("root") {
|
||||
"//content/public/renderer",
|
||||
"//dbus",
|
||||
"//extensions/common/api:extensions_api",
|
||||
"//pdf", # Not compiled on Android in GYP yet, either.
|
||||
"//ppapi:ppapi_c",
|
||||
"//third_party/libusb",
|
||||
# "//third_party/WebKit/Source/platform",
|
||||
|
2
DEPS
2
DEPS
@ -76,7 +76,7 @@ vars = {
|
||||
# Three lines of non-changing comments so that
|
||||
# the commit queue can handle CLs rolling PDFIum
|
||||
# and whatever else without interference from each other.
|
||||
"pdfium_revision": "dbd4c06036f42d8dffe033ba112d6d7085dfe475",
|
||||
"pdfium_revision": "d68f9a3e646555e292a1f184560149e8a3e629ac",
|
||||
}
|
||||
|
||||
deps = {
|
||||
|
@ -329,7 +329,15 @@ if (is_win) {
|
||||
"//build/config/win:sdk",
|
||||
"//build/config/win:unicode",
|
||||
]
|
||||
} else if (is_linux) {
|
||||
}
|
||||
if (is_posix) {
|
||||
_native_compiler_configs += [
|
||||
"//build/config/gcc:no_exceptions",
|
||||
"//build/config/gcc:symbol_visibility_hidden",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_linux) {
|
||||
_native_compiler_configs += [ "//build/config/linux:sdk", ]
|
||||
} else if (is_mac) {
|
||||
_native_compiler_configs += [ "//build/config/mac:sdk", ]
|
||||
@ -338,9 +346,7 @@ if (is_win) {
|
||||
} else if (is_android) {
|
||||
_native_compiler_configs += [ "//build/config/android:sdk", ]
|
||||
}
|
||||
if (!is_win) {
|
||||
_native_compiler_configs += [ "//build/config/gcc:symbol_visibility_hidden" ]
|
||||
}
|
||||
|
||||
if (is_clang) {
|
||||
_native_compiler_configs += [
|
||||
"//build/config/clang:find_bad_constructs",
|
||||
|
@ -58,7 +58,6 @@ config("compiler") {
|
||||
"-fno-strict-aliasing", # See http://crbug.com/32204
|
||||
]
|
||||
cflags_cc += [
|
||||
"-fno-exceptions",
|
||||
"-fno-threadsafe-statics",
|
||||
# Not exporting C++ inline functions can generally be applied anywhere
|
||||
# so we do so here. Normal function visibility is controlled by
|
||||
|
@ -35,3 +35,7 @@ config("executable_ldconfig") {
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
config("no_exceptions") {
|
||||
cflags_cc = [ "-fno-exceptions" ]
|
||||
}
|
||||
|
108
pdf/BUILD.gn
Normal file
108
pdf/BUILD.gn
Normal file
@ -0,0 +1,108 @@
|
||||
# Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
pdf_engine = 0 # 0 PDFium
|
||||
|
||||
# TODO(GYP) need support for loadable modules
|
||||
shared_library("pdf") {
|
||||
sources = [
|
||||
"button.h",
|
||||
"button.cc",
|
||||
"chunk_stream.h",
|
||||
"chunk_stream.cc",
|
||||
"control.h",
|
||||
"control.cc",
|
||||
"document_loader.h",
|
||||
"document_loader.cc",
|
||||
"draw_utils.cc",
|
||||
"draw_utils.h",
|
||||
"fading_control.cc",
|
||||
"fading_control.h",
|
||||
"fading_controls.cc",
|
||||
"fading_controls.h",
|
||||
"instance.cc",
|
||||
"instance.h",
|
||||
"number_image_generator.cc",
|
||||
"number_image_generator.h",
|
||||
"out_of_process_instance.cc",
|
||||
"out_of_process_instance.h",
|
||||
"page_indicator.cc",
|
||||
"page_indicator.h",
|
||||
"paint_aggregator.cc",
|
||||
"paint_aggregator.h",
|
||||
"paint_manager.cc",
|
||||
"paint_manager.h",
|
||||
"pdf.cc",
|
||||
"pdf.h",
|
||||
"pdf.rc",
|
||||
"progress_control.cc",
|
||||
"progress_control.h",
|
||||
"pdf_engine.h",
|
||||
"preview_mode_client.cc",
|
||||
"preview_mode_client.h",
|
||||
"resource.h",
|
||||
"resource_consts.h",
|
||||
"thumbnail_control.cc",
|
||||
"thumbnail_control.h",
|
||||
"../chrome/browser/chrome_page_zoom_constants.cc",
|
||||
"../content/common/page_zoom.cc",
|
||||
]
|
||||
|
||||
if (pdf_engine == 0) {
|
||||
sources += [
|
||||
"pdfium/pdfium_assert_matching_enums.cc",
|
||||
"pdfium/pdfium_engine.cc",
|
||||
"pdfium/pdfium_engine.h",
|
||||
"pdfium/pdfium_mem_buffer_file_read.cc",
|
||||
"pdfium/pdfium_mem_buffer_file_read.h",
|
||||
"pdfium/pdfium_mem_buffer_file_write.cc",
|
||||
"pdfium/pdfium_mem_buffer_file_write.h",
|
||||
"pdfium/pdfium_page.cc",
|
||||
"pdfium/pdfium_page.h",
|
||||
"pdfium/pdfium_range.cc",
|
||||
"pdfium/pdfium_range.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
defines = [ "COMPILE_CONTENT_STATICALLY" ]
|
||||
cflags = [ "/wd4267" ] # TODO(jschuh) size_t to int truncations.
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
# TODO(GYP)
|
||||
#'mac_bundle': 1,
|
||||
#'product_name': 'PDF',
|
||||
#'product_extension': 'plugin',
|
||||
## Strip the shipping binary of symbols so "Foxit" doesn't appear in
|
||||
## the binary. Symbols are stored in a separate .dSYM.
|
||||
#'variables': {
|
||||
# 'mac_real_dsym': 1,
|
||||
#},
|
||||
#'sources+': [
|
||||
# 'Info.plist'
|
||||
#]
|
||||
#'xcode_settings': {
|
||||
# 'INFOPLIST_FILE': 'Info.plist',
|
||||
#},
|
||||
}
|
||||
|
||||
if (is_linux) {
|
||||
# TODO(GYP)
|
||||
## Use a custom version script to prevent leaking the vendor name in
|
||||
## visible symbols.
|
||||
#'ldflags': [
|
||||
# '-Wl,--version-script=<!(cd <(DEPTH) && pwd -P)/pdf/libpdf.map'
|
||||
#],
|
||||
}
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
"//net",
|
||||
"//ppapi:ppapi_cpp",
|
||||
"//third_party/pdfium",
|
||||
]
|
||||
}
|
||||
|
||||
# TODO(GYP) pdf_linux_symbols target.
|
@ -17,7 +17,7 @@
|
||||
'../base/base.gyp:base',
|
||||
'../net/net.gyp:net',
|
||||
'../ppapi/ppapi.gyp:ppapi_cpp',
|
||||
'../third_party/pdfium/pdfium.gyp:fpdfsdk',
|
||||
'../third_party/pdfium/pdfium.gyp:pdfium',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'INFOPLIST_FILE': 'Info.plist',
|
||||
|
Reference in New Issue
Block a user