From b93178e1de2f126367f15fe6769ebc3b19d65504 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Tue, 10 Apr 2018 19:54:16 +0000 Subject: 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 Reviewed-by: Lei Zhang --- pdfium.gni | 3 +++ 1 file changed, 3 insertions(+) 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") -- cgit v1.2.3