cargo-gccrs icon indicating copy to clipboard operation
cargo-gccrs copied to clipboard

Use rustc's options parser as is

Open CohenArthur opened this issue 4 years ago • 1 comments

Maybe the parsing and the translation should be split? So the parsing would create a struct like https://github.com/rust-lang/rust/blob/456a03227e3c81a51631f87ec80cac301e5fa6d7/compiler/rustc_session/src/options.rs#L66-L71 (maybe even just copy this file verbatim? that way the parsing is guaranteed to be correct.) and then translation would create the appropriate arguments for gccrs.

Originally posted by @bjorn3 in https://github.com/Rust-GCC/cargo-gccrs/issues/23#issuecomment-867788381

CohenArthur avatar Jul 16 '21 12:07 CohenArthur

This is a big change, so I believe that it would be better to add it in a separate pull request once the refactor of GccrsArgs is complete.

CohenArthur avatar Jul 16 '21 13:07 CohenArthur