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

parent 34798d35
Pipeline #3503 failed with stages
in 1 minute and 29 seconds
...@@ -30,7 +30,7 @@ sel4-rumprun = [] ...@@ -30,7 +30,7 @@ sel4-rumprun = []
sel4-rumprun-target-side = [] sel4-rumprun-target-side = []
[build-dependencies] [build-dependencies]
gcc = "*" cc = "*"
built = "*" built = "*"
[dependencies] [dependencies]
......
...@@ -15,19 +15,19 @@ ...@@ -15,19 +15,19 @@
#[cfg(not(feature = "sel4-rumprun-target-side"))] #[cfg(not(feature = "sel4-rumprun-target-side"))]
extern crate built; extern crate built;
extern crate gcc; extern crate cc;
#[cfg(not(feature = "sel4-rumprun-target-side"))] #[cfg(not(feature = "sel4-rumprun-target-side"))]
#[cfg(any(target_os = "macos", target_os = "linux"))] #[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
fn main() { fn main() {
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.file("src/runtime/runtime_c_x64_sysv.c") .file("src/runtime/runtime_c_x64_sysv.c")
.compile("libruntime_c.a"); .compile("libruntime_c.a");
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.file("src/runtime/runtime_asm_x64_sysv.S") .file("src/runtime/runtime_asm_x64_sysv.S")
...@@ -40,13 +40,13 @@ fn main() { ...@@ -40,13 +40,13 @@ fn main() {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
#[cfg(target_arch = "aarch64")] #[cfg(target_arch = "aarch64")]
fn main() { fn main() {
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.file("src/runtime/runtime_c_aarch64_sysv.c") .file("src/runtime/runtime_c_aarch64_sysv.c")
.compile("libruntime_c.a"); .compile("libruntime_c.a");
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.file("src/runtime/runtime_asm_aarch64_sysv.S") .file("src/runtime/runtime_asm_aarch64_sysv.S")
...@@ -67,19 +67,19 @@ fn main() { ...@@ -67,19 +67,19 @@ fn main() {
use std::path::Path; use std::path::Path;
let mut compiler_name = String::new(); let mut compiler_name = String::new();
compiler_name.push_str("x86_64-rumprun-netbsd-gcc"); compiler_name.push_str("x86_64-rumprun-netbsd-gcc");
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.compiler(Path::new(compiler_name.as_str())) .compiler(Path::new(compiler_name.as_str()))
.file("src/runtime/runtime_x64_sel4_rumprun_sysv.c") .file("src/runtime/runtime_x64_sel4_rumprun_sysv.c")
.compile("libruntime_c.a"); .compile("libruntime_c.a");
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.compiler(Path::new(compiler_name.as_str())) .compiler(Path::new(compiler_name.as_str()))
.file("src/runtime/runtime_asm_x64_sel4_rumprun_sysv.S") .file("src/runtime/runtime_asm_x64_sel4_rumprun_sysv.S")
.compile("libruntime_asm.a"); .compile("libruntime_asm.a");
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.compiler(Path::new(compiler_name.as_str())) .compiler(Path::new(compiler_name.as_str()))
......
...@@ -27,7 +27,7 @@ sel4-rumprun = [] ...@@ -27,7 +27,7 @@ sel4-rumprun = []
sel4-rumprun-target-side = [] sel4-rumprun-target-side = []
[build-dependencies] [build-dependencies]
gcc = "*" cc = "*"
[dependencies] [dependencies]
mu_utils = {path = "../utils"} mu_utils = {path = "../utils"}
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
extern crate gcc; extern crate cc;
#[cfg(any(target_os = "macos", target_os = "linux"))] #[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
fn build_libgc() { fn build_libgc() {
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.file("src/heap/gc/clib_x64.c") .file("src/heap/gc/clib_x64.c")
...@@ -27,7 +27,7 @@ fn build_libgc() { ...@@ -27,7 +27,7 @@ fn build_libgc() {
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
#[cfg(target_arch = "aarch64")] #[cfg(target_arch = "aarch64")]
fn build_libgc() { fn build_libgc() {
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.file("src/heap/gc/clib_aarch64.S") .file("src/heap/gc/clib_aarch64.S")
...@@ -38,7 +38,7 @@ fn build_libgc() { ...@@ -38,7 +38,7 @@ fn build_libgc() {
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
fn build_libgc() { fn build_libgc() {
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.file("src/heap/gc/clib_aarch64.S") .file("src/heap/gc/clib_aarch64.S")
...@@ -68,7 +68,7 @@ fn main() { ...@@ -68,7 +68,7 @@ fn main() {
use std::path::Path; use std::path::Path;
let mut compiler_name = String::new(); let mut compiler_name = String::new();
compiler_name.push_str("x86_64-rumprun-netbsd-gcc"); compiler_name.push_str("x86_64-rumprun-netbsd-gcc");
gcc::Build::new() cc::Build::new()
.flag("-O3") .flag("-O3")
.flag("-c") .flag("-c")
.compiler(Path::new(compiler_name.as_str())) .compiler(Path::new(compiler_name.as_str()))
......
...@@ -121,7 +121,7 @@ pub struct FullTypeEncode { ...@@ -121,7 +121,7 @@ pub struct FullTypeEncode {
rodal_struct!(FullTypeEncode { align, fix, var }); rodal_struct!(FullTypeEncode { align, fix, var });
/// TypeEncode /// TypeEncode
#[repr(C, packed)] #[repr(C)]
// Clone, PartialEq, Eq, Hash, Debug // Clone, PartialEq, Eq, Hash, Debug
pub struct ShortTypeEncode { pub struct ShortTypeEncode {
/// alignment requirement /// alignment requirement
......
...@@ -177,12 +177,8 @@ fn link_executable_internal( ...@@ -177,12 +177,8 @@ fn link_executable_internal(
} }
// dylibs used for linux // dylibs used for linux
if cfg!(target_os = "linux") { if cfg!(target_os = "linux") {
cc.arg("-ldl");
cc.arg("-lrt");
cc.arg("-lm");
cc.arg("-lpthread"); cc.arg("-lpthread");
cc.arg("-lz"); } else if cfg!(target_os = "macos") { // TODO macos args need to be updated
} else if cfg!(target_os = "macos") {
cc.arg("-liconv"); cc.arg("-liconv");
cc.arg("-framework"); cc.arg("-framework");
cc.arg("Security"); cc.arg("Security");
......
...@@ -21,9 +21,6 @@ ...@@ -21,9 +21,6 @@
extern void* vm; extern void* vm;
extern void* RODAL_END; extern void* RODAL_END;
extern void mu_main(void*, void*, int, char**); 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; extern uint32_t mu_retval;
...@@ -36,11 +33,7 @@ int main(int argc, char** argv) { ...@@ -36,11 +33,7 @@ int main(int argc, char** argv) {
STRUCT_TAG_MAP_LOC = &STRUCT_TAG_MAP; STRUCT_TAG_MAP_LOC = &STRUCT_TAG_MAP;
HYBRID_TAG_MAP_LOC = &HYBRID_TAG_MAP; HYBRID_TAG_MAP_LOC = &HYBRID_TAG_MAP;
rodal_init_deallocate();
mu_main(&RODAL_END, &vm, argc, argv); mu_main(&RODAL_END, &vm, argc, argv);
assert(mu_retval == 0); assert(mu_retval == 0);
return (int)mu_retval; 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