Skip to content

Directly invoke the main function in JIT mode #1151

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

Closed
bjorn3 opened this issue Mar 16, 2021 · 0 comments
Closed

Directly invoke the main function in JIT mode #1151

bjorn3 opened this issue Mar 16, 2021 · 0 comments
Labels
A-jit Area: JIT compilation C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@bjorn3
Copy link
Member

bjorn3 commented Mar 16, 2021

#[lang = "start"] should be skipped in JIT mode. It does a lot of setup that has already be done by the compiler's libstd. In fact trying to use the same libstd for the compiler and jitted program will panic as it tries to setup the thread info TLS twice.

Required for https://github.com/bjorn3/rustc_codegen_cranelift/issues/1134

@bjorn3 bjorn3 added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-jit Area: JIT compilation labels Mar 16, 2021
@bjorn3 bjorn3 closed this as completed in e86b954 Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-jit Area: JIT compilation C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

1 participant