...
 
Commits (1)
......@@ -27,7 +27,8 @@ Usage:
init_mu [options]
VM:
--log-level=<level> logging level: none, error, warn, info, debug, trace, env [default: env]
--log-level=<level> logging level: none, error, warn, info, debug, trace, env
[default: env]
Compiler:
--disable-inline disable compiler function inlining
......@@ -35,15 +36,20 @@ Compiler:
--emit-debug-info emit debugging information
AOT Compiler:
--aot-emit-dir=<dir> the emit directory for ahead-of-time compiling [default: emit]
--link-statically link boot image to libmu statically (defaults to dynamic)
--bootimage-external-lib=<lib> ... library that will be linked against when making bootimage [default: ]
--bootimage-external-libpath=<path> ... path for the libraries during bootimage generation [default: ]
--aot-emit-dir=<dir> the emit directory for ahead-of-time compiling
[default: emit]
--link-statically link boot image to libmu statically (defaults to dynamic)
--bootimage-external-lib=<lib> ... library that will be linked against when making bootimage
[default: ]
--bootimage-external-libpath=<path> ... path for the libraries during bootimage generation
[default: ]
Garbage Collection:
--gc-disable-collection disable collection
--gc-immixspace-size=<kb> immix space size (default 65536kb = 64mb) [default: 67108864]
--gc-lospace-size=<kb> large object space size (default 65536kb = 64mb) [default: 67108864]
--gc-immixspace-size=<kb> immix space size (default 65536kb = 64mb)
[default: 67108864]
--gc-lospace-size=<kb> large object space size (default 65536kb = 64mb)
[default: 67108864]
--gc-nthreads=<n> number of threads for parallel gc [default: 8]
";
......@@ -60,7 +66,7 @@ pub struct VMOptions {
// AOT compiler
pub flag_aot_emit_dir: String, // +0
pub flag_link_statically: bool, // +100
pub flag_link_statically: bool, // +100
pub flag_bootimage_external_lib: Vec<String>, // +24
pub flag_bootimage_external_libpath: Vec<String>, // +48
......@@ -68,7 +74,7 @@ pub struct VMOptions {
pub flag_gc_disable_collection: bool, // +101
pub flag_gc_immixspace_size: usize, // +72
pub flag_gc_lospace_size: usize, // +80
pub flag_gc_nthreads: usize, // +88
pub flag_gc_nthreads: usize // +88
}
// The fields need to be listed here in the order rust stores them in
......@@ -95,7 +101,7 @@ pub enum MuLogLevel {
Info,
Debug,
Trace,
Env,
Env
}
rodal_value!(MuLogLevel); // This enum has no fields with pointers, so just dump a strait value
......@@ -129,14 +135,30 @@ impl VMOptions {
// at the moment disable collection for debugging
// also because currently GC is buggy, and we are going to rewrite the GC
// See Issue #12
ret.flag_gc_disable_collection = true;
if !ret.flag_gc_disable_collection {
warn!("gc-disabled-collection is forced to true (opposite to user setting)");
ret.flag_gc_disable_collection = true;
}
// at the moment always emit debug info
ret.flag_emit_debug_info = true;
if !ret.flag_emit_debug_info {
warn!("emit-debug-info is forced to true (opposite to user setting)");
ret.flag_emit_debug_info = true;
}
// always disable register validation
// register validation is buggy. See Issue #19
ret.flag_disable_regalloc_validate = true;
if !ret.flag_disable_regalloc_validate {
warn!("disable-regalloc-validate is forced to true (opposite to user setting)");
ret.flag_disable_regalloc_validate = true;
}
if cfg!(target_os = "macos") {
if !ret.flag_link_statically {
warn!("link-statically is forced to true (opposite to user setting)");
ret.flag_link_statically = true;
}
}
ret
}
......