From 588bedca91d94a9fa104a3bb06783afbd6353c9d Mon Sep 17 00:00:00 2001 From: "P. Oscar Boykin" Date: Wed, 4 Dec 2024 08:54:38 -1000 Subject: [PATCH] Test compilation with -flto and -O3 (#1294) --- c_runtime/Makefile.test | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/c_runtime/Makefile.test b/c_runtime/Makefile.test index a6e548300..e9155d47f 100644 --- a/c_runtime/Makefile.test +++ b/c_runtime/Makefile.test @@ -1,16 +1,19 @@ +FLAGS = -flto -O3 +//FLAGS = -g + all: bosatsu_runtime.o test_out bosatsu_ext_Bosatsu_l_Predef.o bosatsu_ext_Bosatsu_l_Prog.o bosatsu_runtime.o: bosatsu_runtime.h bosatsu_runtime.c bosatsu_decls_generated.h bosatsu_generated.h - gcc -g -c -Wall -Werror bosatsu_runtime.c + gcc $(FLAGS) -c -Wall -Werror bosatsu_runtime.c bosatsu_ext_Bosatsu_l_Predef.o: bosatsu_ext_Bosatsu_l_Predef.c bosatsu_runtime.o - gcc -g -Wall -Werror -c bosatsu_ext_Bosatsu_l_Predef.c + gcc $(FLAGS) -Wall -Werror -c bosatsu_ext_Bosatsu_l_Predef.c bosatsu_ext_Bosatsu_l_Prog.o: bosatsu_ext_Bosatsu_l_Prog.c bosatsu_runtime.o - gcc -g -Wall -Werror -c bosatsu_ext_Bosatsu_l_Prog.c + gcc $(FLAGS) -Wall -Werror -c bosatsu_ext_Bosatsu_l_Prog.c test_exe: output.c bosatsu_runtime.o bosatsu_ext_Bosatsu_l_Prog.o bosatsu_ext_Bosatsu_l_Predef.o - gcc -g -o test_exe output.c bosatsu_runtime.o bosatsu_ext_Bosatsu_l_Prog.o bosatsu_ext_Bosatsu_l_Predef.o + gcc $(FLAGS) -o test_exe output.c bosatsu_runtime.o bosatsu_ext_Bosatsu_l_Prog.o bosatsu_ext_Bosatsu_l_Predef.o test_out: test_exe ./test_exe > output.log 2>&1 || { cat output.log; rm -f output.log; false; }