Commit 9086ee79 authored by qinsoon's avatar qinsoon

fix

parent 7cbb3c73
......@@ -159,5 +159,5 @@ mubench:
rustfmt:
stage: rustfmt
script:
- cargo-fmt -- --write-mode=diff --verbose -- src/ast/src/lib.rs src/gc/src/lib.rs src/utils/src/lib.rs
- cargo-fmt -- --write-mode=diff --verbose -- src/lib.rs src/ast/src/lib.rs src/gc/src/lib.rs src/utils/src/lib.rs
......@@ -60,7 +60,7 @@ pub fn link_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf {
ret.push(dest);
// include mu static lib
if vm.vm_options.flag_link_statically {
if vm.vm_options.flag_aot_link_static {
ret.push(get_path_under_zebu(if cfg!(debug_assertions) {
"target/debug/libmu.a"
} else {
......@@ -75,7 +75,7 @@ pub fn link_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf {
out_path.push(out);
link_executable_internal(
!vm.vm_options.flag_link_statically,
!vm.vm_options.flag_aot_link_static,
files,
&vm.vm_options.flag_bootimage_external_lib,
&vm.vm_options.flag_bootimage_external_libpath,
......@@ -120,7 +120,7 @@ pub fn link_test_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf {
ret.push(dest);
// include mu static lib
if vm.vm_options.flag_link_statically {
if vm.vm_options.flag_aot_link_static {
ret.push(get_path_under_zebu(if cfg!(debug_assertions) {
"target/debug/libmu.a"
} else {
......@@ -135,7 +135,7 @@ pub fn link_test_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf {
out_path.push(out);
link_executable_internal(
!vm.vm_options.flag_link_statically,
!vm.vm_options.flag_aot_link_static,
files,
&vm.vm_options.flag_bootimage_external_lib,
&vm.vm_options.flag_bootimage_external_libpath,
......
......@@ -1286,7 +1286,7 @@ struct BundleLoader<'lb, 'lvm> {
built_constint_of: HashMap<u64, P<Value>>,
current_sig: Option<P<MuFuncSig>>,
current_entry: MuID,
current_entry: MuID
}
fn load_bundle(b: &mut MuIRBuilder) {
......@@ -1326,7 +1326,7 @@ fn load_bundle(b: &mut MuIRBuilder) {
built_uptr_of: Default::default(),
built_constint_of: Default::default(),
current_sig: Default::default(),
current_entry: Default::default(),
current_entry: Default::default()
};
bl.load_bundle();
......
......@@ -33,12 +33,13 @@ VM:
Compiler:
--disable-inline disable compiler function inlining
--disable-regalloc-validate disable register allocation validation
--disable-ir-validate disable IR validation
--emit-debug-info emit debugging information
--dont-validate-ir don't validate for invalid IR
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)
--aot-link-static 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
......@@ -62,11 +63,12 @@ pub struct VMOptions {
// Compiler
pub flag_disable_inline: bool,
pub flag_disable_regalloc_validate: bool,
pub flag_disable_ir_validate: bool,
pub flag_emit_debug_info: bool,
pub flag_dont_validate_ir: bool,
// AOT compiler
pub flag_aot_emit_dir: String,
pub flag_link_statically: bool,
pub flag_aot_link_static: bool,
pub flag_bootimage_external_lib: Vec<String>,
pub flag_bootimage_external_libpath: Vec<String>,
......@@ -88,9 +90,9 @@ rodal_struct!(VMOptions {
flag_log_level,
flag_disable_inline,
flag_disable_regalloc_validate,
flag_disable_ir_validate,
flag_emit_debug_info,
flag_dont_validate_ir,
flag_link_statically,
flag_aot_link_static,
flag_gc_disable_collection
});
......@@ -155,13 +157,13 @@ impl VMOptions {
}
if cfg!(target_os = "macos") {
if !ret.flag_link_statically {
if !ret.flag_aot_link_static {
warn!("link-statically is forced to true (opposite to user setting)");
ret.flag_link_statically = true;
ret.flag_aot_link_static = true;
}
}
unsafe{super::api::VALIDATE_IR = !ret.flag_dont_validate_ir};
unsafe { super::api::VALIDATE_IR = !ret.flag_disable_ir_validate };
ret
}
}
......
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