[Lldb-commits] [lldb] r237118 - Disable GCC optimizations for builtin functions in lldb tests

Ilia K ki.stfu at gmail.com
Tue May 12 05:13:12 PDT 2015


Author: ki.stfu
Date: Tue May 12 07:13:12 2015
New Revision: 237118

URL: http://llvm.org/viewvc/llvm-project?rev=237118&view=rev
Log:
Disable GCC optimizations for builtin functions in lldb tests

This patch adds new default flag -fno-builtin which forces gcc to not optimize builtin functions.
For example, without this flag GCC replaces printf("hello\n") -> puts("hello") even if -O0 was specified

Also this patch fixes the MiDataTestCase.test_lldbmi_data_disassemble test on Linux/gcc.


Modified:
    lldb/trunk/test/make/Makefile.rules

Modified: lldb/trunk/test/make/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=237118&r1=237117&r2=237118&view=diff
==============================================================================
--- lldb/trunk/test/make/Makefile.rules (original)
+++ lldb/trunk/test/make/Makefile.rules Tue May 12 07:13:12 2015
@@ -128,7 +128,7 @@ else
 	endif
 endif
 
-CFLAGS ?= -g -O0
+CFLAGS ?= -g -O0 -fno-builtin
 ifeq "$(OS)" "Darwin"
 	CFLAGS += $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(CFLAGS_EXTRAS) -I$(LLDB_BASE_DIR)include
 else





More information about the lldb-commits mailing list