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

Experiment using clang-cl with MSVC #3882

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ekrich
Copy link
Member

@ekrich ekrich commented Apr 17, 2024

This just hacks the tools but could be a configuration when having a target triple env of msvc.

@ekrich
Copy link
Member Author

ekrich commented Apr 17, 2024

See https://clang.llvm.org/docs/UsersManual.html#clang-cl

Also see This #3076

I tried hacking the build to compile using clang-cl which seems to be recommended for MSVC but I end up with the following. See PR branch #3882

[info] Dumping intermediate code (lowered) (1159 ms)
[error] C:/Users/<user>/workspace/scala-native/sandbox/.2.13/target/scala-2.13/native/dependencies/nativelib_native0.5.0-SNAPSHOT_2.13-0.5.0-SNAPSHOT-0/scala-native/eh.cpp(19,37): error: cannot use 'throw' with exceptions disabled        
[error]    19 | void scalanative_throw(void *obj) { throw scalanative::ExceptionWrapper(obj); }
[error]       |                                     ^
[error] 1 error generated.
[info] Produced 40 LLVM IR files
[info] Generating intermediate code (with debug metadata) (225945 ms)
[info] Compiling to native code (205032 ms)
[info] Total (245084 ms)

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.

None yet

1 participant