Skip to content

Conversation

@gennaroprota
Copy link
Collaborator

I left the code as is, but we shouldn't hard-code directory names like that.

@gennaroprota gennaroprota force-pushed the fix_stdlib_includes_for_clang_22 branch from 7f32108 to fc62a91 Compare August 25, 2025 15:27
@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://976.mrdocs.prtest2.cppalliance.org/index.html

@alandefreitas
Copy link
Collaborator

but we shouldn't hard-code directory names like that

Exactly. Let's fix the underlying problem. Something like:

    parent = os.path.join(llvm_install_dir, "lib", "clang")
    dirs = [d for d in os.listdir(parent) if os.path.isdir(os.path.join(parent, d))]
    numeric_dirs = [d for d in dirs if d.isdigit()]
    if not numeric_dirs:
        raise RuntimeError(f"No numeric directories found in {parent}")
    clang_dir_num = max(numeric_dirs, key=lambda d: int(d))

@gennaroprota gennaroprota force-pushed the fix_stdlib_includes_for_clang_22 branch from fc62a91 to fa767ef Compare August 26, 2025 16:55
@gennaroprota gennaroprota changed the title fix: bootstrap uses --stdlib-includes for Clang 22, not 20 fix: bootstrap uses the directory of the latest includes available under llvm_install_dir for stdlib-includes Aug 26, 2025
Use the directory of the latest includes available under
`llvm_install_dir`, instead.
@gennaroprota gennaroprota force-pushed the fix_stdlib_includes_for_clang_22 branch from fa767ef to 1aa3ecb Compare August 26, 2025 17:00
@gennaroprota gennaroprota changed the title fix: bootstrap uses the directory of the latest includes available under llvm_install_dir for stdlib-includes fix: bootstrap uses the directory of the latest includes available under llvm_install_dir for --stdlib-includes Aug 26, 2025
@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://976.mrdocs.prtest2.cppalliance.org/index.html

@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://976.mrdocs.prtest2.cppalliance.org/index.html

@alandefreitas alandefreitas merged commit f936346 into cppalliance:develop Aug 27, 2025
22 checks passed
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.

3 participants