Add support for ARM thumb architecture

This commit is contained in:
Ben Harris 2014-01-21 14:47:14 +08:00
parent 6f3326f84d
commit 50d0e07065
2 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,11 @@ use metadata::loader::meta_section_name;
use syntax::abi;
pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::t {
let cc_args = if target_triple.contains("thumb") {
~[~"-mthumb"]
} else {
~[~"-marm"]
};
return target_strs::t {
module_asm: ~"",
@ -63,6 +68,6 @@ pub fn get_target_strs(target_triple: ~str, target_os: abi::Os) -> target_strs::
target_triple: target_triple,
cc_args: ~[~"-marm"],
cc_args: cc_args,
};
}

View File

@ -661,6 +661,7 @@ static architecture_abis : &'static [(&'static str, abi::Architecture)] = &'stat
("arm", abi::Arm),
("xscale", abi::Arm),
("thumb", abi::Arm),
("mips", abi::Mips)];