Skip to content

rustc: Disable rpath settings by default #14832

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

Merged
merged 1 commit into from
Jul 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
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"
opt rpath 1 "build rpaths into rustc itself"
opt rpath 0 "build rpaths into rustc itself"
opt nightly 0 "build nightly packages"
opt verify-install 1 "verify installed binaries work"
opt jemalloc 1 "build liballoc with jemalloc"
Expand Down
4 changes: 2 additions & 2 deletions man/rustc.1
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ A space-separated list of arguments to pass through to LLVM.
If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
throughout compilation in the output directory.
.TP
\fBno-rpath\fR
If specified, then the rpath value for dynamic libraries will not be set in
\fBrpath\fR
If specified, then the rpath value for dynamic libraries will be set in
either dynamic library or executable outputs.
.TP
\fBno-prepopulate-passes\fR
Expand Down
4 changes: 2 additions & 2 deletions mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ endif
ifdef TRACE
CFG_RUSTC_FLAGS += -Z trace
endif
ifdef CFG_DISABLE_RPATH
CFG_RUSTC_FLAGS += -C no-rpath
ifdef CFG_ENABLE_RPATH
CFG_RUSTC_FLAGS += -C rpath
endif

# The executables crated during this compilation process have no need to include
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ fn link_args(cmd: &mut Command,
if sess.targ_cfg.os == abi::OsMacos {
cmd.args(["-dynamiclib", "-Wl,-dylib"]);

if !sess.opts.cg.no_rpath {
if sess.opts.cg.rpath {
let mut v = Vec::from_slice("-Wl,-install_name,@rpath/".as_bytes());
v.push_all(out_filename.filename().unwrap());
cmd.arg(v.as_slice());
Expand All @@ -1346,7 +1346,7 @@ fn link_args(cmd: &mut Command,
// 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
if !sess.opts.cg.no_rpath {
if sess.opts.cg.rpath {
cmd.args(rpath::get_rpath_flags(sess, out_filename).as_slice());
}

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/driver/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ cgoptions!(
"a list of arguments to pass to llvm (space separated)"),
save_temps: bool = (false, parse_bool,
"save all temporary output files during compilation"),
no_rpath: bool = (false, parse_bool,
"disables setting the rpath in libs/exes"),
rpath: bool = (false, parse_bool,
"set rpath values in libs/exes"),
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,
Expand Down