-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Description
I'm not sure if you could convince the cargo team to get dedicated profiles. I was referring to a profile option
autodiff = truesimilar to ones likelto = trueoropt-level = 3that you can specify within the[profile.release]and[profile.debug]sections.[profile.debug] autodiff = true [profile.release] autodiff = true
Originally posted by @bjorn3 in #147487
Right now, we need two options to make autodiff work.
You need to set lto=fat in your cargo.toml, and add RUSTFLAGS=-Zautodiff=Enable.
It would be good to bundle both in the same place, preferably Cargo.toml.
As a result, each compiler invocation would also become shorter, which makes autodiff much nicer to use.
Creating this issue since the main issue from the thread linked above has ben solved, so I'm closing that one. This would still be good to solve. I'm not experienced with how we parse Cargo.toml, but I assume it's a sufficiently nice beginner issue, if someone is interested.