Skip to content

Commit cfae691

Browse files
committed
fix typo in librustc target spec
1 parent 63c4f22 commit cfae691

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/librustc/back/link.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ fn link_args(cmd: &mut Command,
920920

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

923-
if t.options.position_independant_executables {
923+
if t.options.position_independent_executables {
924924
let empty_vec = Vec::new();
925925
let empty_str = String::new();
926926
let args = sess.opts.cg.link_args.as_ref().unwrap_or(&empty_vec);

src/librustc_back/target/arm_linux_androideabi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn target() -> Target {
1717
// linker doesn't like that by default.
1818
base.pre_link_args.push("-Wl,--allow-multiple-definition".to_string());
1919
// FIXME #17437 (and #17448): Android doesn't support position dependant executables anymore.
20-
base.position_independant_executables = false;
20+
base.position_independent_executables = false;
2121

2222
Target {
2323
data_layout: "e-p:32:32:32\

src/librustc_back/target/linux_base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn opts() -> TargetOptions {
2525
// follow this flag. Thus, use it before specifying libraries to link to.
2626
"-Wl,--as-needed".to_string(),
2727
),
28-
position_independant_executables: true,
28+
position_independent_executables: true,
2929
.. Default::default()
3030
}
3131
}

src/librustc_back/target/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ pub struct TargetOptions {
158158
/// relocation model of position independent code is not changed. This is a requirement to take
159159
/// advantage of ASLR, as otherwise the functions in the executable are not randomized and can
160160
/// be used during an exploit of a vulnerability in any code.
161-
pub position_independant_executables: bool,
161+
pub position_independent_executables: bool,
162162
}
163163

164164
impl Default for TargetOptions {
@@ -189,7 +189,7 @@ impl Default for TargetOptions {
189189
linker_is_gnu: false,
190190
has_rpath: false,
191191
no_compiler_rt: false,
192-
position_independant_executables: false,
192+
position_independent_executables: false,
193193
}
194194
}
195195
}

0 commit comments

Comments
 (0)