Skip to content

Commit 50d0e07

Browse files
committed
Add support for ARM thumb architecture
1 parent 6f3326f commit 50d0e07

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/librustc/back/arm.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ use metadata::loader::meta_section_name;
1414
use syntax::abi;
1515

1616
pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::t {
17+
let cc_args = if target_triple.contains("thumb") {
18+
~[~"-mthumb"]
19+
} else {
20+
~[~"-marm"]
21+
};
1722
return target_strs::t {
1823
module_asm: ~"",
1924

@@ -63,6 +68,6 @@ pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::
6368

6469
target_triple: target_triple,
6570

66-
cc_args: ~[~"-marm"],
71+
cc_args: cc_args,
6772
};
6873
}

src/librustc/driver/driver.rs

+1
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ static architecture_abis : &'static [(&'static str, abi::Architecture)] = &'stat
661661

662662
("arm", abi::Arm),
663663
("xscale", abi::Arm),
664+
("thumb", abi::Arm),
664665

665666
("mips", abi::Mips)];
666667

0 commit comments

Comments
 (0)