mirror of https://github.com/bjornbytes/lovr.git
tup: platform-specific gc sections;
This commit is contained in:
parent
832274edb6
commit
7bc3bc232e
|
@ -25,7 +25,6 @@ FLAGS_@(DEBUG) += -g
|
||||||
FLAGS_@(OPTIMIZE) += -Oz
|
FLAGS_@(OPTIMIZE) += -Oz
|
||||||
FLAGS_@(SANITIZE) += -fsanitize=address,undefined
|
FLAGS_@(SANITIZE) += -fsanitize=address,undefined
|
||||||
CFLAGS_@(OPTIMIZE) += -fdata-sections -ffunction-sections
|
CFLAGS_@(OPTIMIZE) += -fdata-sections -ffunction-sections
|
||||||
LDFLAGS_@(OPTIMIZE) += -Wl,--gc-sections
|
|
||||||
ifneq (@(DEBUG),y)
|
ifneq (@(DEBUG),y)
|
||||||
LDFLAGS += -Wl,-s
|
LDFLAGS += -Wl,-s
|
||||||
endif
|
endif
|
||||||
|
@ -72,6 +71,7 @@ ifeq ($(PLATFORM),win32)
|
||||||
CFLAGS += -D_CRT_SECURE_NO_WARNINGS
|
CFLAGS += -D_CRT_SECURE_NO_WARNINGS
|
||||||
CFLAGS += -Wno-language-extension-token
|
CFLAGS += -Wno-language-extension-token
|
||||||
LDFLAGS += -lShell32 -lOle32
|
LDFLAGS += -lShell32 -lOle32
|
||||||
|
LDFLAGS_@(OPTIMIZE) += -Wl,--gc-sections
|
||||||
EXTRAS += bin/lovr.lib bin/lovr.exp
|
EXTRAS += bin/lovr.lib bin/lovr.exp
|
||||||
EXTRAS_@(DEBUG) += bin/lovr.pdb bin/lovr.ilk
|
EXTRAS_@(DEBUG) += bin/lovr.pdb bin/lovr.ilk
|
||||||
endif
|
endif
|
||||||
|
@ -83,6 +83,7 @@ ifeq ($(PLATFORM),linux)
|
||||||
CFLAGS += -DLOVR_GL
|
CFLAGS += -DLOVR_GL
|
||||||
LDFLAGS += -lm -lpthread -ldl
|
LDFLAGS += -lm -lpthread -ldl
|
||||||
LDFLAGS += -Wl,-rpath,\$ORIGIN
|
LDFLAGS += -Wl,-rpath,\$ORIGIN
|
||||||
|
LDFLAGS_@(OPTIMIZE) += -Wl,--gc-sections
|
||||||
endif
|
endif
|
||||||
|
|
||||||
## macOS
|
## macOS
|
||||||
|
@ -91,6 +92,7 @@ ifeq ($(PLATFORM),macosx)
|
||||||
PLATFORM = macos
|
PLATFORM = macos
|
||||||
CFLAGS += -DLOVR_GL
|
CFLAGS += -DLOVR_GL
|
||||||
LDFLAGS += -Wl,-rpath,@executable_path
|
LDFLAGS += -Wl,-rpath,@executable_path
|
||||||
|
LDFLAGS_@(OPTIMIZE) += -Wl,-dead_strip
|
||||||
LDFLAGS += -lobjc
|
LDFLAGS += -lobjc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -117,6 +119,7 @@ ifeq ($(PLATFORM),android)
|
||||||
FLAGS += --target=aarch64-linux-android@(ANDROID_VERSION)
|
FLAGS += --target=aarch64-linux-android@(ANDROID_VERSION)
|
||||||
FLAGS_@(DEBUG) += -funwind-tables
|
FLAGS_@(DEBUG) += -funwind-tables
|
||||||
LDFLAGS += -shared -landroid -lEGL -lGLESv3
|
LDFLAGS += -shared -landroid -lEGL -lGLESv3
|
||||||
|
LDFLAGS_@(OPTIMIZE) += -Wl,--gc-sections
|
||||||
|
|
||||||
ACTIVITY_@(OPENXR) = Activity_openxr
|
ACTIVITY_@(OPENXR) = Activity_openxr
|
||||||
ACTIVITY_@(VRAPI) = Activity_vrapi
|
ACTIVITY_@(VRAPI) = Activity_vrapi
|
||||||
|
|
Loading…
Reference in New Issue