Skip to content

Fix meta-modules preferred compiler bug - #2084

Open
eap wants to merge 1 commit into
JCSDA:developfrom
eap:bugfix/preferred-compiler
Open

Fix meta-modules preferred compiler bug#2084
eap wants to merge 1 commit into
JCSDA:developfrom
eap:bugfix/preferred-compiler

Conversation

@eap

@eap eap commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

The motivation for this PR comes from the the function custom_sort_key which was broken, leading to some bugs when generating meta-modules with compilers that were dependent on the preferred compiler.

When sorting, Spec.__contains__, checks the dependency tree of a spec, since llvm was built with gcc it got the same sort order as gcc in the list.

Other fixes

The for compiler in compilers loop had a whole bunch of meta-module logic that only applied to the preferred compiler, this was gated with a "continue" clause. I just dropped that clause and moved everything into the function context. That saved some variable scope bookkeeping and (along with the sort fixes) guarantees that it runs every time.

@eap
eap requested a review from climbfuji August 13, 2026 21:08
@eap eap changed the title Fix preferred compiler bug Fix meta-modules preferred compiler bug Aug 13, 2026
@eap
eap marked this pull request as ready for review August 13, 2026 21:12
Comment on lines -378 to -379
if not compiler.name in preferred_compiler:
continue

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ditched this clause and dedented everything from here to number_of_meta_modules_written += 1

@climbfuji

Copy link
Copy Markdown
Collaborator

Thanks for this cleanup. I'll need to give this a thorough test on a few systems.

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.

2 participants