From 44abc5f7c65a0e4919ee369970fab3c85777140d Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Tue, 13 Oct 2020 19:21:47 -0400 Subject: [PATCH] fuzz: enable optimizations in other profiles The problem was that the fuzzer wasn't running with optimizations, which means it was likely compiled in debug mode. So setting the optimization level on the release profile won't do any good. Instead, we set it on the debug and test profiles, which should cover it. --- fuzz/Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index b84aabc5d2..2cabf33c8f 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -22,6 +22,14 @@ members = ["."] name = "fuzz_regex_match" path = "fuzz_targets/fuzz_regex_match.rs" +[profile.debug] +opt-level = 3 +debug = true + [profile.release] opt-level = 3 debug = true + +[profile.test] +opt-level = 3 +debug = true