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

Figure out what we're going to do instead of rpath on windows #1011

Closed
brson opened this issue Oct 7, 2011 · 8 comments
Closed

Figure out what we're going to do instead of rpath on windows #1011

brson opened this issue Oct 7, 2011 · 8 comments
Assignees
Labels
O-windows Operating system: Windows

Comments

@brson
Copy link
Contributor

brson commented Oct 7, 2011

When we install rust on windows the files are arranged in such a way that rustc can't be run because the dll's aren't found. We need to either adjust the directory structure specifically for windows, make some sort of 'rust shell' batch file that sets up the environment and runs cmd.exe, extend the system path to the appropriate directory, something.

@graydon
Copy link
Contributor

graydon commented Nov 29, 2011

The "standard" thing to do on win32 is to put all the .dll files a particular .exe depends on in the same directory as the .exe. That directory is automatically searched when resolving .dlls.

We can do this in the makefile by a post-build step that moves from $host/lib to $host/bin, or else in the nsis installer logic. Doesn't really matter, but my feeling is the former is a bit better since it means we can stop twiddling $PATH altogether on the windows command lines. Easier for devs to invoke rustc in their working directory.

@jckarter
Copy link

@brson
Copy link
Contributor Author

brson commented Nov 30, 2011

The makefile should be suitably abstracted at this point that we can just build with a completely different directory structure on windows.

But putting rustc's dependencies together only solves part of the problem, in that any other rustc-generated binaries still won't find their dependencies, possibly including our own tests.

@brson
Copy link
Contributor Author

brson commented Nov 30, 2011

It looks like SetDllDirectory plus delay loading might actually be able to simulate rpath.

@ghost ghost assigned brson Jan 10, 2012
@brson
Copy link
Contributor Author

brson commented Jan 10, 2012

AFAICT the mingw toolchain doesn't support delay loading - it is a feature of the visual studio linker.

@brson
Copy link
Contributor Author

brson commented Jan 10, 2012

I'm going to look into putting the libs and bins into the same directory, and adding it to the system path.

@brson
Copy link
Contributor Author

brson commented Jan 14, 2012

9e40e43 builds the libraries in the bin directory on win32

@brson
Copy link
Contributor Author

brson commented Jan 17, 2012

OK, I've accomplished what I said I would. The windows experience still isn't very satisfying, but I'm considering this done.

@brson brson closed this as completed Jan 17, 2012
alexcrichton added a commit to alexcrichton/rust that referenced this issue Mar 31, 2015
This commit is an implementation of [RFC rust-lang#1011][rfc] which adds an `exit`
function to the standard library for immediately terminating the current process
with a specified exit code.

[rfc]: rust-lang/rfcs#1011
alexcrichton added a commit to alexcrichton/rust that referenced this issue Mar 31, 2015
This commit is an implementation of [RFC rust-lang#1011][rfc] which adds an `exit`
function to the standard library for immediately terminating the current process
with a specified exit code.

[rfc]: rust-lang/rfcs#1011

Closes rust-lang#23914
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* Simplify intrinsic activity

* Add to list
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
* Use dynamic allocation for non-deterministic slices

* Rename NonDetSlice to AnySlice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

3 participants