diff options
author | Andrei Homescu <ahomescu@google.com> | 2024-02-27 03:44:50 +0000 |
---|---|---|
committer | Andrei Homescu <ahomescu@google.com> | 2024-02-27 03:46:13 +0000 |
commit | 2f27f04612b0e4e18e0d5d4a549f458198f57486 (patch) | |
tree | 42381a8edf1eb0cec9ba148bd96ef36cc5493986 | |
parent | 680187686cee04d1bad6ff5acd6477584e9bad6f (diff) | |
download | common-2f27f04612b0e4e18e0d5d4a549f458198f57486.tar.gz |
make: Substitute build root with placeholder in defines
Reduce the space taken by some module_config.h variables
by substituting the full build root path with the
__BUILDROOT__ placeholder. E.g. this reduces the size
of MODULE_SRCDEPS for binderRpcTest from 70K to 48K.
Bug: 285203365
Test: m trusty_generic-arm64-test-debug
Change-Id: I1f80af62eaf6cad943591ba4897147a20a28b861
-rw-r--r-- | make/module.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/make/module.mk b/make/module.mk index b270314a..7630c54a 100644 --- a/make/module.mk +++ b/make/module.mk @@ -73,7 +73,7 @@ MODULES += $(MODULE_DEPS) # Turn spaces into underscores and escape quotes for the module_config.h header define clean_defines -$(subst $(SPACE),_,$(subst \",\\\\\",$(1))) +$(subst $(SPACE),_,$(subst \",\\\\\",$(subst $(BUILDROOT),__BUILDROOT__,$(1)))) endef MODULE_DEFINES += MODULE_COMPILEFLAGS=\"$(call clean_defines,$(MODULE_COMPILEFLAGS))\" |