diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-04-10 19:54:16 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-10 19:54:16 +0000 |
commit | b93178e1de2f126367f15fe6769ebc3b19d65504 (patch) | |
tree | 9089d73eefdad137a0fb5c1bc69a49b4536838d5 | |
parent | 7d865b611bf5b029723ec3143180d23c95c907e8 (diff) | |
download | pdfium-b93178e1de2f126367f15fe6769ebc3b19d65504.tar.xz |
Add an assert to make sure all code is included in static lib
When building a complete static lib using pdf_is_complete_lib, assert
that is_component_build=false, so that 'component' targets will be
statically linked into the final product, instead of being
dynamically linked in.
We cannot have a rule like if pdf_is_complete_lib then
is_component_build=false, because the is_component_build arg is
defined in a file we import and overwriting the value later doesn't
do what one expects, since the value has already been used in the
imported file set things like env vars and build flags. Thus we
assert the value and have a message about needing to set
is_component_build=false.
BUG=pdfium:1062
Change-Id: I83c430ca374e70c01f18e4b15a1eeb68aafa4444
Reviewed-on: https://pdfium-review.googlesource.com/30030
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
-rw-r--r-- | pdfium.gni | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pdfium.gni b/pdfium.gni index e48750e5f0..237d7c7add 100644 --- a/pdfium.gni +++ b/pdfium.gni @@ -69,3 +69,6 @@ declare_args() { if (pdf_use_skia && pdf_use_skia_paths) { assert(false, "Enable at most ONE of pdf_use_skia and pdf_use_skia_paths") } + +assert(!pdf_is_complete_lib || !is_component_build, + "pdf_is_complete_lib=true requires is_component_build=false") |