Skip to content

Compile build dependencies using cg_clif instead of cg_llvm #905

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 Feb 25, 2020 · 4 comments · Fixed by #1068
Closed

Compile build dependencies using cg_clif instead of cg_llvm #905

bjorn3 opened this issue Feb 25, 2020 · 4 comments · Fixed by #1068
Labels
compile-time How fast is the code compiled

Comments

@bjorn3
Copy link
Member

bjorn3 commented Feb 25, 2020

This can be done by removing the --target argument in cargo.sh.

@bjorn3 bjorn3 added the compile-time How fast is the code compiled label Feb 25, 2020
@bjorn3 bjorn3 changed the title Build build dependencies using cg_clif instead of cg_llvm Compile build dependencies using cg_clif instead of cg_llvm Feb 25, 2020
@bjorn3
Copy link
Member Author

bjorn3 commented Mar 7, 2020

There is still an abi incompatibility for proc macro's.

@bjorn3
Copy link
Member Author

bjorn3 commented Apr 9, 2020

The __cxa_thread_atexit_impl symbol has a different linkage compared to cg_llvm.

@bjorn3
Copy link
Member Author

bjorn3 commented Apr 9, 2020

Patched the caller of __cxa_thread_atexit_impl. I am now stuck at Bridge::cached_buffer containing a wrong pointer.

@bjorn3
Copy link
Member Author

bjorn3 commented Apr 19, 2020

Bridge has #[repr(C)] and is too big to pass in two or less registers. This means that it is passed at the correct stack offset to the extern "C" fn Bridge::expand1::run. cg_clif however expects a pointer to Bridge to be passed. The correct behavior is unfortunately not yet supported by Cranelift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compile-time How fast is the code compiled
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant