Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Makefile.linux-arm64.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# BEGIN PLATFORM CONFIG FOR LINUX ARM64
# see https://stackoverflow.com/questions/35116327/when-g-static-link-pthread-cause-segmentation-fault-why
CXX = aarch64-linux-gnu-g++
CXXFLAGS += -pthread
LDFLAGS = -static -static-libstdc++ -static-libgcc -lrt -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -s
CXXFLAGS += -pthread -flto
LDFLAGS = -static -static-libstdc++ -static-libgcc -lrt -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -s -flto
# END PLATFORM CONFIG FOR LINUX ARM64

include Makefile
4 changes: 2 additions & 2 deletions src/Makefile.linux-x86.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# BEGIN PLATFORM CONFIG FOR LINUX X86
# see https://stackoverflow.com/questions/35116327/when-g-static-link-pthread-cause-segmentation-fault-why
CXX = x86_64-linux-gnu-g++
CXXFLAGS += -pthread
LDFLAGS = -static -static-libstdc++ -static-libgcc -lrt -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -s
CXXFLAGS += -pthread -flto
LDFLAGS = -static -static-libstdc++ -static-libgcc -lrt -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -s -flto
# END PLATFORM CONFIG FOR LINUX X86

include Makefile
4 changes: 2 additions & 2 deletions src/Makefile.macos-arm64.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# BEGIN PLATFORM CONFIG FOR MAC OS ARM64
CXX = clang++
CXXFLAGS = -target arm64-apple-macos14
LDFLAGS = -target arm64-apple-macos14
CXXFLAGS = -target arm64-apple-macos14 -flto=thin
LDFLAGS = -target arm64-apple-macos14 -flto=thin
# END PLATFORM CONFIG FOR MAC OS ARM64

include Makefile
4 changes: 2 additions & 2 deletions src/Makefile.macos-x86.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# BEGIN PLATFORM CONFIG FOR MAC OS X86
CXX = clang++
CXXFLAGS = -target x86_64-apple-macos14
LDFLAGS = -target x86_64-apple-macos14
CXXFLAGS = -target x86_64-apple-macos14 -flto=thin
LDFLAGS = -target x86_64-apple-macos14 -flto=thin
# END PLATFORM CONFIG FOR MAC OS X86

include Makefile
5 changes: 3 additions & 2 deletions src/Makefile.windows.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CXXFLAGS = /I. /O2 /std:c++17
CXXFLAGS = /I. /std:c++17 /O2 /GL
LDFLAGS = /link /LTCG

!IFDEF LODA_VERSION
CXXFLAGS = $(CXXFLAGS) /DLODA_VERSION=$(LODA_VERSION)
Expand All @@ -21,7 +22,7 @@ SRCS = base/uid.cpp \
sys/csv.cpp sys/file.cpp sys/git.cpp sys/jute.cpp sys/log.cpp sys/metrics.cpp sys/process.cpp sys/setup.cpp sys/util.cpp sys/web_client.cpp

loda: $(SRCS)
cl /EHsc /Feloda.exe $(CXXFLAGS) $(SRCS)
cl /EHsc /Feloda.exe $(CXXFLAGS) $(SRCS) $(LDFLAGS)
copy loda.exe ..

clean:
Expand Down