(sess: &Session)
| 261 | |
| 262 | impl CodegenArgs { |
| 263 | pub fn from_session(sess: &Session) -> Self { |
| 264 | match CodegenArgs::parse(&sess.opts.cg.llvm_args) { |
| 265 | Ok(ok) => ok, |
| 266 | Err(err) => sess.fatal(format!("Unable to parse llvm-args: {err}")), |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | // FIXME(eddyb) `structopt` would come a long way to making this nicer. |
| 271 | pub fn parse(args: &[String]) -> Result<Self, rustc_session::getopts::Fail> { |