Skip to content

Commit

Permalink
Tweaks (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberjunk authored Jun 9, 2024
1 parent 4fceaf0 commit 36a8ef9
Show file tree
Hide file tree
Showing 48 changed files with 292 additions and 115 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-12,macos-13,macos-14]
arch: [arm64]
arch: [arm64, x64]
cpurev: [default]
steps:

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

# Upgrade LLVM
- name: Upgrade LLVM
run: choco upgrade llvm -y

# Developer Console (X64)
- name: MSVC Developer Console (X64)
if: matrix.arch == 'x64'
Expand Down
2 changes: 1 addition & 1 deletion build/make/CppCore.Debug.mk
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ OUTDIST := $(DISTDIR)/$(NAME)-$(TARGET_ARCH)/usr/bin/$(NAME)$(EXTBIN)
DEFINES := $(DEFINES)
CXXFLAGS := $(CXXFLAGS)
CFLAGS := $(CFLAGS)
LINKFLAGS := $(LINKFLAGS)
LINKFLAGS := $(LINKFLAGS) -static-libstdc++ -static-libgcc
LINKLIBS := $(LINKLIBS) -lpthread
RESO := $(RESO)
endif
Expand Down
2 changes: 1 addition & 1 deletion build/make/CppCore.Example.Client.mk
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ OUTDIST := $(DISTDIR)/$(NAME)-$(TARGET_ARCH)/usr/bin/$(NAME)$(EXTBIN)
DEFINES := $(DEFINES)
CXXFLAGS := $(CXXFLAGS)
CFLAGS := $(CFLAGS)
LINKFLAGS := $(LINKFLAGS)
LINKFLAGS := $(LINKFLAGS) -static-libstdc++ -static-libgcc
LINKLIBS := $(LINKLIBS) -lpthread
RESO := $(RESO)
endif
Expand Down
2 changes: 1 addition & 1 deletion build/make/CppCore.Example.Server.mk
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ OUTDIST := $(DISTDIR)/$(NAME)-$(TARGET_ARCH)/usr/bin/$(NAME)$(EXTBIN)
DEFINES := $(DEFINES)
CXXFLAGS := $(CXXFLAGS)
CFLAGS := $(CFLAGS)
LINKFLAGS := $(LINKFLAGS)
LINKFLAGS := $(LINKFLAGS) -static-libstdc++ -static-libgcc
LINKLIBS := $(LINKLIBS) -lpthread
RESO := $(RESO)
endif
Expand Down
2 changes: 1 addition & 1 deletion build/make/CppCore.Example.UI.mk
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ OUTDIST := $(DISTDIR)/$(NAME)-$(TARGET_ARCH)/usr/bin/$(NAME)$(EXTBIN)
DEFINES := $(DEFINES)
CXXFLAGS := $(CXXFLAGS)
CFLAGS := $(CFLAGS)
LINKFLAGS := $(LINKFLAGS)
LINKFLAGS := $(LINKFLAGS) -static-libstdc++ -static-libgcc
LINKLIBS := $(LINKLIBS) -lpthread -lX11
RESO := $(RESO)
endif
Expand Down
42 changes: 30 additions & 12 deletions build/make/CppCore.Interface.C.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ INCLUDES := $(INCLUDES) \
-I$(INCDIR) \
-I$(SRCDIR)
CXXFLAGS := $(CXXFLAGS) \
-std=c++17 \
-std=c++17 \
-fno-builtin \
-fvisibility=hidden \
-fno-exceptions \
-fno-unwind-tables \
-fno-asynchronous-unwind-tables \
-mno-stack-arg-probe \
-fno-stack-protector \
-fno-stack-check
LINKFLAGS := $(LINKFLAGS) -shared
LINKFLAGS := $(LINKFLAGS) -shared -fno-builtin
LINKPATH := $(LINKPATH)
LINKLIBS := $(LINKLIBS)
OBJS = cppcore.o
Expand Down Expand Up @@ -57,10 +62,13 @@ DEFINES := $(DEFINES)
INCLUDES := $(INCLUDES)
CXXFLAGS := $(CXXFLAGS)
LINKFLAGS := $(LINKFLAGS) \
-nostdlib \
-Xlinker /SAFESEH:NO \
-Xlinker /ENTRY:DllMain \
-Xlinker /SUBSYSTEM:CONSOLE",10.00" \
-Xlinker /PDBALTPATH:$(LIBNAME)$(SUFFIX)$(EXTPDB) \
-DLL
LINKLIBS := $(LINKLIBS)
LINKLIBS := $(LINKLIBS) -lUCRT -lMSVCRT
RESO := $(RESO) resources.res
ifeq ($(TARGET_ARCH),x86)
DEFINES := $(DEFINES)
Expand All @@ -79,17 +87,19 @@ endif
ifeq ($(TARGET_OS),osx)
DEFINES := $(DEFINES)
INCLUDES := $(INCLUDES)
CXXFLAGS := $(CXXFLAGS) -fno-builtin
CXXFLAGS := $(CXXFLAGS)
LINKFLAGS := $(LINKFLAGS) \
-fno-builtin \
-dynamiclib \
-nostdlib \
-lSystem \
-current_version $(VERSION3) \
-compatibility_version $(VERSION2) \
-install_name $(LIBNAME)$(EXTDLL) \
-Wl,-object_path_lto,$(OBJDIR)/lto.o
LINKLIBS := $(LINKLIBS)
-Wl,-object_path_lto,$(OBJDIR)/lto.o \
-Wl,-no_data_in_code_info \
-Wl,-no_function_starts \
-Wl,-no_keep_dwarf_unwind \
-Wl,-no_compact_unwind
LINKLIBS := $(LINKLIBS) -lSystem
RESO := $(RESO)
ifeq ($(TARGET_ARCH),x86)
DEFINES := $(DEFINES)
Expand All @@ -110,8 +120,10 @@ ifeq ($(TARGET_OS),linux)
DEFINES := $(DEFINES)
INCLUDES := $(INCLUDES)
CXXFLAGS := $(CXXFLAGS)
LINKFLAGS := $(LINKFLAGS)
LINKLIBS := $(LINKLIBS)
LINKFLAGS := $(LINKFLAGS) \
-nostdlib \
-Wl,--no-eh-frame-hdr
LINKLIBS := $(LINKLIBS) -lc
RESO := $(RESO)
ifeq ($(TARGET_ARCH),x86)
DEFINES := $(DEFINES)
Expand Down Expand Up @@ -152,8 +164,14 @@ DEFINES := $(DEFINES)
CXXFLAGS := $(CXXFLAGS)
LINKFLAGS := $(LINKFLAGS) \
-dynamiclib \
-install_name @rpath/$(LIBNAME)$(EXTDLL)
LINKLIBS := $(LINKLIBS)
-nostdlib \
-install_name @rpath/$(LIBNAME)$(EXTDLL) \
-Wl,-object_path_lto,$(OBJDIR)/lto.o \
-Wl,-no_data_in_code_info \
-Wl,-no_function_starts \
-Wl,-no_keep_dwarf_unwind \
-Wl,-no_compact_unwind
LINKLIBS := $(LINKLIBS) -lSystem
RESO := $(RESO)
ifeq ($(TARGET_ARCH),x86)
DEFINES := $(DEFINES)
Expand Down
1 change: 1 addition & 0 deletions build/make/bin/ios-x64/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 1 addition & 0 deletions build/make/lib/ios-x64/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 1 addition & 0 deletions build/make/obj/ios-x64-debug/CppCore.Debug/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 1 addition & 0 deletions build/make/obj/ios-x64-debug/CppCore.Example.UI/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 1 addition & 0 deletions build/make/obj/ios-x64-debug/CppCore.Test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 1 addition & 0 deletions build/make/obj/ios-x64-release/CppCore.Debug/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
1 change: 1 addition & 0 deletions build/make/obj/ios-x64-release/CppCore.Test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
2 changes: 2 additions & 0 deletions build/make/platforms/dist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ lib-dist: dist-prep lib-dist-x64 lib-dist-arm64
$(DISTDIR)/$(NAME)/$(LIBNAME)$(EXTDLL)
@echo [INF] $(LIBNAME).dSYM
@dwarfdump --uuid $(DISTDIR)/$(NAME)/$(LIBNAME).dSYM
@echo [STR] $(LIBNAME)$(EXTDLL)
@$(STRIP) $(STRIPFLAGS) $(DISTDIR)/$(NAME)/$(LIBNAME)$(EXTDLL)
@echo [SIG] $(LIBNAME)$(EXTDLL)
@codesign --verbose \
--sign "$(PUBLISHERCN)" \
Expand Down
6 changes: 3 additions & 3 deletions build/make/platforms/linux-all-linux-arm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARFLAGS = rcs
STRIP = llvm-strip
STRIPFLAGS = --strip-all
LINK = $(CXX)
LINKFLAGS = -target $(TARGET) -fuse-ld=lld -static-libstdc++ -static-libgcc -fno-strict-aliasing
LINKFLAGS = -target $(TARGET) -fuse-ld=lld -fno-strict-aliasing
LINKPATH =
LINKLIBS =
DEBARCH = armhf
Expand All @@ -39,8 +39,8 @@ endif
# Debug vs. Release
ifeq ($(MODE),release)
DEFINES := $(DEFINES) -DNDEBUG
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
LINKFLAGS := $(LINKFLAGS) -flto=thin -O3 -g -Wl,--gc-sections -Wl,--as-needed -fomit-frame-pointer
else
DEFINES := $(DEFINES) -D_DEBUG
Expand Down
6 changes: 3 additions & 3 deletions build/make/platforms/linux-all-linux-arm64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARFLAGS = rcs
STRIP = llvm-strip
STRIPFLAGS = --strip-all
LINK = $(CXX)
LINKFLAGS = -target $(TARGET) -fuse-ld=lld -static-libstdc++ -static-libgcc -fno-strict-aliasing
LINKFLAGS = -target $(TARGET) -fuse-ld=lld -fno-strict-aliasing
LINKPATH =
LINKLIBS =
DEBARCH = arm64
Expand All @@ -39,8 +39,8 @@ endif
# Debug vs. Release
ifeq ($(MODE),release)
DEFINES := $(DEFINES) -DNDEBUG
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
LINKFLAGS := $(LINKFLAGS) -flto=thin -O3 -g -Wl,--gc-sections -Wl,--as-needed -fomit-frame-pointer
else
DEFINES := $(DEFINES) -D_DEBUG
Expand Down
6 changes: 3 additions & 3 deletions build/make/platforms/linux-all-linux-x64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARFLAGS = rcs
STRIP = llvm-strip
STRIPFLAGS = --strip-all
LINK = $(CXX)
LINKFLAGS = -target $(TARGET) -fuse-ld=lld -static-libstdc++ -static-libgcc -fno-strict-aliasing
LINKFLAGS = -target $(TARGET) -fuse-ld=lld -fno-strict-aliasing
LINKPATH =
LINKLIBS =
DEBARCH = amd64
Expand Down Expand Up @@ -52,8 +52,8 @@ endif
# Debug vs. Release
ifeq ($(MODE),release)
DEFINES := $(DEFINES) -DNDEBUG
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
LINKFLAGS := $(LINKFLAGS) -flto=thin -O3 -g -Wl,--gc-sections -Wl,--as-needed -fomit-frame-pointer
else
DEFINES := $(DEFINES) -D_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion build/make/platforms/linux-all-linux-x86.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARFLAGS = rcs
STRIP = llvm-strip
STRIPFLAGS = --strip-all
LINK = $(CXX)
LINKFLAGS = -target $(TARGET) -fuse-ld=lld -static-libstdc++ -static-libgcc -fno-strict-aliasing
LINKFLAGS = -target $(TARGET) -fuse-ld=lld -fno-strict-aliasing
LINKPATH =
LINKLIBS =
DEBARCH = i386
Expand Down
4 changes: 2 additions & 2 deletions build/make/platforms/osx-all-ios-arm64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ endif
# Debug vs. Release
ifeq ($(MODE),release)
DEFINES := $(DEFINES) -DNDEBUG
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
LINKFLAGS := $(LINKFLAGS) -flto=thin -O3 -g -dead_strip -dead_strip_dylibs -fomit-frame-pointer
else
DEFINES := $(DEFINES) -D_DEBUG
Expand Down
40 changes: 40 additions & 0 deletions build/make/platforms/osx-all-ios-x64.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Generic
EXTBIN =
EXTLIB = .a
EXTDLL = .dylib
EXTPDB = .pdb
OBJDIR = obj/ios-x64-$(MODE)
LIBDIR = lib/ios-x64
BINDIR = bin/ios-x64
DISTDIR = ../../dist/ios-13.0
TARGET = x86_64-apple-ios13.0-simulator
MINVER = -miphoneos-version-min=13.0
CPUFLAGS = -march=x86-64-v2 -mtune=generic -mpclmul
SDKROOT = $(shell xcrun --sdk iphonesimulator --show-sdk-path)
DEFINES =
INCLUDES =
CXX = clang++
CXXFLAGS = $(MINVER) -target $(TARGET) -isysroot $(SDKROOT) -static -fno-strict-aliasing
CC = clang
CFLAGS = $(MINVER) -target $(TARGET) -isysroot $(SDKROOT) -static -fno-strict-aliasing
AR = ar
ARFLAGS = rcs
STRIP = strip
STRIPFLAGS = -S
LINK = $(CXX)
LINKFLAGS = $(MINVER) -target $(TARGET) -isysroot $(SDKROOT) -fno-strict-aliasing
LINKPATH =
LINKLIBS =

# Debug vs. Release
ifeq ($(MODE),release)
DEFINES := $(DEFINES) -DNDEBUG
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
LINKFLAGS := $(LINKFLAGS) -flto=thin -O3 -g -dead_strip -dead_strip_dylibs -fomit-frame-pointer
else
DEFINES := $(DEFINES) -D_DEBUG
CXXFLAGS := $(CXXFLAGS) -Og -g3
CFLAGS := $(CFLAGS) -Og -g3
LINKFLAGS := $(LINKFLAGS) -g3
endif
4 changes: 2 additions & 2 deletions build/make/platforms/osx-all-osx-arm64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ endif
# Debug vs. Release
ifeq ($(MODE),release)
DEFINES := $(DEFINES) -DNDEBUG
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
LINKFLAGS := $(LINKFLAGS) -flto=thin -O3 -g -dead_strip -dead_strip_dylibs -fomit-frame-pointer
else
DEFINES := $(DEFINES) -D_DEBUG
Expand Down
4 changes: 2 additions & 2 deletions build/make/platforms/osx-all-osx-x64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ endif
# Debug vs. Release
ifeq ($(MODE),release)
DEFINES := $(DEFINES) -DNDEBUG
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
LINKFLAGS := $(LINKFLAGS) -flto=thin -O3 -g -dead_strip -dead_strip_dylibs -fomit-frame-pointer
else
DEFINES := $(DEFINES) -D_DEBUG
Expand Down
16 changes: 8 additions & 8 deletions build/make/platforms/win-all-win-arm64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ LIBDIR = lib/win-arm64
BINDIR = bin/win-arm64
DISTDIR = ../../dist/win-10
TARGET = aarch64-pc-windows-msvc
DEFINES = -DWIN32 -DWIN64 -D_MT
DEFINES = -DWIN32 -DWIN64
INCLUDES =
CXX = clang++
CXXFLAGS = -target $(TARGET) -static -fno-strict-aliasing
CXXFLAGS = -target $(TARGET) -fno-strict-aliasing
CC = clang
CFLAGS = -target $(TARGET) -static -fno-strict-aliasing
CFLAGS = -target $(TARGET) -fno-strict-aliasing
AR = llvm-ar
ARFLAGS = rcs
STRIP = llvm-strip
Expand Down Expand Up @@ -41,14 +41,14 @@ endif
# Debug vs. Release
ifeq ($(MODE),release)
DEFINES := $(DEFINES) -DNDEBUG
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
LINKFLAGS := $(LINKFLAGS) -flto=thin -O3 -g -o optimized.bc -fomit-frame-pointer -RELEASE \
-Xlinker /OPT:ref \
-Xlinker /OPT:icf \
-Xlinker /OPT:REF \
-Xlinker /OPT:ICF=3 \
-Xlinker /DEBUG:FULL \
-Xlinker /MANIFEST:EMBED
LINKLIBS := $(LINKLIBS) -llibcmt.lib
LINKLIBS := $(LINKLIBS)
else
DEFINES := $(DEFINES) -D_DEBUG
CXXFLAGS := $(CXXFLAGS) -Og -g3 -Xclang -MTd
Expand Down
16 changes: 8 additions & 8 deletions build/make/platforms/win-all-win-x64.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ LIBDIR = lib/win-x64
BINDIR = bin/win-x64
DISTDIR = ../../dist/win-10
TARGET = x86_64-pc-windows-msvc
DEFINES = -DWIN32 -DWIN64 -D_MT
DEFINES = -DWIN32 -DWIN64
INCLUDES =
CXX = clang++
CXXFLAGS = -target $(TARGET) -static -fno-strict-aliasing
CXXFLAGS = -target $(TARGET) -fno-strict-aliasing
CC = clang
CFLAGS = -target $(TARGET) -static -fno-strict-aliasing
CFLAGS = -target $(TARGET) -fno-strict-aliasing
AR = llvm-ar
ARFLAGS = rcs
STRIP = llvm-strip
Expand Down Expand Up @@ -42,14 +42,14 @@ endif
# Debug vs. Release
ifeq ($(MODE),release)
DEFINES := $(DEFINES) -DNDEBUG
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -Xclang -MT
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -Xclang -MT
CXXFLAGS := $(CXXFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
CFLAGS := $(CFLAGS) -flto=thin -O3 -g -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-plt
LINKFLAGS := $(LINKFLAGS) -flto=thin -O3 -g -o optimized.bc -fomit-frame-pointer -RELEASE \
-Xlinker /OPT:ref \
-Xlinker /OPT:icf \
-Xlinker /OPT:REF \
-Xlinker /OPT:ICF=3 \
-Xlinker /DEBUG:FULL \
-Xlinker /MANIFEST:EMBED
LINKLIBS := $(LINKLIBS) -llibcmt.lib
LINKLIBS := $(LINKLIBS)
else
DEFINES := $(DEFINES) -D_DEBUG
CXXFLAGS := $(CXXFLAGS) -Og -g3 -Xclang -MTd
Expand Down
Loading

0 comments on commit 36a8ef9

Please sign in to comment.