-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
detect-targets: Add fallback to windows #650
Conversation
a4e39a7
to
8314cb3
Compare
The CI has failed silently on windows with no error message or whatever. The integration CI failed with exit code 127. |
Possibly to do with that API's requirement of windows build 22000. Maybe we can test for the build number and only call this if it's >=22000? |
Aha, so it panics instead of returning an error?
Edit: I've found |
And that would also means that we cannot test the fallback logic on GHA... |
@passcod I added a version check using |
hmm, |
c7b2381
to
f5b6bee
Compare
So basically it's giving out runtime link error because I thought about using something like |
Apparently the proper way to do this is to dynamically load |
@passcod Thanks, this makes me even more appreciate the separation of libc and syscalls in linux, meaning that for missing syscalls we would simply get a |
Might be simpler to try using delay-loading: fn main() {
println!("cargo:rustc-link-arg=/DELAYLOAD:Kernel32.dll");
println!("cargo:rustc-link-lib=static=delayimp");
} which if I'm reading some threads correctly means it should error normally (via result) at call time... |
welp, nevermind:
|
|
@passcod Thanks, I would use it to wrap |
@passcod I've fixed the code according to your advice, but we can't test the code on the GHA since it's still on windows 10. If you have a windows 11 build system with cargo installed, can you run the tests locally please? While I have a windows 11 laptop, it's up for sale so I can't install cargo on it. |
329d1a7
to
6c1f936
Compare
6c1f936
to
f13fa7d
Compare
@passcod If you are free and have access to a windows machine, can you test this PR please? |
It's been stale for a really long time. |
Going to do this today! |
Well it builds and the standard test suite runs. I wasn't able to run e2e-tests yet because windows is a poopy head. Will try more tomorrow. |
4a2895c
to
8bf07f7
Compare
This PR has been stale for quite long. |
Or maybe we can just drop it. |
Yeah, let's drop it. Someone who wants to get those can use --target manually, and we've had no feedback that this is a missing feature really. |
Just realize that I failed to extract the file and run it directly in file explorer preview like #1099 (comment), so I want to reopen this and reevaluate this. |
* Add new dep windows-sys v0.42.0 for win only * Add new dep windows-dll v0.4.1 for win only * Add x86_64 fallback targets for windows * Add x86 fallback targets for windows * Add arm32 fallback targets for windows * Add arm64 fallback targets for windows * Add gnu/gnu-llvm fallback targets for windows Signed-off-by: Jiahao XU <[email protected]>
8bf07f7
to
6b34a7c
Compare
I successfully run this on my aarch64 windows VM. It checks for target:
It's working as intended and given that the CI also passes, so I guess this is mostly ok-ish. |
Yeah let's give it a go. Best test is to put it in front of people, we can always revert if some windows user finds an edge case. |
Fixed #642
Signed-off-by: Jiahao XU [email protected]