Closed zqqw closed 3 years ago
LTO will soon be default in Arch builds. Testing it, this new compiler option works fine with Pakku, Nim has supported it for a long while.
diff --git a/Makefile b/Makefile index 04ce4cb..f3049bb 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,8 @@ NIM_OPTIMIZE = size NIM_CACHE_DIR = nimcache NIM_OPTIONS = \ + --passC:"-flto" \ + --passL:"-flto" \ --putenv:'PROG_VERSION'="${RVERSION}" \ --putenv:'PROG_COPYRIGHT'="${COPYRIGHT}" \ --putenv:'PROG_PKGLIBDIR'="${PKGLIBDIR}" \ Result, a smaller binary: Total Installed Size: 0.74 MiB Net Upgrade Size: -0.12 MiB
It works! No problems, just in case anyone wondered about this.
LTO will soon be default in Arch builds. Testing it, this new compiler option works fine with Pakku, Nim has supported it for a long while.