Passes 160 tests and ignores 1 on Linux, using clang6, and rust nightly 1.34.0

parent 34798d35
......@@ -30,7 +30,7 @@ sel4-rumprun = []
sel4-rumprun-target-side = []
[build-dependencies]
gcc = "*"
cc = "*"
built = "*"
[dependencies]
......
......@@ -15,19 +15,19 @@
#[cfg(not(feature = "sel4-rumprun-target-side"))]
extern crate built;
extern crate gcc;
extern crate cc;
#[cfg(not(feature = "sel4-rumprun-target-side"))]
#[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(target_arch = "x86_64")]
fn main() {
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.file("src/runtime/runtime_c_x64_sysv.c")
.compile("libruntime_c.a");
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.file("src/runtime/runtime_asm_x64_sysv.S")
......@@ -40,13 +40,13 @@ fn main() {
#[cfg(target_os = "linux")]
#[cfg(target_arch = "aarch64")]
fn main() {
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.file("src/runtime/runtime_c_aarch64_sysv.c")
.compile("libruntime_c.a");
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.file("src/runtime/runtime_asm_aarch64_sysv.S")
......@@ -67,19 +67,19 @@ fn main() {
use std::path::Path;
let mut compiler_name = String::new();
compiler_name.push_str("x86_64-rumprun-netbsd-gcc");
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.compiler(Path::new(compiler_name.as_str()))
.file("src/runtime/runtime_x64_sel4_rumprun_sysv.c")
.compile("libruntime_c.a");
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.compiler(Path::new(compiler_name.as_str()))
.file("src/runtime/runtime_asm_x64_sel4_rumprun_sysv.S")
.compile("libruntime_asm.a");
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.compiler(Path::new(compiler_name.as_str()))
......
......@@ -27,7 +27,7 @@ sel4-rumprun = []
sel4-rumprun-target-side = []
[build-dependencies]
gcc = "*"
cc = "*"
[dependencies]
mu_utils = {path = "../utils"}
......
......@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
extern crate gcc;
extern crate cc;
#[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(target_arch = "x86_64")]
fn build_libgc() {
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.file("src/heap/gc/clib_x64.c")
......@@ -27,7 +27,7 @@ fn build_libgc() {
#[cfg(target_os = "linux")]
#[cfg(target_arch = "aarch64")]
fn build_libgc() {
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.file("src/heap/gc/clib_aarch64.S")
......@@ -38,7 +38,7 @@ fn build_libgc() {
#[cfg(target_os = "windows")]
#[cfg(target_arch = "x86_64")]
fn build_libgc() {
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.file("src/heap/gc/clib_aarch64.S")
......@@ -68,7 +68,7 @@ fn main() {
use std::path::Path;
let mut compiler_name = String::new();
compiler_name.push_str("x86_64-rumprun-netbsd-gcc");
gcc::Build::new()
cc::Build::new()
.flag("-O3")
.flag("-c")
.compiler(Path::new(compiler_name.as_str()))
......
......@@ -121,7 +121,7 @@ pub struct FullTypeEncode {
rodal_struct!(FullTypeEncode { align, fix, var });
/// TypeEncode
#[repr(C, packed)]
#[repr(C)]
// Clone, PartialEq, Eq, Hash, Debug
pub struct ShortTypeEncode {
/// alignment requirement
......
......@@ -177,12 +177,8 @@ fn link_executable_internal(
}
// dylibs used for linux
if cfg!(target_os = "linux") {
cc.arg("-ldl");
cc.arg("-lrt");
cc.arg("-lm");
cc.arg("-lpthread");
cc.arg("-lz");
} else if cfg!(target_os = "macos") {
} else if cfg!(target_os = "macos") { // TODO macos args need to be updated
cc.arg("-liconv");
cc.arg("-framework");
cc.arg("Security");
......
......@@ -21,9 +21,6 @@
extern void* vm;
extern void* RODAL_END;
extern void mu_main(void*, void*, int, char**);
extern void rodal_init_deallocate(void);
extern void rodal_free(void*);
extern void* rodal_realloc(void*, size_t);
extern uint32_t mu_retval;
......@@ -36,11 +33,7 @@ int main(int argc, char** argv) {
STRUCT_TAG_MAP_LOC = &STRUCT_TAG_MAP;
HYBRID_TAG_MAP_LOC = &HYBRID_TAG_MAP;
rodal_init_deallocate();
mu_main(&RODAL_END, &vm, argc, argv);
assert(mu_retval == 0);
return (int)mu_retval;
}
void free(void* ptr) { return rodal_free(ptr); };
void* realloc(void* ptr, size_t s) { return rodal_realloc(ptr, s); };
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment