Skip to content

Conversation

@lubosz
Copy link

@lubosz lubosz commented Oct 3, 2025

Problem solved by the commit

This resolves an issue of the isa.h header being unintendedly regenerated when invoking the build a second time using the Ninja generator.

This resulted in a broken build due to isa_disassembler being undefined in the regenerated header.

Due to differences in CMake generators regarding to BYPRODUCS, the issue was not reproducible using the Unix Makefile generator

https://cmake.org/cmake/help/latest/command/add_custom_target.html

In general BYPRODUCTS is not intended to overwrite version controlled source files.

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

This patch addresses the symptom of issue #144.

How problem was solved, alternative solutions (if any) and why they were rejected

Don't specify version controlled header as BYPRODUCTS.
A proper solution would be either not regenerating this header by the build system but by manually invoking the Python script and committing the result or not having the generated header in version control in case a regeneration is needed for every build. The current expected behavior did not require a regeneration for every build though.

More details can be found in #144.

Risks (if any) associated the changes in the commit

What has been tested and how, request additional testing if necessary

Documentation impact (if any)

This resolves an issue of the isa.h header being incorrectly regenerated
when invoking the build a second time using the Ninja generator.

This resulted in a broken build due to isa_disassembler being
undefined in the regenerated header.

Due to differences in CMake generators regarding to BYPRODUCS,
the issue was not reproducible using the Unix Makefile generator

https://cmake.org/cmake/help/latest/command/add_custom_target.html

In general BYPRODUCTS is not intended to overwrite version controlled
source files.

This fixes issue Xilinx#144.
@lubosz
Copy link
Author

lubosz commented Nov 24, 2025

This is still relevant even though #148 is merged.
The header is still being unnecessarily regenerated when building with Ninja.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant