tools: make sure we don't use optimization when building mocks.

Don't want it to optimize something out!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-10-22 14:37:21 +10:30
parent 2ea3c6155f
commit 64495cf166

View File

@ -13,7 +13,8 @@ START=$(grep -F -n '/* AUTOGENERATED MOCKS START */' "$FILE" | cut -d: -f1)
END=$(grep -F -n '/* AUTOGENERATED MOCKS END */' "$FILE" | cut -d: -f1) END=$(grep -F -n '/* AUTOGENERATED MOCKS END */' "$FILE" | cut -d: -f1)
function make_binary() { function make_binary() {
$MAKE SUPPRESS_GENERATION=1 "${FILE/%.c/}" 2> "${BASE}.err" >/dev/null # Make sure we don't optimize out options, and we use debug build
$MAKE SUPPRESS_GENERATION=1 "${FILE/%.c/}" DEBUGBUILD=1 COPTFLAGS="" 2> "${BASE}.err" >/dev/null
} }
if [ -n "$START" ]; then if [ -n "$START" ]; then