Merge branch 'master' of github.com:graydon/rust
This commit is contained in:
commit
cb254f3558
@ -2,6 +2,7 @@ import lib.llvm.llvm;
|
||||
import lib.llvm.llvm.ModuleRef;
|
||||
import std._str;
|
||||
import std._vec;
|
||||
import std.os.target_os;
|
||||
import util.common.istr;
|
||||
|
||||
const int wordsz = 4;
|
||||
@ -128,7 +129,11 @@ fn decl_upcall_glue(int align, str prefix, uint n) -> str {
|
||||
|
||||
fn get_module_asm() -> str {
|
||||
auto align = 4;
|
||||
|
||||
auto prefix = "";
|
||||
if (target_os() == "macos") {
|
||||
prefix = "_";
|
||||
}
|
||||
|
||||
auto glues =
|
||||
vec(decl_glue(align, prefix,
|
||||
|
@ -47,6 +47,9 @@ fn exec_suffix() -> str {
|
||||
ret "";
|
||||
}
|
||||
|
||||
fn target_os() -> str {
|
||||
ret "linux";
|
||||
}
|
||||
|
||||
// Local Variables:
|
||||
// mode: rust;
|
||||
|
@ -47,6 +47,10 @@ fn exec_suffix() -> str {
|
||||
ret "";
|
||||
}
|
||||
|
||||
fn target_os() -> str {
|
||||
ret "macos";
|
||||
}
|
||||
|
||||
// Local Variables:
|
||||
// mode: rust;
|
||||
// fill-column: 78;
|
||||
|
@ -38,6 +38,10 @@ fn exec_suffix() -> str {
|
||||
ret ".exe";
|
||||
}
|
||||
|
||||
fn target_os() -> str {
|
||||
ret "win32";
|
||||
}
|
||||
|
||||
// Local Variables:
|
||||
// mode: rust;
|
||||
// fill-column: 78;
|
||||
|
Loading…
Reference in New Issue
Block a user