Skip to content

fix(modules) add all supported platforms for clang get_cpp_library_name#6992

Merged
waruqi merged 1 commit intoxmake-io:devfrom
Arthapz:add-missing-platforms
Nov 6, 2025
Merged

fix(modules) add all supported platforms for clang get_cpp_library_name#6992
waruqi merged 1 commit intoxmake-io:devfrom
Arthapz:add-missing-platforms

Conversation

@Arthapz
Copy link
Member

@Arthapz Arthapz commented Nov 4, 2025

fixes #6990

@Arthapz Arthapz mentioned this pull request Nov 4, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Arthapz, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the C++ module support by extending the platform and runtime detection capabilities within the get_cpplibrary_name function. It addresses an issue where certain platforms and C++ standard library implementations were not correctly identified, ensuring broader compatibility and more accurate build configurations for C++ projects using modules.

Highlights

  • Expanded C++ Library Detection: The get_cpplibrary_name function now supports a wider range of platforms and C++ runtimes, including Android NDK versions, various Apple platforms (watchOS, applexros), BSD, HarmonyOS, Cygwin, MSYS, and Haiku.
  • Improved Runtime Checks: Added gnustl_static, gnustl_shared, stlport_static, and stlport_shared to the runtime detection logic, enhancing compatibility with different C++ standard library implementations.
  • Code Style Refinement: Standardized the use of single quotes for string literals across the file and applied minor code condensation for improved readability and consistency.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request expands platform support for determining the C++ standard library in get_cpplibrary_name. It adds detection for more runtimes and platforms like Android, BSD, HarmonyOS, etc. The changes are mostly correct, but there is a critical issue in the Android platform detection logic where undeclared variables plat and arch are used, which will cause a runtime error. I've provided a suggestion to fix this. The rest of the changes are mostly stylistic, like standardizing on single quotes for strings.

@Arthapz Arthapz force-pushed the add-missing-platforms branch from b024a42 to 7b931b6 Compare November 4, 2025 09:26
@Arthapz Arthapz changed the title (modules) add all supported platforms for clang get_cpp_library_name fix(modules) add all supported platforms for clang get_cpp_library_name Nov 4, 2025
@Arthapz Arthapz force-pushed the add-missing-platforms branch from 7b931b6 to 620a612 Compare November 4, 2025 11:40
@Arthapz Arthapz force-pushed the add-missing-platforms branch from 620a612 to 49c663b Compare November 5, 2025 11:03
@Arthapz Arthapz force-pushed the add-missing-platforms branch from 49c663b to 73b7395 Compare November 5, 2025 11:13
@waruqi waruqi merged commit 12f9fb3 into xmake-io:dev Nov 6, 2025
24 of 32 checks passed
@waruqi waruqi added this to the v3.0.5 milestone Nov 6, 2025
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.

Crash in get_stdmodules

3 participants