Merge branch 'master' of github.com:graydon/rust

This commit is contained in:
Graydon Hoare 2010-10-22 17:24:05 -07:00
commit cb254f3558
4 changed files with 16 additions and 0 deletions

View file

@ -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,

View file

@ -47,6 +47,9 @@ fn exec_suffix() -> str {
ret "";
}
fn target_os() -> str {
ret "linux";
}
// Local Variables:
// mode: rust;

View file

@ -47,6 +47,10 @@ fn exec_suffix() -> str {
ret "";
}
fn target_os() -> str {
ret "macos";
}
// Local Variables:
// mode: rust;
// fill-column: 78;

View file

@ -38,6 +38,10 @@ fn exec_suffix() -> str {
ret ".exe";
}
fn target_os() -> str {
ret "win32";
}
// Local Variables:
// mode: rust;
// fill-column: 78;