Skip to content

Commit fb6ec77

Browse files
committed
---
yaml --- r: 173475 b: refs/heads/master c: 33cd9cf h: refs/heads/master i: 173473: 40e8be0 173471: 432e762 v: v3
1 parent 2e2bd49 commit fb6ec77

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: c8442afeb066656c4f4db3ca8538ee5976b504f6
2+
refs/heads/master: 33cd9cf9f463b6eb6153d0698ca8d209ab95efec
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 210f0dcf007104240b2e286ed0b80cb4a61d7bae
55
refs/heads/try: 957472483d3a2f43c0e4f7c2056280a1022af93c
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
}

trunk/src/librustc_llvm/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,11 @@ extern {
19741974
pub fn LLVMInitializeMipsTargetMC();
19751975
pub fn LLVMInitializeMipsAsmPrinter();
19761976
pub fn LLVMInitializeMipsAsmParser();
1977+
pub fn LLVMInitializePowerPCTargetInfo();
1978+
pub fn LLVMInitializePowerPCTarget();
1979+
pub fn LLVMInitializePowerPCTargetMC();
1980+
pub fn LLVMInitializePowerPCAsmPrinter();
1981+
pub fn LLVMInitializePowerPCAsmParser();
19771982

19781983
pub fn LLVMRustAddPass(PM: PassManagerRef, Pass: *const c_char) -> bool;
19791984
pub fn LLVMRustCreateTargetMachine(Triple: *const c_char,
@@ -2249,6 +2254,12 @@ pub unsafe fn static_link_hack_this_sucks() {
22492254
LLVMInitializeMipsAsmPrinter();
22502255
LLVMInitializeMipsAsmParser();
22512256

2257+
LLVMInitializePowerPCTargetInfo();
2258+
LLVMInitializePowerPCTarget();
2259+
LLVMInitializePowerPCTargetMC();
2260+
LLVMInitializePowerPCAsmPrinter();
2261+
LLVMInitializePowerPCAsmParser();
2262+
22522263
LLVMRustSetLLVMOptions(0 as c_int,
22532264
0 as *const _);
22542265

trunk/src/librustc_trans/back/write.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,12 @@ unsafe fn configure_llvm(sess: &Session) {
10391039
llvm::LLVMInitializeMipsAsmPrinter();
10401040
llvm::LLVMInitializeMipsAsmParser();
10411041

1042+
llvm::LLVMInitializePowerPCTargetInfo();
1043+
llvm::LLVMInitializePowerPCTarget();
1044+
llvm::LLVMInitializePowerPCTargetMC();
1045+
llvm::LLVMInitializePowerPCAsmPrinter();
1046+
llvm::LLVMInitializePowerPCAsmParser();
1047+
10421048
llvm::LLVMRustSetLLVMOptions(llvm_args.len() as c_int,
10431049
llvm_args.as_ptr());
10441050
});

0 commit comments

Comments
 (0)