To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 6e1f7e47 authored by Javad Ebrahimian Amiri's avatar Javad Ebrahimian Amiri
Browse files

1st draft of merging with develop branch

parent f3ca9dc8
......@@ -14,45 +14,37 @@
extern crate gcc;
//#[cfg(not(feature = "sel4-rumprun-target-side"))]
#[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(target_arch = "x86_64")]
fn build_libgc(){
println!("detected macos or linux");
fn build_libgc() {
gcc::compile_library("libgc_clib_x64.a", &["src/heap/gc/clib_x64.c"]);
}
//#[cfg(not(feature = "sel4-rumprun-target-side"))]
#[cfg(target_os = "linux")]
#[cfg(target_arch = "aarch64")]
fn build_libgc() {
println!("detected linux aarch64");
gcc::compile_library("libgc_clib_aarch64.a", &["src/heap/gc/clib_aarch64.S"]);
}
// This is here to enable cross compiling from windows/x86_64 to linux/aarch64
//#[cfg(not(feature = "sel4-rumprun-target-side"))]
#[cfg(target_os = "windows")]
#[cfg(target_arch = "x86_64")]
fn build_libgc() {
println!("detected windows 64");
gcc::compile_library("libgc_clib_aarch64.a", &["src/heap/gc/clib_aarch64.S"]);
}
//#[cfg(all(target_os = "netbsd", target_vendor = "rumprun"))]
//#[cfg(feature = "sel4-rumprun-target-side")]
//#[cfg(target_arch = "x86_64")]
// Due to bugs, it is currently not possible to use conditional compilation \
// using features or target_..., so instead we use env variables
fn main() {
use std::env;
let mut gc_target = 0; // 1 for rumprun-sel4 and 0 otherwise
// For this variable: 1 means rumprun-sel4 and 0 means others
let mut gc_target = 0;
for (key, value) in env::vars() {
if key == "ZEBU_TARGET" {
if value == "x86_64-rumprun-netbsd" {
gc_target = 1;
break;
}
else {
} else {
gc_target = 0;
break;
}
......@@ -62,13 +54,11 @@ fn main() {
// otherwise, call the related target function
if gc_target == 1 {
use std::path::Path;
println!("detected rumprun-netbsd");
let mut compiler_name = String::new();
compiler_name.push_str("x86_64-rumprun-netbsd-gcc");
gcc::Config::new().flag("-O3").flag("-c")
.compiler(Path::new(compiler_name.as_str()))
.file("src/heap/gc/clib_x64_sel4_rumprun.c")
.compile("libgc_clib_x64.a");
}
else { build_libgc(); }
} else { build_libgc(); }
}
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