Skip to content
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

Install creusot-rustc in a toolchain-dependent location #1314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Lysxia
Copy link
Collaborator

@Lysxia Lysxia commented Jan 14, 2025

Fixes #671.

Problem: creusot-rustc is dynamically linked with rustc_driver, so it can't be run
directly from the command line because it can't find its dependencies alone.

Solution: Putting it in a special directory controlled by Creusot:

  1. removes it from $PATH, suppressing the temptation to run it from the command line
  2. allows cargo-creusot to detect incomplete upgrades (this prevents
    an obscure dynlink error if one updates the toolchain that creusot depends
    on and only reinstalls one of cargo-creusot or creusot-rustc).

The installation of creusot-rustc is now handled by cargo creusot setup install.

Problem: creusot-rustc is dynamically linked with rustc_driver, so it can't be run
directly from the command line because it can't find its dependencies alone.

Solution: Putting it in a special directory controlled by Creusot:
1. removes it from $PATH, suppressing the temptation to run it from the command line
2. allows cargo-creusot to detect incomplete upgrades (this prevents
   an obscure dynlink error if one updates the toolchain that creusot depends
   on and only reinstalls one of cargo-creusot or creusot-rustc).

The installation of creusot-rustc is now handled by `cargo creusot setup install`.
@Lysxia Lysxia force-pushed the install-creusot-rustc branch from e290461 to 5982b9d Compare January 14, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate reporting a nicer error when failing to dynamically link rustc_driver
1 participant