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

Commit 9086ee79 authored by qinsoon's avatar qinsoon
Browse files

fix

parent 7cbb3c73
...@@ -159,5 +159,5 @@ mubench: ...@@ -159,5 +159,5 @@ mubench:
rustfmt: rustfmt:
stage: rustfmt stage: rustfmt
script: 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 { ...@@ -60,7 +60,7 @@ pub fn link_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf {
ret.push(dest); ret.push(dest);
// include mu static lib // 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) { ret.push(get_path_under_zebu(if cfg!(debug_assertions) {
"target/debug/libmu.a" "target/debug/libmu.a"
} else { } else {
...@@ -75,7 +75,7 @@ pub fn link_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf { ...@@ -75,7 +75,7 @@ pub fn link_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf {
out_path.push(out); out_path.push(out);
link_executable_internal( link_executable_internal(
!vm.vm_options.flag_link_statically, !vm.vm_options.flag_aot_link_static,
files, files,
&vm.vm_options.flag_bootimage_external_lib, &vm.vm_options.flag_bootimage_external_lib,
&vm.vm_options.flag_bootimage_external_libpath, &vm.vm_options.flag_bootimage_external_libpath,
...@@ -120,7 +120,7 @@ pub fn link_test_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf { ...@@ -120,7 +120,7 @@ pub fn link_test_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf {
ret.push(dest); ret.push(dest);
// include mu static lib // 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) { ret.push(get_path_under_zebu(if cfg!(debug_assertions) {
"target/debug/libmu.a" "target/debug/libmu.a"
} else { } else {
...@@ -135,7 +135,7 @@ pub fn link_test_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf { ...@@ -135,7 +135,7 @@ pub fn link_test_primordial(funcs: Vec<MuName>, out: &str, vm: &VM) -> PathBuf {
out_path.push(out); out_path.push(out);
link_executable_internal( link_executable_internal(
!vm.vm_options.flag_link_statically, !vm.vm_options.flag_aot_link_static,
files, files,
&vm.vm_options.flag_bootimage_external_lib, &vm.vm_options.flag_bootimage_external_lib,
&vm.vm_options.flag_bootimage_external_libpath, &vm.vm_options.flag_bootimage_external_libpath,
......
...@@ -1286,7 +1286,7 @@ struct BundleLoader<'lb, 'lvm> { ...@@ -1286,7 +1286,7 @@ struct BundleLoader<'lb, 'lvm> {
built_constint_of: HashMap<u64, P<Value>>, built_constint_of: HashMap<u64, P<Value>>,
current_sig: Option<P<MuFuncSig>>, current_sig: Option<P<MuFuncSig>>,
current_entry: MuID, current_entry: MuID
} }
fn load_bundle(b: &mut MuIRBuilder) { fn load_bundle(b: &mut MuIRBuilder) {
...@@ -1326,7 +1326,7 @@ fn load_bundle(b: &mut MuIRBuilder) { ...@@ -1326,7 +1326,7 @@ fn load_bundle(b: &mut MuIRBuilder) {
built_uptr_of: Default::default(), built_uptr_of: Default::default(),
built_constint_of: Default::default(), built_constint_of: Default::default(),
current_sig: Default::default(), current_sig: Default::default(),
current_entry: Default::default(), current_entry: Default::default()
}; };
bl.load_bundle(); bl.load_bundle();
......
...@@ -33,12 +33,13 @@ VM: ...@@ -33,12 +33,13 @@ VM:
Compiler: Compiler:
--disable-inline disable compiler function inlining --disable-inline disable compiler function inlining
--disable-regalloc-validate disable register allocation validation --disable-regalloc-validate disable register allocation validation
--disable-ir-validate disable IR validation
--emit-debug-info emit debugging information --emit-debug-info emit debugging information
--dont-validate-ir don't validate for invalid IR
AOT Compiler: AOT Compiler:
--aot-emit-dir=<dir> the emit directory for ahead-of-time compiling --aot-emit-dir=<dir> the emit directory for ahead-of-time compiling
[default: emit] [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 --bootimage-external-lib=<lib> ... library that will be linked against when making bootimage
[default: ] [default: ]
--bootimage-external-libpath=<path> ... path for the libraries during bootimage generation --bootimage-external-libpath=<path> ... path for the libraries during bootimage generation
...@@ -62,11 +63,12 @@ pub struct VMOptions { ...@@ -62,11 +63,12 @@ pub struct VMOptions {
// Compiler // Compiler
pub flag_disable_inline: bool, pub flag_disable_inline: bool,
pub flag_disable_regalloc_validate: bool, pub flag_disable_regalloc_validate: bool,
pub flag_disable_ir_validate: bool,
pub flag_emit_debug_info: bool, pub flag_emit_debug_info: bool,
pub flag_dont_validate_ir: bool,
// AOT compiler // AOT compiler
pub flag_aot_emit_dir: String, 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_lib: Vec<String>,
pub flag_bootimage_external_libpath: Vec<String>, pub flag_bootimage_external_libpath: Vec<String>,
...@@ -88,9 +90,9 @@ rodal_struct!(VMOptions { ...@@ -88,9 +90,9 @@ rodal_struct!(VMOptions {
flag_log_level, flag_log_level,
flag_disable_inline, flag_disable_inline,
flag_disable_regalloc_validate, flag_disable_regalloc_validate,
flag_disable_ir_validate,
flag_emit_debug_info, flag_emit_debug_info,
flag_dont_validate_ir, flag_aot_link_static,
flag_link_statically,
flag_gc_disable_collection flag_gc_disable_collection
}); });
...@@ -155,13 +157,13 @@ impl VMOptions { ...@@ -155,13 +157,13 @@ impl VMOptions {
} }
if cfg!(target_os = "macos") { 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)"); 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 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