Inside the main source files you can use cfg!(panic = "abort"). As for LTO you need to use a build script and check if the CARGO_ENCODED_RUSTFLAGS env var contains -Clto.
2 Likes
Inside the main source files you can use cfg!(panic = "abort"). As for LTO you need to use a build script and check if the CARGO_ENCODED_RUSTFLAGS env var contains -Clto.