Skip to content

fix typo in librustc target spec #18683

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
Nov 7, 2014
Merged
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 src/librustc/back/link.rs
Original file line number Diff line number Diff line change
@@ -920,7 +920,7 @@ fn link_args(cmd: &mut Command,

let used_link_args = sess.cstore.get_used_link_args().borrow();

if t.options.position_independant_executables {
if t.options.position_independent_executables {
let empty_vec = Vec::new();
let empty_str = String::new();
let args = sess.opts.cg.link_args.as_ref().unwrap_or(&empty_vec);
2 changes: 1 addition & 1 deletion src/librustc_back/target/arm_linux_androideabi.rs
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ pub fn target() -> Target {
// linker doesn't like that by default.
base.pre_link_args.push("-Wl,--allow-multiple-definition".to_string());
// FIXME #17437 (and #17448): Android doesn't support position dependant executables anymore.
base.position_independant_executables = false;
base.position_independent_executables = false;

Target {
data_layout: "e-p:32:32:32\
2 changes: 1 addition & 1 deletion src/librustc_back/target/linux_base.rs
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ pub fn opts() -> TargetOptions {
// follow this flag. Thus, use it before specifying libraries to link to.
"-Wl,--as-needed".to_string(),
),
position_independant_executables: true,
position_independent_executables: true,
.. Default::default()
}
}
4 changes: 2 additions & 2 deletions src/librustc_back/target/mod.rs
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ pub struct TargetOptions {
/// relocation model of position independent code is not changed. This is a requirement to take
/// advantage of ASLR, as otherwise the functions in the executable are not randomized and can
/// be used during an exploit of a vulnerability in any code.
pub position_independant_executables: bool,
pub position_independent_executables: bool,
}

impl Default for TargetOptions {
@@ -189,7 +189,7 @@ impl Default for TargetOptions {
linker_is_gnu: false,
has_rpath: false,
no_compiler_rt: false,
position_independant_executables: false,
position_independent_executables: false,
}
}
}