Hi, Konstantin,

Do you have a fix for the cyclic redundancy issue when building OptionROMs?  If not, can you help me reproduce it?

I'd hate to revert d372ab as it fixed dependency issues we frequently ran into during parallel builds.

Thanks,
Jake

From: Konstantin Aladyshev <aladyshev22@gmail.com>
Sent: Monday, December 12, 2022 8:09 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: bob.c.feng@intel.com <bob.c.feng@intel.com>; gaoliming@byosoft.com.cn <gaoliming@byosoft.com.cn>; yuwei.chen@intel.com <yuwei.chen@intel.com>; Jake Garver <jake@nvidia.com>; Konstantin Aladyshev <aladyshev22@gmail.com>
Subject: [PATCH] Revert "BaseTools/Conf: Fix Dynamic-Library-File template"
 
External email: Use caution opening links or attachments


Revert commit d372ab585a2cdc5348af5f701c56c631235fe698.

EdkII build system supports OptionROM generation if particular PCI_*
defines are present in the module INF file:
```
[Defines]
  ...
  PCI_VENDOR_ID                  = <...>
  PCI_DEVICE_ID                  = <...>
  PCI_CLASS_CODE                 = <...>
  PCI_REVISION                   = <...>
```
Although after the commit d372ab585a2cdc5348af5f701c56c631235fe698
it is no longer possible.
The build system fails with the error:
```
Cyclic dependency detected while generating rule for
"<...>/DEBUG/<...>.efi" file
```
Revert d372ab585a2cdc5348af5f701c56c631235fe698 until the issue
is resolved.
---
 BaseTools/Conf/build_rule.template | 2 --
 1 file changed, 2 deletions(-)

diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index af4819de92..32053f6353 100755
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -342,8 +342,6 @@


     <OutputFile>

         $(OUTPUT_DIR)(+)$(MODULE_NAME).efi

-        $(DEBUG_DIR)(+)$(MODULE_NAME).efi

-        $(OUTPUT_DIR)(+)$(MODULE_NAME).map



     <Command.MSFT, Command.INTEL, Command.CLANGPDB>

         "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)

--
2.34.1