From de7ca018f6e93c0506a3bec7b03cc3e760aaf67e Mon Sep 17 00:00:00 2001 From: Ali <> Date: Tue, 13 Oct 2020 00:08:57 +0400 Subject: [PATCH] Use -Osize --- Makefile | 3 ++- Utils.makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8446eaaec7..b3aeeafa42 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,8 @@ BAZEL_DEBUG_FLAGS=\ --swiftcopt=-j${CORE_COUNT_MINUS_ONE} \ BAZEL_OPT_FLAGS=\ - --swiftcopt=-whole-module-optimization \ + --features=swift.opt_uses_wmo \ + --features=swift.opt_uses_osize \ --swiftcopt='-num-threads' --swiftcopt='16' \ --objc_enable_binary_stripping \ -s \ diff --git a/Utils.makefile b/Utils.makefile index 30dabc7c73..2613b135f6 100644 --- a/Utils.makefile +++ b/Utils.makefile @@ -8,7 +8,7 @@ export BUCK_DEBUG_OPTIONS=\ export BUCK_RELEASE_OPTIONS=\ --config custom.other_cflags="-Os" \ --config custom.other_cxxflags="-Os" \ - --config custom.optimization="-O" \ + --config custom.optimization="-Osize" \ --config custom.config_swift_compiler_flags="-whole-module-optimization" export BUCK_THREADS_OPTIONS=--config build.threads=$(shell sysctl -n hw.logicalcpu)