diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-04-18 17:26:07 +0200 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2023-04-28 16:26:38 +0000 |
commit | 1fb32d7293b8a1849e23502fd58afa46d670ec94 (patch) | |
tree | e1709f62311c8570dd61224e61245279150965ff /gcc/rust/rust-session-manager.h | |
parent | fef6c560017c33a4d5e439067bad09a85630f851 (diff) | |
download | gcc-devel/rust/master.tar.gz |
cli: Add frust-extern optiondevel/rust/master
Add a new option to gather extern crates location.
gcc/rust/ChangeLog:
* lang.opt: Add frust-extern option.
* rust-session-manager.cc (Session::handle_extern_option): Add
frust-extern option handler.
* rust-session-manager.h (struct Session): Add an unordered map
to store library name and locations.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/rust-session-manager.h')
-rw-r--r-- | gcc/rust/rust-session-manager.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/rust-session-manager.h b/gcc/rust/rust-session-manager.h index 5636a29590c..85d4d43e1b9 100644 --- a/gcc/rust/rust-session-manager.h +++ b/gcc/rust/rust-session-manager.h @@ -288,6 +288,7 @@ struct Session /* This should really be in a per-crate storage area but it is wiped with * every file so eh. */ std::string injected_crate_name; + std::map<std::string, std::string> extern_crates; /* extra files get included during late stages of compilation (e.g. macro * expansion) */ @@ -366,6 +367,8 @@ private: // handle cfg_option bool handle_cfg_option (std::string &data); + + bool handle_extern_option (std::string &data); }; } // namespace Rust |