From 86c1b5ff8f66747a3d4cebe6e2e0d1892db9ba9a Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Thu, 11 Apr 2019 21:17:43 +0200 Subject: graphite: Force optimization on Android. The Pass.cpp triggers an infinite loop in clang when not optimizing (ie. with the debugging buildls), at least with this version: > ~/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --version Android (5058415 based on r339409) clang version 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec746213857d083c0e8b0abb568790) (https://android.googlesource.com/toolchain/llvm 7a6618d69e7e8111e1d49dc9e7813767c5ca756a) (based on LLVM 8.0.2svn) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /local/home/kendy/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin Change-Id: Ib4984f8838fc733be6da4e24eb10915d3efbf79e --- external/graphite/StaticLibrary_graphite.mk | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'external') diff --git a/external/graphite/StaticLibrary_graphite.mk b/external/graphite/StaticLibrary_graphite.mk index 9eeff041dc28..a8f8bce7cc6f 100644 --- a/external/graphite/StaticLibrary_graphite.mk +++ b/external/graphite/StaticLibrary_graphite.mk @@ -32,6 +32,15 @@ $(eval $(call gb_StaticLibrary_add_cxxflags,graphite,\ endif endif +ifeq ($(OS),ANDROID) +# Force optimizations on Android, because otherwise Pass.cpp triggers an +# infinite loop in clang, at least in this version: +# Android (5058415 based on r339409) clang version 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec746213857d083c0e8b0abb568790) (https://android.googlesource.com/toolchain/llvm 7a6618d69e7e8111e1d49dc9e7813767c5ca756a) (based on LLVM 8.0.2svn) +$(eval $(call gb_StaticLibrary_add_cxxflags,graphite,\ + -Os \ +)) +endif + $(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,graphite,cpp)) $(eval $(call gb_StaticLibrary_add_generated_exception_objects,graphite,\ -- cgit