Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions xmake/toolchains/gcc-15/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
includes(path.join(os.scriptdir(), "../gcc/xmake.lua"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This includes directive will execute the entire ../gcc/xmake.lua script. That script contains a call to toolchain_gcc() at the end, which defines a generic gcc toolchain. This means that every time this gcc-15 toolchain file is loaded, it will also define the generic gcc toolchain, which is likely an unintended side effect and can be inefficient.

This pattern seems to be inherent in the project's structure, but it's worth pointing out. A potential fix would involve refactoring gcc/xmake.lua to not call toolchain_gcc() when it's being included by other files. This would require changes outside of this PR. As it stands, this could be a source of subtle issues or performance problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is something I already noticed while working on #6899. I may consider addressing it in a separate PR, if my limited spare time allows.


toolchain_gcc("15")
Loading