diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-07-17 13:09:36 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:55:56 +0100 |
commit | dcba437a8223ca1a88a59e8286fb3565bd07b445 (patch) | |
tree | b18b083787e11d3a4dd5762b9ee4b82228ffd80d /gcc/rust/rust-session-manager.cc | |
parent | 2327631e4ba359fb43a6a46bf2771ac5ea441d8c (diff) | |
download | gcc-dcba437a8223ca1a88a59e8286fb3565bd07b445.zip gcc-dcba437a8223ca1a88a59e8286fb3565bd07b445.tar.gz gcc-dcba437a8223ca1a88a59e8286fb3565bd07b445.tar.bz2 |
gccrs: cli: Add frust-type option
Add a new option to crab1 cli to accept crate type. This version of the
argument only accept a single crate type. Rustc accepts a comma
separated list of crate types but this might require a litle more work
for gcc.
gcc/rust/ChangeLog:
* lang.opt: Add option
* rust-session-manager.cc: Add option registration in session
target options.
* rust-session-manager.h (struct CompileOptions): Add new getter
for proc macros instead of a boolean.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/rust-session-manager.cc')
-rw-r--r-- | gcc/rust/rust-session-manager.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc index b1a735c..af57d57 100644 --- a/gcc/rust/rust-session-manager.cc +++ b/gcc/rust/rust-session-manager.cc @@ -234,7 +234,9 @@ Session::handle_option ( ret = handle_cfg_option (string_arg); break; } - + case OPT_frust_crate_type_: + options.set_crate_type (flag_rust_crate_type); + break; case OPT_frust_edition_: options.set_edition (flag_rust_edition); break; |