-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
[Feature request]: Support *-pc-windows-gnullvm targets #551
Comments
Please also note #546 and my comments there.
The command corrosion runs has an additional
Could you rerun this command with the
Are these libraries also required for a minimal hello world example? |
Thanks for the prompt answer!
Clang and CMake use
I have never tried.
Sorry, I don't know what you're talking about 😅. I've seen in the PR IMPLIB has been set to empty for the gnullvm target.
Yeah, sorry, I somehow missed that!
IIRC, they were needed by something like Thanks again for your answer! |
I setup a new project. diff --git a/cmake/Corrosion.cmake b/cmake/Corrosion.cmake
index 3ad5bc1..f5132ea 100644
--- a/cmake/Corrosion.cmake
+++ b/cmake/Corrosion.cmake
@@ -355,7 +355,7 @@ function(_corrosion_add_library_target)
set(is_windows TRUE)
if(Rust_CARGO_TARGET_ENV STREQUAL "msvc")
set(is_windows_msvc TRUE)
- elseif(Rust_CARGO_TARGET_ENV STREQUAL "gnu")
+ elseif(Rust_CARGO_TARGET_ENV STREQUAL "gnu" OR Rust_CARGO_TARGET_ENV STREQUAL "gnullvm")
set(is_windows_gnu TRUE)
endif()
elseif(Rust_CARGO_TARGET_OS STREQUAL "darwin") At that point, Corrosion found the needed libraries correctly:
As for the implib, Cmake generates indeed a
And Corrosion doesn't find the implib:
Copying to the directory it expects resolved the problem. |
Thanks a lot for testing. I believe probably cargo needs a patch to copy the implib to the same location (as I don't want to start digging into the |
Makes sense.
Great, and it's already been |
I have a draft PR which adds If someone has time to investigate, or knows what additional setup might be needed, I'd be glad for any comments. |
Fixed in #553 |
Hi!
Thanks for this project, it's very nice.
I tried it with the
x86_64-pc-windows-gnullvm
target, which is very similar tox86_64-pc-windows-gnu
but uses only LLVM tools.It worked almost out of the box, but I had to change this line in
Corrosion.cmake
:(I had to add the
OR Rust_CARGO_TARGET_ENV STREQUAL "gnullvm"
part).In addition to that, I had to manually pass these variables to cmake:
I would be happy to open a PR to support it officially, if this could be helpful to someone else, but I don't know where the initial value of the native libraries is set (for me it was
gcc_s;util;rt;pthread;m;dl;c
, which matches my host libraries, but I'm cross compiling).If I understand correctly, this command is run in
corrosion/required_libs
, but it fails for me:Also, I'd need some help for writing any needed tests.
The text was updated successfully, but these errors were encountered: