Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(879)

Unified Diff: build/config/BUILDCONFIG.gn

Issue 1548473003: GN Don't enable linker version script for components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up base Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/BUILD.gn ('k') | content/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILDCONFIG.gn
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 54bf3722fa5c5c1197e790834d0154279a804dee..56b2aa63d881195316dd0048ff140f91bfc235a3 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -549,6 +549,9 @@ set_defaults("loadable_module") {
if (is_component_build) {
set_defaults("component") {
configs = _shared_library_configs
+ if (is_android) {
+ configs -= [ "//build/config/android:hide_native_jni_exports" ]
+ }
}
}
@@ -575,12 +578,19 @@ set_defaults("test") {
# COMPONENT SETUP
# ==============================================================================
-if (is_component_build) {
- _component_mode = "shared_library"
-} else {
- _component_mode = "source_set"
-}
template("component") {
+ # Some targets (e.g. //base) should user static_library rather than source_set
brettw 2016/01/04 22:24:53 ...rather than source set in non-component builds.
agrieve 2016/01/05 02:46:47 Done.
+ # in order to not link unused object files.
+ _never_use_source_set =
+ defined(invoker.never_use_source_set) && invoker.never_use_source_set
brettw 2016/01/04 22:24:53 I'd feel better if this parameter was called "invo
agrieve 2016/01/05 02:46:47 Done.
+ assert(_never_use_source_set || true) # Mark as used.
+ if (is_component_build) {
+ _component_mode = "shared_library"
+ } else if (_never_use_source_set) {
brettw 2016/01/04 22:24:53 Why not just write: } else if (defined(invoker.c
agrieve 2016/01/05 02:46:47 I tried this at first, but it complains of an unus
+ _component_mode = "static_library"
+ } else {
+ _component_mode = "source_set"
+ }
target(_component_mode, target_name) {
forward_variables_from(invoker, "*")
« no previous file with comments | « base/BUILD.gn ('k') | content/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698