BaseTools: build_rule.template generate a different dll for wholearchive.

When running the /wholearchive test build, generate the test .dll as a
different filename to prevent the system holding onto the dll file too
long and generating a build error that the actual dll cannot be found.
Remove the temporary file after it was generated because the successful
completion of the link command is the test case.

Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
This commit is contained in:
Aaron Pop 2025-01-13 15:26:02 -08:00 committed by mergify[bot]
parent f35d3a5bd3
commit ac9a6eed02

View File

@ -287,7 +287,8 @@
$(DEBUG_DIR)(+)$(MODULE_NAME).dll
<Command.MSFT, Command.INTEL>
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
"$(DLINK)" /OUT:${dst}.wtemp $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
$(RM) ${dst}.wtemp
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
<Command.CLANGPDB>
@ -312,7 +313,8 @@
$(DEBUG_DIR)(+)$(MODULE_NAME).dll
<Command.MSFT>
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_XIPFLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
"$(DLINK)" /OUT:${dst}.wtemp $(DLINK_FLAGS) $(DLINK2_FLAGS) $(DLINK_XIPFLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
$(RM) ${dst}.wtemp
"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_XIPFLAGS) $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST)
<Command.GCC>