Rust-GCC / cargo-gccrs

Gaining support for cargo via rustc-wrapper
Other
26 stars 6 forks source link

Use rustc's options parser as is #46

Open CohenArthur opened 3 years ago

CohenArthur commented 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

CohenArthur commented 3 years ago

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.