From 1ae572e7e35b52ce4897d1715c005a1b0f79526a Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 27 Apr 2016 13:02:24 -0700 Subject: Allow overriding GN build flags In order to enable XFA from GN builds we need to be able to override pdf_enable_xfa. To do this a build_overrides/pdfium.gni file needs to be created in Chrome. To use that, we have to create a build_overrides/pdfium.gni file in PDFium that just uses the default values. BUG=chromium:62400 Review-Url: https://codereview.chromium.org/1923333002 --- BUILD.gn | 2 +- build_overrides/pdfium.gni | 23 +++++++++++++++++++++++ pdfium.gni | 23 ----------------------- samples/BUILD.gn | 2 +- testing/libfuzzer/BUILD.gn | 2 +- third_party/BUILD.gn | 2 +- 6 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 build_overrides/pdfium.gni delete mode 100644 pdfium.gni diff --git a/BUILD.gn b/BUILD.gn index b4a6771344..133fee86c2 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -3,8 +3,8 @@ # found in the LICENSE file. import("//build_overrides/v8.gni") +import("//build_overrides/pdfium.gni") import("//testing/test.gni") -import("pdfium.gni") config("pdfium_config") { cflags = [] diff --git a/build_overrides/pdfium.gni b/build_overrides/pdfium.gni new file mode 100644 index 0000000000..d032aa12a4 --- /dev/null +++ b/build_overrides/pdfium.gni @@ -0,0 +1,23 @@ +# Copyright 2016 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. + +# This file contains PDFium-related build flags. + +declare_args() { + # On Android there's no system FreeType. On Windows and Mac, only a few + # methods are used from it. + pdfium_bundle_freetype = !is_linux + + # Build PDFium either with or without v8 support. + pdf_enable_v8 = true + + # Build PDFium either with or without XFA Forms support. + pdf_enable_xfa = false + + # Build PDFium against skia (experimental) rather than agg. + pdf_use_skia = false + + # Build PDFium standalone + pdf_is_standalone = false +} diff --git a/pdfium.gni b/pdfium.gni deleted file mode 100644 index b85ac74d0f..0000000000 --- a/pdfium.gni +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2015 PDFium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# This file contains PDFium-related build flags. - -declare_args() { - # On Android there's no system FreeType. On Windows and Mac, only a few - # methods are used from it. - pdfium_bundle_freetype = !is_linux - - # Build PDFium either with or without v8 support. - pdf_enable_v8 = true - - # Build PDFium either with or without XFA Forms support. - pdf_enable_xfa = false - - # Build PDFium against skia (experimental) rather than agg. - pdf_use_skia = false - - # Build PDFium standalone - pdf_is_standalone = false -} diff --git a/samples/BUILD.gn b/samples/BUILD.gn index 83c510d7c8..9e18289e46 100644 --- a/samples/BUILD.gn +++ b/samples/BUILD.gn @@ -4,7 +4,7 @@ import("//build/config/sanitizers/sanitizers.gni") import("//build_overrides/v8.gni") -import("../pdfium.gni") +import("//build_overrides/pdfium.gni") group("samples") { testonly = true diff --git a/testing/libfuzzer/BUILD.gn b/testing/libfuzzer/BUILD.gn index 0ee8b29e38..bd6215ba1a 100644 --- a/testing/libfuzzer/BUILD.gn +++ b/testing/libfuzzer/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../../pdfium.gni") +import("//build_overrides/pdfium.gni") config("libfuzzer_config") { defines = [ diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn index e0c9bf116e..eb1e53b3bb 100644 --- a/third_party/BUILD.gn +++ b/third_party/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("../pdfium.gni") +import("//build_overrides/pdfium.gni") group("third_party") { deps = [ -- cgit v1.2.3