Open FlyyingPiggy2020 opened 3 weeks ago
把makefile看完了。。
需要在对应组件下的bouffalo.mk文件中添加 COMPONENT_ADD_LDFLAGS_HEAD
和 COMPONENT_ADD_LDFLAGS_TAIL
COMPONENT_ADD_LDFLAGS_HEAD += -Wl,--whole-archive
COMPONENT_ADD_LDFLAGS_TAIL += -Wl,--no-whole-archive
这两个选项在构建component_project_vars.mk时候会放到 COMPONENT_LDFLAGS
两端:
(看COMPONENT_LDFLAGS
那一行)
component_project_vars.mk::
$(details) "Building component project variables list $(abspath $@)"
@echo '# Automatically generated build file. Do not edit.' > $@
@echo 'COMPONENT_INCLUDES += $(call lib_MakeVariablePath,$(abspath $(addprefix $(COMPONENT_PATH)/,$(COMPONENT_ADD_INCLUDEDIRS))))' >> $@
@echo 'COMPONENT_LDFLAGS += $(COMPONENT_ADD_LDFLAGS_HEAD) $(call lib_MakeVariablePath, $(COMPONENT_ADD_LDFLAGS)) $(COMPONENT_ADD_LDFLAGS_TAIL)' >> $@
@echo 'COMPONENT_LINKER_DEPS += $(call lib_MakeVariablePath,$(call resolvepath,$(COMPONENT_ADD_LINKER_DEPS),$(COMPONENT_PATH)))' >> $@
@echo 'component-$(COMPONENT_NAME)-build: $(addprefix component-,$(addsuffix -build,$(COMPONENT_DEPENDS)))' >> $@
我想增加如下的编译选项,除了直接在bl_iot_sdk内修改外,请问有办法改LDFLAGS吗?