aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2010-12-03 13:51:46 -0800
committerPatrick Walton <[email protected]>2010-12-03 13:52:54 -0800
commitf371dc613adb41a9d62eecc9dd7dbde92b5f38a2 (patch)
treeb0ef7da69050eab1c4d888194b9c3b16258995b2 /src/comp/middle
parentAdd load_non_structural and use it. (diff)
downloadrust-f371dc613adb41a9d62eecc9dd7dbde92b5f38a2.tar.xz
rust-f371dc613adb41a9d62eecc9dd7dbde92b5f38a2.zip
rustc: Set data layout and target triple
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/trans.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 2b4bec0c..9b6fa0ab 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -2151,6 +2151,9 @@ fn trans_crate(session.session sess, @ast.crate crate, str output) {
llvm.LLVMModuleCreateWithNameInContext(_str.buf("rust_out"),
llvm.LLVMGetGlobalContext());
+ llvm.LLVMSetDataLayout(llmod, _str.buf(x86.get_data_layout()));
+ llvm.LLVMSetTarget(llmod, _str.buf(x86.get_target_triple()));
+
llvm.LLVMSetModuleInlineAsm(llmod, _str.buf(x86.get_module_asm()));
auto intrinsics = declare_intrinsics(llmod);