From 44fe7554c8ef813efde3ea7cc0063dd0ac219259 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Wed, 18 Mar 2015 17:18:20 -0700 Subject: [PATCH] Remove special x86 flag that disables tail call optimization. Clang's tail call optimization for position independent code only works when the callee was called (bound in GOT) before the jump through GOT. It does not work for some lazy bound Android tail callee. We used special flag to disable all tail call optimization. This change removes that global flag and depends on clang compiler fix from upstream or the temporary patch in https://android-review.googlesource.com/#/c/142241 See proposed llvm changes and pointers to llvm bugs in https://android-review.googlesource.com/#/c/142792 Change-Id: Idb6e98d6b5f0e4c3676884b69eb3e767eba2491a --- core/clang/TARGET_x86.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/clang/TARGET_x86.mk b/core/clang/TARGET_x86.mk index 3ba34ae79..bbbe6f13e 100644 --- a/core/clang/TARGET_x86.mk +++ b/core/clang/TARGET_x86.mk @@ -19,11 +19,8 @@ CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS := \ $(CLANG_CONFIG_TARGET_EXTRA_CFLAGS) \ $(CLANG_CONFIG_x86_EXTRA_CFLAGS) \ $(CLANG_CONFIG_x86_TARGET_EXTRA_ASFLAGS) \ - -fno-optimize-sibling-calls \ -mstackrealign -# http://llvm.org/bugs/show_bug.cgi?id=15086, -# llvm tail call optimization is wrong for x86. # -mstackrealign is needed to realign stack in native code # that could be called from JNI, so that movaps instruction # will work on assumed stack aligned local variables.