Correctly handle missing CG_CLIF_JIT_ARGS
This commit is contained in:
parent
88d10687b0
commit
b1ebc55240
@ -64,8 +64,13 @@ fn default() -> Self {
|
|||||||
BackendConfig {
|
BackendConfig {
|
||||||
codegen_mode: CodegenMode::Aot,
|
codegen_mode: CodegenMode::Aot,
|
||||||
jit_args: {
|
jit_args: {
|
||||||
let args = std::env::var("CG_CLIF_JIT_ARGS").unwrap_or_else(|_| String::new());
|
match std::env::var("CG_CLIF_JIT_ARGS") {
|
||||||
args.split(' ').map(|arg| arg.to_string()).collect()
|
Ok(args) => args.split(' ').map(|arg| arg.to_string()).collect(),
|
||||||
|
Err(std::env::VarError::NotPresent) => vec![],
|
||||||
|
Err(std::env::VarError::NotUnicode(s)) => {
|
||||||
|
panic!("CG_CLIF_JIT_ARGS not unicode: {:?}", s);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
enable_verifier: cfg!(debug_assertions) || bool_env_var("CG_CLIF_ENABLE_VERIFIER"),
|
enable_verifier: cfg!(debug_assertions) || bool_env_var("CG_CLIF_ENABLE_VERIFIER"),
|
||||||
disable_incr_cache: bool_env_var("CG_CLIF_DISABLE_INCR_CACHE"),
|
disable_incr_cache: bool_env_var("CG_CLIF_DISABLE_INCR_CACHE"),
|
||||||
|
Loading…
Reference in New Issue
Block a user