Open CohenArthur opened 3 years ago
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
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.
GccrsArgs
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