Change:
Followup to and . Can we completely eliminate our usage of rpath? Doing so would make our linkage more consistent across platforms since it doesn't work on windows. Nominating.
I think that the largest difficulty for this is that we build dynamically, and this means that if you have a fresh install of rust in a new location it won't work by default (you'll have to munge your os library path). If we could print out some helpful instructions of what to do, then I think that would be a much better situation, but I'm also not entirely sure how we'd do that.
If we defaulted to static linking then there would it would be easier to justify making people use LDLIBRARYPATH when they opt in to dylibs.
The only consideration that I have about static linking is that you'll install 5 copies of (as opposed to 3): with static linking rustdoc rustc rustpkg without static linking That being said, our distributions are already pretty big, so maybe this isn't much of a concern? I agree though that if we statically linked everything then we could easily take this route of action
IMO this is a concern. What's wrong with the current approach (link rust's own tools dynamically)? It works fine on windows since the DLLs are in the bin folder and for everything else it will soon link statically ().
Another use case for this came up on IRC. If you've got a rust installed locally in , then when you try to recompile rust again, the rpath for all the stage0-produced libraries will have something pointing into /usr/local. Apparently on some platforms when you run the stage1 , this means that you'll pick up all the /usr/local libs at runtime instead of the stage0-produced libs (causing errors until you uninstall rustc).
Accepted for 1.0, P-backcompat-lang.
Rust now builds and passes tests with . This feature could be disabled by default or completely removed, with as a suggestion for those who want to use a dynamically linked in their home directory on *nix.

Discussion:
opt local-rust 0 "use an installed rustc rather than downloading a snapshot" opt inject-std-version 1 "inject the current compiler version of libstd into programs" opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM" <del> opt rpath 1 "build rpaths into rustc itself" </del> <ins> opt rpath 0 "build rpaths into rustc itself" </ins> opt nightly 0 "build nightly packages" opt verify-install 1 "verify installed binaries work" opt jemalloc 1 "build liballoc with jemalloc"

If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated throughout compilation in the output directory. .TP <del> fBno-rpathfR If specified, then the rpath value for dynamic libraries will not be set in </del> <ins> fBrpathfR If specified, then the rpath value for dynamic libraries will be set in </ins> either dynamic library or executable outputs. .TP fBno-prepopulate-passesfR

ifdef TRACE CFG_RUSTC_FLAGS += -Z trace endif <del> ifdef CFG_DISABLE_RPATH CFG_RUSTC_FLAGS += -C no-rpath </del> <ins> ifdef CFG_ENABLE_RPATH CFG_RUSTC_FLAGS += -C rpath </ins> endif # The executables crated during this compilation process have no need to include

if sess.targ_cfg.os == abi::OsMacos { cmd.args(["-dynamiclib", "-Wl,-dylib"]); <del> if !sess.opts.cg.no_rpath { </del> <ins> if sess.opts.cg.rpath { </ins> let mut v = Vec::from_slice("-Wl,-install_name,@rpath/".as_bytes()); v.push_all(out_filename.filename().unwrap()); cmd.arg(v.as_slice());

// FIXME (#2397): At some point we want to rpath our guesses as to // where extern libraries might live, based on the // addl_lib_search_paths <del> if !sess.opts.cg.no_rpath { </del> <ins> if sess.opts.cg.rpath { </ins> cmd.args(rpath::get_rpath_flags(sess, out_filename).as_slice()); }

"a list of arguments to pass to llvm (space separated)"), save_temps: bool = (false, parse_bool, "save all temporary output files during compilation"), <del> no_rpath: bool = (false, parse_bool, "disables setting the rpath in libs/exes"), </del> <ins> rpath: bool = (false, parse_bool, "set rpath values in libs/exes"), </ins> no_prepopulate_passes: bool = (false, parse_bool, "don't pre-populate the pass manager with a list of passes"), no_vectorize_loops: bool = (false, parse_bool,