How to customize the linker input object order in generated makefile
조회 수: 1 (최근 30일)
이전 댓글 표시
I'm trying to customize the order of libraries that get linked together in a final build output, but can't seem to find any hook to do that.
I've created a Custom Toolchain, but can't find any hooks to alter the "LD" command. There does not appear to be any documentation on the "commandParameter" argument, in terms to what macros ('|>TOOL<| |>TOOL_OPTIONS<| |>OUTPUT_FLAG<||>OUTPUT<|') are possible for each tool and how to control what gets put in place of these. Also does anyone have a clue on how to influence what the contents of some of the makefile macros that get generated such as (PREBUILT_OBJS and SYSTEM_LIBS, I think that one may come from the Library configuration settings)?
Here is what I am getting for an output of the linker step:
$(LD) $(LDFLAGS) -o $(PRODUCT) $(OBJS) $(MODELREF_LIBS) $(LIBS) $(SYSTEM_LIBS) $(TOOLCHAIN_LIBS)
What I need is:
$(LD) $(LDFLAGS) -o $(PRODUCT) $(ALL_OBJS) $(MODELREF_LIBS) --start-group $(TOOLCHAIN_LIBS) --end-group $(LIBS) $(SYSTEM_LIBS)
The reason for my need is due to the fact the some of the $TOOLCHAIN_LIBS object reference objects in $(LIBS). Yes there is some unavoidable circular referencing going on in this build.
Any ideas will be appreciated.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!