diff options
Diffstat (limited to 'platform/android/detect.py')
| -rw-r--r-- | platform/android/detect.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py index ad63821162..a31bba745f 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -132,6 +132,19 @@ def configure(env): env.Append(CPPDEFINES=["_DEBUG"]) env.Append(CPPFLAGS=["-UNDEBUG"]) + # LTO + + if env["lto"] == "auto": # LTO benefits for Android (size, performance) haven't been clearly established yet. + env["lto"] = "none" + + if env["lto"] != "none": + if env["lto"] == "thin": + env.Append(CCFLAGS=["-flto=thin"]) + env.Append(LINKFLAGS=["-flto=thin"]) + else: + env.Append(CCFLAGS=["-flto"]) + env.Append(LINKFLAGS=["-flto"]) + # Compiler configuration env["SHLIBSUFFIX"] = ".so" |