mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 10:00:51 +00:00
genvif: Prevent undefined referencer when using APIs not provided by genvif
Problem was detected while using ccprintf to debug a data role swap
requests issue. To prevent errors similar to this, surround the API call
as follows:
ifndef VIF_BUILD
ccprints("I won't generate an undefined reference when building genvif");
endif
BUG=b:63664511
BRANCH=None
TEST=`make -j buildall`
Change-Id: Ieab9eaa638320cae67995a67c843d08b54acfbcb
Signed-off-by: Sam Hurst <shurst@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/570820
Commit-Ready: Sam Hurst <shurst@google.com>
Tested-by: Sam Hurst <shurst@google.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
@@ -31,7 +31,8 @@ $(out)/util/genvif: $(out)/util/usb_pd_policy.o board/$(BOARD)/board.h \
|
||||
include/usb_pd.h include/usb_pd_tcpm.h
|
||||
$(out)/util/genvif: BUILD_LDFLAGS+=$(out)/util/usb_pd_policy.o -flto
|
||||
|
||||
STANDALONE_FLAGS=-ffreestanding -fno-builtin -nostdinc -Ibuiltin/ -D"__keep= "
|
||||
STANDALONE_FLAGS=-ffreestanding -fno-builtin -nostdinc \
|
||||
-Ibuiltin/ -D"__keep= " -DVIF_BUILD
|
||||
$(out)/util/usb_pd_policy.o: board/$(BOARD)/usb_pd_policy.c
|
||||
$(call quiet,c_to_vif,BUILDCC)
|
||||
deps += $(out)/util/usb_pd_policy.o.d
|
||||
|
||||
Reference in New Issue
Block a user