Skip to content

Improve binutils to support wasm#7312

Merged
waruqi merged 8 commits intodevfrom
binutils
Feb 12, 2026
Merged

Improve binutils to support wasm#7312
waruqi merged 8 commits intodevfrom
binutils

Conversation

@waruqi
Copy link
Member

@waruqi waruqi commented Feb 11, 2026

@waruqi waruqi added this to the v3.0.8 milestone Feb 11, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @waruqi, 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 enhances the binutils module by introducing support for WebAssembly (WASM) binaries. It enables the system to correctly identify WASM files, streamlines error messages for better readability, and includes new test cases to ensure the robust detection and processing of WASM formats.

Highlights

  • WASM Format Support: Defined XM_BINUTILS_FORMAT_WASM and added a case for it in deplibs.c to acknowledge WebAssembly binaries.
  • WASM Detection Logic: Implemented xm_binutils_format_is_wasm and integrated it into xm_binutils_format_detect to correctly recognize WASM binaries based on their magic numbers.
  • Error Message Simplification: Removed the "deplibs:" prefix from error messages in deplibs.c for cleaner and more concise output.
  • New Test Cases: Introduced tests in test.lua to verify WASM format detection and deplibs functionality for WASM files, ensuring proper integration.
  • Code Cleanup: Removed a redundant commented-out line in binutils.lua to improve code clarity.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • core/src/xmake/binutils/deplibs.c
    • Error message prefixes were removed.
    • A new case for WASM format was added.
  • core/src/xmake/binutils/format.c
    • A new inline function xm_binutils_format_is_wasm was added.
    • The xm_binutils_format_detect function was updated to include WASM format detection.
    • The xm_binutils_format function was updated to return "wasm" for the new format.
  • core/src/xmake/binutils/prefix.h
    • The XM_BINUTILS_FORMAT_WASM constant was defined.
  • tests/modules/binutils/test.lua
    • New test cases were added to verify WASM format detection.
    • New test cases were added for deplibs functionality for WASM files.
  • xmake/core/sandbox/modules/import/core/base/binutils.lua
    • A commented-out line related to rpath insertion was removed.
Activity
  • No specific activity (comments, reviews, progress updates) has been recorded for this pull request beyond its initial creation.
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 introduces support for WebAssembly (Wasm) binaries within the project's binutils. The changes correctly implement Wasm format detection and ensure that dependency scanning (deplibs) on Wasm files returns an empty list, which is appropriate for this stage. The code modifications are logical and include corresponding tests. However, the new test function for deplibs is causing a CI failure, which needs to be addressed. I have provided a specific comment with a suggestion to resolve this critical issue.

@waruqi waruqi merged commit 9d084db into dev Feb 12, 2026
71 of 72 checks passed
@waruqi waruqi deleted the binutils branch February 12, 2026 02:09
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