diff --git a/src/librustc/back/arm.rs b/src/librustc/back/arm.rs index c155f4bd15b89..92a0c90cd9ded 100644 --- a/src/librustc/back/arm.rs +++ b/src/librustc/back/arm.rs @@ -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, }; } diff --git a/src/librustc/driver/driver.rs b/src/librustc/driver/driver.rs index dcab4376cd1d7..9cc12caa47834 100644 --- a/src/librustc/driver/driver.rs +++ b/src/librustc/driver/driver.rs @@ -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)];