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

./miri run: directly run binary instead of using 'cargo run' #3881

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

RalfJung
Copy link
Member

This avoids re-building miri without dev dependencies, so it makes ./miri run a lot faster if ./miri test was already executed before.

@RalfJung
Copy link
Member Author

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 13, 2024

📌 Commit e2cae58 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Sep 13, 2024

⌛ Testing commit e2cae58 with merge 5190626...

bors added a commit that referenced this pull request Sep 13, 2024
./miri run: directly run binary instead of using 'cargo run'

This avoids re-building miri without dev dependencies, so it makes `./miri run` a lot faster if `./miri test` was already executed before.
@bors
Copy link
Collaborator

bors commented Sep 13, 2024

💔 Test failed - checks-actions

@RalfJung
Copy link
Member Author

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 13, 2024

📌 Commit 231cfd2 has been approved by RalfJung

It is now in the queue for this repository.

bors added a commit that referenced this pull request Sep 13, 2024
./miri run: directly run binary instead of using 'cargo run'

This avoids re-building miri without dev dependencies, so it makes `./miri run` a lot faster if `./miri test` was already executed before.
@bors
Copy link
Collaborator

bors commented Sep 13, 2024

⌛ Testing commit 231cfd2 with merge 6cab57f...

@bors
Copy link
Collaborator

bors commented Sep 13, 2024

💔 Test failed - checks-actions

@RalfJung
Copy link
Member Author

RalfJung commented Sep 13, 2024

Hm, it works everywhere except on Windows... but the file path seems right. The error code translates to 0xC0000135. Apparently this can mean STATUS_DLL_NOT_FOUND? Damn... we set -C link-args=-Wl,-rpath, which successfully prevents similar errors on Unix. What can we do on Windows if we don't want to use cargo run to run this binary? Cargo (or rustup) must be setting some env var to make this work, we probably have to replicate that.

Cc @ChrisDenton any idea what could help here? :)

@RalfJung
Copy link
Member Author

Maybe using rustup run suffices...
@bors r+

@bors
Copy link
Collaborator

bors commented Sep 13, 2024

📌 Commit 1e651d7 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Sep 13, 2024

⌛ Testing commit 1e651d7 with merge 1ee73b6...

bors added a commit that referenced this pull request Sep 13, 2024
./miri run: directly run binary instead of using 'cargo run'

This avoids re-building miri without dev dependencies, so it makes `./miri run` a lot faster if `./miri test` was already executed before.
@bors
Copy link
Collaborator

bors commented Sep 13, 2024

💔 Test failed - checks-actions

@RalfJung
Copy link
Member Author

Nope, unfortunately this does not help. :(

@RalfJung
Copy link
Member Author

The only other idea I have is to keep using cargo run on Windows, and if a Windows dev is sufficiently annoyed by the waiting time this incurs then they can figure out how to fix this 🤷

@ChrisDenton
Copy link
Member

A DLL's directory has to be in PATH for it to be found or else be in the same directory as the exe.

(Well there are also other options but they're more complicated)

@RalfJung
Copy link
Member Author

So probably we have to add toolchains/miri/lib/rustlib/x86_64-unknown-linux-gnu/lib to the PATH so that it can find librustc_driver and libLLVM.

@RalfJung
Copy link
Member Author

Let's see...
@bors r+

@bors
Copy link
Collaborator

bors commented Sep 13, 2024

📌 Commit b6b8e29 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Sep 13, 2024

⌛ Testing commit b6b8e29 with merge f55c670...

@bors
Copy link
Collaborator

bors commented Sep 13, 2024

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing f55c670 to master...

@bors bors merged commit f55c670 into rust-lang:master Sep 13, 2024
8 checks passed
@bors bors mentioned this pull request Sep 13, 2024
@RalfJung RalfJung deleted the miri-run branch September 14, 2024 07:01
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.

3 participants