1
Fork 0

compiler: Never debug_assert in codegen

The gains in performance are not worth the costs in correctness.
This is partly because the gains are zero and the costs are unknown.
This commit is contained in:
Jubilee Young 2024-07-19 16:52:33 -07:00
parent 9057c3ffec
commit ce7b069fd8
16 changed files with 57 additions and 65 deletions

View file

@ -330,7 +330,7 @@ impl<'ll> CodegenCx<'ll, '_> {
// If this assertion triggers, there's something wrong with commandline
// argument validation.
debug_assert!(
assert!(
!(self.tcx.sess.opts.cg.linker_plugin_lto.enabled()
&& self.tcx.sess.target.is_like_windows
&& self.tcx.sess.opts.cg.prefer_dynamic)