diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-04 00:03:07 +0200 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-01-04 00:03:07 +0200 |
commit | 28c1822ec742ea0d469a3631115ed68507c1179e (patch) | |
tree | 522c0b300758394ff5e8b44e7286e722bf201ddc | |
parent | 8f7b4d8c4f64bc648c1793c5fd957af43631a994 (diff) | |
download | ejit-28c1822ec742ea0d469a3631115ed68507c1179e.tar.gz ejit-28c1822ec742ea0d469a3631115ed68507c1179e.zip |
add LTO compilation flag
-rw-r--r-- | scripts/makefile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/makefile b/scripts/makefile index c1de16e..0b4f42b 100644 --- a/scripts/makefile +++ b/scripts/makefile @@ -4,6 +4,10 @@ OPTFLAGS != [ "$(RELEASE)" != "0" ] \ && echo "-O2" \ || echo "-O0" +LTO ?= 0 +LTOFLAGS != [ "$(LTO)" != "0" ] \ + && echo "-flto=auto" + DEBUG ?= 1 DEBUGFLAGS != [ "$(DEBUG)" != "0" ] \ && echo "-DDEBUG=1" \ @@ -34,8 +38,8 @@ OBFLAGS := -g # interpreter is allowed to have uninitialized values WARNFLAGS := -Wall -Wextra -Wno-maybe-uninitialized -COMPILE_FLAGS := $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(OBFLAGS) $(ASSERTFLAGS) \ - $(DEBUGFLAGS) +COMPILE_FLAGS := $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(LTOFLAGS) \ + $(OBFLAGS) $(ASSERTFLAGS) $(DEBUGFLAGS) INCLUDE_FLAGS := -I include |