Skip to content
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

Add windows gnu target #2026

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Add windows gnu target #2026

wants to merge 6 commits into from

Conversation

Kreijstal
Copy link

Good day,

I am not well acquainted with this project or rust or node api, but there has been this bug that has been bugging me for a while, when using napi-rs, I put msvc target on its own category, since it is different from clang or gcc, and added static linking for windows, I added a build.rs script for napi, so that you can cargo test on the repository. Additionally I added dynamical symbol loading for gnu targets as well, so you can either choose to static or dynamic load, since I do not have msvc, I can not test how this works for msvc, but since I did not change its path, it should work as it has worked before. I noticed some people have the same issue and someone even came with a patch!/Workaround!

Fixes #2001
Fixes #1893

related #1480 (comment) (patch came from this thread)

Please review

@Kreijstal
Copy link
Author

and the dependencies might have to be updated as well, because this is self hosting

➤ YN0009: │ nx@npm:18.0.6 [fa6ee] couldn't be built successfully (exit code 3765269347, logs can be found here: C:
\msys2\2023-01-27\tmp\xfs-2c598937\build.log)
# This file contains the result of Yarn building a package (nx@virtual:fa6eeaa7c9f4e1db0f350601993a6029e8bb72c06889f8cfb84b0d52baf2222c364ee2e33fef459cbbe21959a676ab0d1a5b88ec4e42655dd590db72a28ac7fe#npm:18.0.6)
# Script name: postinstall

thread '<unnamed>' panicked at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\napi-sys-2.2.3\src\functions.rs:7:3:
Must load N-API bindings
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@Kreijstal
Copy link
Author

Ah, I see the failing tests, Ill work on that

@Kreijstal Kreijstal force-pushed the msys2mingw branch 7 times, most recently from 65b5336 to eede4d6 Compare April 11, 2024 14:35
@Kreijstal
Copy link
Author

Kreijstal commented Apr 11, 2024

I understand, msvc is not a configuration but target_env="msvc" is. To test this under windows-gnu you need the gnu version of node, tell me if this is required

@Brooooooklyn
Copy link
Sponsor Member

@Kreijstal can you add a Windows gnu CI to test the platform?

this adds clang64 compiler to the test suite
@Kreijstal Kreijstal mentioned this pull request Apr 21, 2024
@Kreijstal
Copy link
Author

@Kreijstal can you add a Windows gnu CI to test the platform?

I added test that tell you that it compiles at least with rust, in the msys2 platform however the tests will fail since they can't install rollup, for the reason that this pull request is precisely trying to fix.

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.

Support x86_64-pc-windows-gnu toolchain ? Crash in msys2 environment
2 participants