- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 4
 
          feat: add riscv64gc-unknown-linux-gnu target
          #30
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
621f131    to
    9d245b5      
    Compare
  
    | 
           Hi! @Brooooooklyn Sorry to bother you, I just followed a new created  Errors like --- stderr
  CMake Error at /usr/local/share/cmake-3.31/Modules/CMakeTestCCompiler.cmake:67 (message):
    The C compiler
      "/usr/bin/clang"
    is not able to compile a simple test program.
    It fails with the following output:
      Change Dir: '/home/runner/work/rspack-resolver/rspack-resolver/target/s390x-unknown-linux-gnu/release/build/libmimalloc-sys2-57a6624d8e4f1f38/out/build/CMakeFiles/CMakeScratch/TryCompile-yRe3rg'
      
      Run Build Command(s): /usr/local/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_c0cf6/fast
      /usr/bin/gmake  -f CMakeFiles/cmTC_c0cf6.dir/build.make CMakeFiles/cmTC_c0cf6.dir/build
      gmake[1]: Entering directory '/home/runner/work/rspack-resolver/rspack-resolver/target/s390x-unknown-linux-gnu/release/build/libmimalloc-sys2-57a6624d8e4f1f38/out/build/CMakeFiles/CMakeScratch/TryCompile-yRe3rg'
      Building C object CMakeFiles/cmTC_c0cf6.dir/testCCompiler.c.o
      /usr/bin/clang   -ffunction-sections -fdata-sections -fPIC --target=s390x-unknown-linux-gnu  -MD -MT CMakeFiles/cmTC_c0cf6.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_c0cf6.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_c0cf6.dir/testCCompiler.c.o -c /home/runner/work/rspack-resolver/rspack-resolver/target/s390x-unknown-linux-gnu/release/build/libmimalloc-sys2-57a6624d8e4f1f38/out/build/CMakeFiles/CMakeScratch/TryCompile-yRe3rg/testCCompiler.c
      Linking C executable cmTC_c0cf6
      /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c0cf6.dir/link.txt --verbose=1
      /usr/bin/ld: unrecognised emulation mode: elf64_s390
      Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386pep i386pe
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      /usr/bin/clang  -ffunction-sections -fdata-sections -fPIC --target=s390x-unknown-linux-gnu  CMakeFiles/cmTC_c0cf6.dir/testCCompiler.c.o -o cmTC_c0cf6
      gmake[1]: *** [CMakeFiles/cmTC_c0cf6.dir/build.make:103: cmTC_c0cf6] Error 1
      gmake[1]: Leaving directory '/home/runner/work/rspack-resolver/rspack-resolver/target/s390x-unknown-linux-gnu/release/build/libmimalloc-sys2-57a6624d8e4f1f38/out/build/CMakeFiles/CMakeScratch/TryCompile-yRe3rg'
      gmake: *** [Makefile:134: cmTC_c0cf6/fast] Error 2Are you familiar with this part?  | 
    
2013b5a    to
    45e4c37      
    Compare
  
    14e1e02    to
    ad65e6d      
    Compare
  
    7c74ca1    to
    5cd9ced      
    Compare
  
    82b50cf    to
    6bef961      
    Compare
  
    riscv64gc-unknown-linux-gnu target
      53184c8    to
    01b24dd      
    Compare
  
    f560021    to
    e953271      
    Compare
  
    
          
WalkthroughThe changes update the GitHub Actions workflow and npm configuration. In the workflow file, a new pull request trigger is introduced (set to null), the package URL has been updated, the conditional check for build jobs is disabled (making them run unconditionally), and a conditional "Setup toolchain" step is added. Additionally, support for the RISC-V architecture ( Changes
 Sequence Diagram(s)sequenceDiagram
    participant GitHub as GitHub Events
    participant Workflow as Release Workflow
    participant Setup as Setup Toolchain
    participant Build as Build Jobs
    participant Publish as Publish Job
    GitHub->>Workflow: Trigger event (push)
    Note right of Workflow: Process starts
    Workflow->>Setup: Evaluate matrix.setup condition
    Setup-->>Workflow: Execute toolchain setup (if true)
    Workflow->>Build: Execute build & build-freebsd jobs unconditionally
    alt Version Changed
       Workflow->>Publish: Execute publish job (version check passed)
    else No Version Change
       Workflow-->>Publish: Skip publish job
    end
    Poem
 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
 🚧 Files skipped from review as they are similar to previous changes (2)
 🪧 TipsChatThere are 3 ways to chat with CodeRabbit: 
 Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
 Other keywords and placeholders
 CodeRabbit Configuration File (
 | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
npm/package.json (1)
42-42: New RISC-V Target Addition:
The addition of the"riscv64gc-unknown-linux-gnu"entry in thenapi.targetsarray correctly expands support for the RISC-V architecture. Please ensure that any related documentation and toolchain configuration (e.g., build scripts and CI steps) are updated accordingly..github/workflows/release-napi.yml (1)
130-134: Conditional Toolchain Setup Step:
The new "Setup toolchain" step leverages thematrix.setupfield, which is provided for targets that require extra configuration (such as the RISC-V target). Ensure that this conditional is robust and that matrix entries not requiring additional toolchain setup do not inadvertently execute this step.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/release-napi.yml(7 hunks)npm/package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Package aarch64-unknown-linux-musl
 - GitHub Check: Package aarch64-pc-windows-msvc
 - GitHub Check: Package i686-pc-windows-msvc
 - GitHub Check: Package x86_64-pc-windows-msvc
 
🔇 Additional comments (4)
.github/workflows/release-napi.yml (4)
10-10: Disabled Pull Request Trigger:
The workflow now setspull_request: null, which means pull request events will not trigger this workflow. Confirm that this change is intentional and aligned with your CI strategy.
36-38: Version Check URL Update:
TheCheck versionstep now usesfile-url: https://unpkg.com/unrs-resolver@latest/package.jsonfor version comparison. Please verify that this URL reliably returns the expected package metadata for accurate version detection.
48-48: Unconditional Build Job:
The conditional check (if: needs.check.outputs.version_changed == 'true') for the build job has been commented out, making the build run on every push. Double-check that this behavior is intended and that it fits your release strategy.
81-89: RISC-V Build Matrix Update:
A new matrix entry forriscv64gc-unknown-linux-gnuhas been added with specific setup and build steps. Please confirm that:
- Installing
 gcc-riscv64-linux-gnuviaapt-getis the correct approach for your toolchain.- The Rust target addition (
 rustup target add riscv64gc-unknown-linux-gnu) and subsequent build command (pnpm build --use-napi-cross) are sufficient for compiling on this architecture.
Consider incorporating error handling or logging in case any installation steps fail.
          
 | 
    



Summary by CodeRabbit
New Features
Chores