summaryrefslogtreecommitdiff
path: root/solenv/gbuild/gbuild.mk
diff options
context:
space:
mode:
Diffstat (limited to 'solenv/gbuild/gbuild.mk')
-rw-r--r--solenv/gbuild/gbuild.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index d5ddcd8925ce..075c029b095d 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -150,6 +150,13 @@ ifeq ($(gb_ENABLE_SYMBOLS_FOR),no)
gb_ENABLE_SYMBOLS_FOR :=
endif
+# Detect whether symbols should be enabled for the given gbuild target.
+# enable if: no "-TARGET" defined AND [module is enabled OR "TARGET" defined]
+gb_target_symbols_enabled = \
+ $(and $(if $(filter -$(1),$(ENABLE_SYMBOLS_FOR)),,$(true)),\
+ $(or $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED),\
+ $(filter $(1),$(ENABLE_SYMBOLS_FOR))))
+
ifeq ($(BLOCK_PCH),)
gb_ENABLE_PCH := $(ENABLE_PCH)
else