-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
compiler_rt testing #7798
Comments
You need to use bin/crystal |
instead of .build/crystal |
@asterite I just rebuilt on master and I am still not seeing a raise. $ bin/crystal eval "puts 1_i64 * 1_i64"
Using compiled compiler at `.build/crystal'
1 |
Because multiplying two int64 is just an llmv primitive (I think mul), I don't see why compiler rt would be involved. |
Oh, it's with overflow. Did you try with -D preview_overflow? |
When building the compiler I am pretty sure the file is being loaded. |
You need to pass the flag when compiling any program, not just the compiler. I don't think bin crystal passes it. |
It seems like it still does not work how I would expect. $ bin/crystal eval "puts 1_i64 * 1_i64" -D preview_overflow -D compiler_rt
Using compiled compiler at `.build/crystal'
1 |
There could be many reasons:
|
I have tried compiling this on linux and I have been getting the same results. I am curious I have not used |
AFAIK I.e. it's just a convenience to implement some features that would be otherwise broken on some targets. It's not used unless it really has to. |
@ysbaddaden is right. The |
I have been trying to test the compiler_rt flag and am a bit confused. It seems like the file is being loaded and the functions are not being used.
I have put a
raise "testing"
inside the__mulodi4
rt function.https://github.com/crystal-lang/crystal/blob/master/src/crystal/compiler_rt.cr#L4
After building crystal and running
.build/crystal eval "puts 1_i64 * 1_i64"
I would expect crystal to raise "testing" and it does not.I have checked the build output and the "compiler_rt" flag is being passed.
also if I put a
raise
in the file itself after the compile check and it seems like the file is being loaded.Am I missing something?
The text was updated successfully, but these errors were encountered: