summaryrefslogtreecommitdiffstats
path: root/contrib/x265_8bit
diff options
context:
space:
mode:
authorNomis101 <[email protected]>2020-01-15 02:09:26 +0100
committerBradley Sepos <[email protected]>2020-01-16 21:31:45 -0500
commit2a64670a88521b33fcad02b8ab5752a7d0c60e0c (patch)
tree38a8ac525899237f87630d8b26b5d8e578708419 /contrib/x265_8bit
parentbcbba45e498428ada540fa52482c5c497407d6eb (diff)
contrib: Allow optimizing x265 with -Oz via --optimize=size-aggressive.
Additionally reduces file size 4.5%.
Diffstat (limited to 'contrib/x265_8bit')
-rw-r--r--contrib/x265_8bit/module.defs14
1 files changed, 11 insertions, 3 deletions
diff --git a/contrib/x265_8bit/module.defs b/contrib/x265_8bit/module.defs
index 743d54250..efe77cbe4 100644
--- a/contrib/x265_8bit/module.defs
+++ b/contrib/x265_8bit/module.defs
@@ -20,10 +20,18 @@ ifneq (1,$(FEATURE.numa))
X265_8.CONFIGURE.extra += -DENABLE_LIBNUMA=OFF
endif
-ifneq (none,$(X265_8.GCC.g))
- X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug
+ifeq (size-aggressive,$(GCC.O))
+ X265_8.CONFIGURE.extra += -DCMAKE_CXX_FLAGS_MINSIZEREL="-Oz -DNDEBUG" -DCMAKE_C_FLAGS_MINSIZEREL="-Oz -DNDEBUG"
+endif
+
+ifeq ($(GCC.O),$(filter $(GCC.O),size size-aggressive))
+ X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=MinSizeRel
else
- X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Release
+ ifneq (none,$(X265_8.GCC.g))
+ X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Debug
+ else
+ X265_8.CONFIGURE.extra += -DCMAKE_BUILD_TYPE=Release
+ endif
endif
ifeq (1,$(HOST.cross))