Skip to content

Cargo subcommand instead of shell scripts #971

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
l4l opened this issue Apr 18, 2020 · 4 comments
Closed

Cargo subcommand instead of shell scripts #971

l4l opened this issue Apr 18, 2020 · 4 comments
Assignees
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@l4l
Copy link
Contributor

l4l commented Apr 18, 2020

TLDR: it would be nice to have something like cargo cl-codegen build and similar.

For now i think it is quite clumsy to specify magic env-var(s) and running magic shell scripts by their full paths. Though, these shell scripts might be quite handy for development, they are not really convenient for usage (and probably for maintaining).

Perhaps it would be much easier to use cranelift codegen via single binary, that can be configured once with persistent file. I am not really sure about all of nitty-gritty details, but probably it can be handled with cargo sub-command with additional config file (e.g. for target, librustc_codegen_cranelift.so path, path for sysroot, etc). Do I miss something important and what do you think about that?

@bjorn3 bjorn3 added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Apr 18, 2020
@CohenArthur
Copy link
Contributor

I'd love to work on this, if it is available

@bjorn3
Copy link
Member

bjorn3 commented Oct 12, 2020

Go ahead. Since https://github.com/bjorn3/rustc_codegen_cranelift/pull/1089 the shell scripts have been simplified a bit, so implementing this takes less work.

@bjorn3
Copy link
Member

bjorn3 commented Nov 8, 2020

As of https://github.com/bjorn3/rustc_codegen_cranelift/pull/1104 the build directory now contains everything cg_clif needs to run. There still isn't a cargo subcommand yet though, but you can copy the build dir somewhere and add cargo.sh to your path. (optionally renaming it to something else)

@bjorn3
Copy link
Member

bjorn3 commented Dec 29, 2021

This should now be a matter of renaming the produced cargo executable to cargo-clif. If you then add the build dir to your path you will be able to do cargo clif build. Going to rename it tomorrow.

@bjorn3 bjorn3 assigned bjorn3 and unassigned CohenArthur Dec 29, 2021
@bjorn3 bjorn3 closed this as completed in 0dd3d28 Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

3 participants