File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ use target:: Target ;
12
+
13
+ pub fn target ( ) -> Target {
14
+ let mut base = super :: linux_base:: opts ( ) ;
15
+ base. pre_link_args . push ( "-m32" . to_string ( ) ) ;
16
+
17
+ Target {
18
+ data_layout : "E-S8-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32" . to_string ( ) ,
19
+ llvm_target : "powerpc-unknown-linux-gnu" . to_string ( ) ,
20
+ target_endian : "big" . to_string ( ) ,
21
+ target_word_size : "32" . to_string ( ) ,
22
+ arch : "powerpc" . to_string ( ) ,
23
+ target_os : "linux" . to_string ( ) ,
24
+ options : base,
25
+ }
26
+ }
Original file line number Diff line number Diff line change @@ -1974,6 +1974,11 @@ extern {
1974
1974
pub fn LLVMInitializeMipsTargetMC ( ) ;
1975
1975
pub fn LLVMInitializeMipsAsmPrinter ( ) ;
1976
1976
pub fn LLVMInitializeMipsAsmParser ( ) ;
1977
+ pub fn LLVMInitializePowerPCTargetInfo ( ) ;
1978
+ pub fn LLVMInitializePowerPCTarget ( ) ;
1979
+ pub fn LLVMInitializePowerPCTargetMC ( ) ;
1980
+ pub fn LLVMInitializePowerPCAsmPrinter ( ) ;
1981
+ pub fn LLVMInitializePowerPCAsmParser ( ) ;
1977
1982
1978
1983
pub fn LLVMRustAddPass ( PM : PassManagerRef , Pass : * const c_char ) -> bool ;
1979
1984
pub fn LLVMRustCreateTargetMachine ( Triple : * const c_char ,
@@ -2249,6 +2254,12 @@ pub unsafe fn static_link_hack_this_sucks() {
2249
2254
LLVMInitializeMipsAsmPrinter ( ) ;
2250
2255
LLVMInitializeMipsAsmParser ( ) ;
2251
2256
2257
+ LLVMInitializePowerPCTargetInfo ( ) ;
2258
+ LLVMInitializePowerPCTarget ( ) ;
2259
+ LLVMInitializePowerPCTargetMC ( ) ;
2260
+ LLVMInitializePowerPCAsmPrinter ( ) ;
2261
+ LLVMInitializePowerPCAsmParser ( ) ;
2262
+
2252
2263
LLVMRustSetLLVMOptions ( 0 as c_int ,
2253
2264
0 as * const _ ) ;
2254
2265
Original file line number Diff line number Diff line change @@ -1039,6 +1039,12 @@ unsafe fn configure_llvm(sess: &Session) {
1039
1039
llvm:: LLVMInitializeMipsAsmPrinter ( ) ;
1040
1040
llvm:: LLVMInitializeMipsAsmParser ( ) ;
1041
1041
1042
+ llvm:: LLVMInitializePowerPCTargetInfo ( ) ;
1043
+ llvm:: LLVMInitializePowerPCTarget ( ) ;
1044
+ llvm:: LLVMInitializePowerPCTargetMC ( ) ;
1045
+ llvm:: LLVMInitializePowerPCAsmPrinter ( ) ;
1046
+ llvm:: LLVMInitializePowerPCAsmParser ( ) ;
1047
+
1042
1048
llvm:: LLVMRustSetLLVMOptions ( llvm_args. len ( ) as c_int ,
1043
1049
llvm_args. as_ptr ( ) ) ;
1044
1050
} ) ;
You can’t perform that action at this time.
0 commit comments