-
Notifications
You must be signed in to change notification settings - Fork 102
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
Fix CG_CLIF_JIT_ARGS on Linux, macOS and Windows #1048
Comments
The same problem seems to exist on macOS and Windows. On macOS libstd uses |
Hrm, can you explain this issue in more detail? |
When in JIT mode, the CG_CLIF_JIT_ARGS env var is used to specify which arguments to pass to the main function of the jitted program. On most targets this will be reflected in the |
Ah, thank you! Yes, it will result in slightly bigger programs, but I think it is fine. The test case then would be running rustc with the cranelift backend enabled and |
Correct, that would be how to test it. |
So, it turns out a couple of years ago in e86b954 I changed the jit code to intentionally skip over the libstd start function to fix #1151. I pushed a couple of fixes in c41a7db...4d6ac05, but have kept skipping the libstd start function. In any case I can confirm it works now with glibc if I stop skipping the libstd start function. |
On Linux since 5c6bf83, the arguments passed to libstd by glibc when
dlopen
ing it are used, which are the arguments of the rustc process, not those inCG_CLIF_JIT_ARGS
.The text was updated successfully, but these errors were encountered: