rust-session-manager: fix an issue where ...

... the -frust-crate= option got incorrectly overridden by a default
value

Signed-off-by: Zixing Liu <liushuyu011@gmail.com>
This commit is contained in:
liushuyu 2022-04-05 17:41:22 -06:00
parent 9011184f38
commit 6d42548da9
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437
1 changed files with 3 additions and 2 deletions

View File

@ -311,8 +311,9 @@ Session::init ()
// setup backend to GCC GIMPLE
backend = rust_get_backend ();
// set the default crate name
options.set_crate_name (kDefaultCrateName);
// set the default crate name if crate name was unset
if (options.crate_name.empty ())
options.set_crate_name (kDefaultCrateName);
}
/* Initialise default options. Actually called before handle_option, unlike init