Chromium Code Reviews| Index: BUILD.gn |
| diff --git a/BUILD.gn b/BUILD.gn |
| index 5d258904d2bb76ea36e6fa5024482caebf01afd4..ea0a008e13a1a122ff0242bc1ec22b75a2b0cd65 100644 |
| --- a/BUILD.gn |
| +++ b/BUILD.gn |
| @@ -6,7 +6,7 @@ import("//build_overrides/v8.gni") |
| import("//testing/test.gni") |
| import("pdfium.gni") |
| -config("pdfium_config") { |
| +config("pdfium_common_config") { |
| cflags = [] |
| include_dirs = [ |
| ".", |
| @@ -17,7 +17,6 @@ config("pdfium_config") { |
| "OPJ_STATIC", |
| "PNG_PREFIX", |
| "PNG_USE_READ_MACROS", |
| - "V8_DEPRECATION_WARNINGS", |
| ] |
| if (pdf_use_skia) { |
| @@ -31,7 +30,12 @@ config("pdfium_config") { |
| if (pdf_enable_xfa) { |
| defines += [ "PDF_ENABLE_XFA" ] |
| } |
| +} |
| +config("pdfium_core_config") { |
| + cflags = [] |
| + configs = [":pdfium_common_config"] |
| + defines = ["V8_DEPRECATION_WARNINGS"] |
| if (is_linux) { |
| if (current_cpu == "x64") { |
| defines += [ "_FX_CPU_=_FX_X64_" ] |
| @@ -40,12 +44,15 @@ config("pdfium_config") { |
| defines += [ "_FX_CPU_=_FX_X86_" ] |
| } |
| } |
| - |
| if (is_win) { |
| cflags += [ "/wd4267" ] |
| } |
| } |
| +config("pdfium_third_party_config") { |
|
dsinclair
2016/06/06 19:54:41
Should we move this into third_party/BUILD.gn?
Wei Li
2016/06/06 21:31:58
I think either way should be fine. Moved to third_
|
| + configs = [":pdfium_common_config"] |
| +} |
| + |
| config("xfa_warnings") { |
| visibility = [ ":*" ] |
| if (is_posix && !is_clang) { # When GCC. |
| @@ -100,7 +107,7 @@ static_library("pdfium") { |
| ] |
| libs = [] |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| deps = [ |
| ":fdrm", |
| @@ -170,7 +177,7 @@ source_set("test_support") { |
| ] |
| configs += [ "//v8:external_startup_data" ] |
| } |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| # Targets below this are only visible within this file (and to the |
| @@ -187,7 +194,7 @@ static_library("fdrm") { |
| "core/fdrm/crypto/fx_crypt_sha.cpp", |
| "core/fdrm/crypto/include/fx_crypt.h", |
| ] |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| static_library("fpdfdoc") { |
| @@ -237,7 +244,7 @@ static_library("fpdfdoc") { |
| "core/fpdfdoc/pdf_vt.h", |
| "core/fpdfdoc/tagged_int.h", |
| ] |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| static_library("fpdfapi") { |
| @@ -464,7 +471,7 @@ static_library("fpdfapi") { |
| "core/fpdfapi/fpdf_render/render_int.h", |
| "core/fpdfapi/include/cpdf_modulemgr.h", |
| ] |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| static_library("fpdftext") { |
| @@ -477,7 +484,7 @@ static_library("fpdftext") { |
| "core/fpdftext/unicodenormalizationdata.cpp", |
| "core/fpdftext/unicodenormalizationdata.h", |
| ] |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| static_library("fxcodec") { |
| @@ -577,7 +584,7 @@ static_library("fxcodec") { |
| # conversion to check that an address is 16-bit aligned (benign). |
| cflags_c = [ "-Wno-pointer-to-int-cast" ] |
| } |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| config("fxge_warnings") { |
| @@ -639,7 +646,7 @@ static_library("fxcrt") { |
| "core/fxcrt/include/fx_arb.h", |
| ] |
| } |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| static_library("fxge") { |
| @@ -700,7 +707,7 @@ static_library("fxge") { |
| configs += [ |
| ":fxge_warnings", |
| - ":pdfium_config", |
| + ":pdfium_core_config", |
| ] |
| if (pdf_use_skia) { |
| @@ -743,7 +750,7 @@ static_library("fxedit") { |
| "fpdfsdk/fxedit/include/fxet_edit.h", |
| "fpdfsdk/fxedit/include/fxet_list.h", |
| ] |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| static_library("pdfwindow") { |
| @@ -781,7 +788,7 @@ static_library("pdfwindow") { |
| "fpdfsdk/pdfwindow/PWL_Wnd.cpp", |
| "fpdfsdk/pdfwindow/PWL_Wnd.h", |
| ] |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| static_library("javascript") { |
| @@ -844,7 +851,7 @@ static_library("javascript") { |
| } else { |
| sources += [ "fpdfsdk/javascript/JS_Runtime_Stub.cpp" ] |
| } |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| static_library("formfiller") { |
| @@ -868,7 +875,7 @@ static_library("formfiller") { |
| "fpdfsdk/formfiller/cffl_textfield.cpp", |
| "fpdfsdk/formfiller/cffl_textfield.h", |
| ] |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| if (pdf_enable_xfa) { |
| @@ -886,7 +893,7 @@ if (pdf_enable_xfa) { |
| deps = [ |
| ":xfa", |
| ] |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| static_library("xfa") { |
| @@ -1587,7 +1594,7 @@ if (pdf_enable_xfa) { |
| ] |
| } |
| configs += [ |
| - ":pdfium_config", |
| + ":pdfium_core_config", |
| ":xfa_warnings", |
| ] |
| } |
| @@ -1642,7 +1649,7 @@ test("pdfium_unittests") { |
| "//v8/include", |
| ] |
| } |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| test("pdfium_embeddertests") { |
| @@ -1695,7 +1702,7 @@ test("pdfium_embeddertests") { |
| ] |
| configs += [ "//v8:external_startup_data" ] |
| } |
| - configs += [ ":pdfium_config" ] |
| + configs += [ ":pdfium_core_config" ] |
| } |
| if (pdf_is_standalone) { |