Skip to content

Commit

Permalink
BaseTools: build_rule.template generate a different dll for wholearch…
Browse files Browse the repository at this point in the history
…ive.

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>
  • Loading branch information
apop5 authored and mergify[bot] committed Jan 15, 2025
1 parent f35d3a5 commit ac9a6ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions BaseTools/Conf/build_rule.template
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit ac9a6ee

Please sign in to comment.