Makefile.rules: compile all tests with -fno-limit-debug-info

Summary:
This flag is on by default for darwin and freebsd, but off for linux.
Without it, clang will sometimes not emit debug info for types like
std::string. Whether it does this, and which tests will fail because of
that depends on the linux distro and c++ library version.

A bunch of tests were already setting these flags manually, but here
instead I take a whole sale approach and enable this flag for all tests.
Any test which does not want to have this flag (right now we have one
such test) can turn it off explicitly via
CFLAGS_EXTRAS+=$(LIMIT_DEBUG_INFO_FLAGS)

This fixes a bunch of data formatter tests on red-hat.

Reviewers: davide, jankratochvil

Subscribers: emaste, aprantl, krytarowski, JDevlieghere, lldb-commits

Differential Revision: https://reviews.llvm.org/D40717

llvm-svn: 319653
This commit is contained in:
Pavel Labath 2017-12-04 13:31:56 +00:00
parent d0d43e6f14
commit fd9a526a30
23 changed files with 2 additions and 132 deletions

View File

@ -2,11 +2,4 @@ LEVEL = ../../make
CXX_SOURCES := main.cpp
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -2,13 +2,6 @@ LEVEL = ../../make
CXX_SOURCES := main.cpp
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules
clean::

View File

@ -2,11 +2,4 @@ LEVEL = ../../make
CXX_SOURCES := main.cpp
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -3,13 +3,6 @@ LEVEL = ../../../make
CXX_SOURCES := main.cpp
USE_LIBSTDCPP := 0
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules
CXXFLAGS += -O0

View File

@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp
CFLAGS_EXTRAS += -O0
USE_LIBSTDCPP := 1
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp
CFLAGS_EXTRAS += -O0
USE_LIBSTDCPP := 1
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -4,11 +4,4 @@ CXX_SOURCES := main.cpp
USE_LIBSTDCPP := 1
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp
CXXFLAGS := -O0
USE_LIBSTDCPP := 1
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp
CFLAGS_EXTRAS += -O0
USE_LIBSTDCPP := 1
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -3,6 +3,5 @@ LEVEL = ../../../../../make
CXX_SOURCES := main.cpp
USE_LIBSTDCPP := 1
CFLAGS_EXTRAS += $(NO_LIMIT_DEBUG_INFO_FLAGS)
include $(LEVEL)/Makefile.rules

View File

@ -3,6 +3,5 @@ LEVEL = ../../../../../make
CXX_SOURCES := main.cpp
USE_LIBSTDCPP := 1
CFLAGS_EXTRAS += $(NO_LIMIT_DEBUG_INFO_FLAGS)
include $(LEVEL)/Makefile.rules

View File

@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp
CXXFLAGS := -O0
USE_LIBSTDCPP := 1
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -2,11 +2,4 @@ LEVEL = ../../../make
CXX_SOURCES := main.cpp
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -2,11 +2,4 @@ LEVEL = ../../../make
CXX_SOURCES := main.cpp
CXXFLAGS += -std=c++11
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -2,11 +2,4 @@ LEVEL = ../../../make
CXX_SOURCES := main.cpp
CXXFLAGS += -std=c++11
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -2,11 +2,4 @@ LEVEL = ../../../make
CXX_SOURCES := main.cpp
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -2,10 +2,4 @@ LEVEL = ../../../make
CXX_SOURCES := main.cpp
# Workaround for llvm.org/pr16214: clang doesn't emit structure definition DWARF
# information without the flag below.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -2,11 +2,4 @@ LEVEL = ../../make
CXX_SOURCES := main.cpp
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -2,6 +2,4 @@ LEVEL = ../../../make
CXX_SOURCES := main.cpp
CFLAGS_EXTRAS += $(NO_LIMIT_DEBUG_INFO_FLAGS)
include $(LEVEL)/Makefile.rules

View File

@ -5,11 +5,4 @@ CFLAGS := -g -O0
clean: OBJECTS+=$(wildcard main.d.*)
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules

View File

@ -2,6 +2,4 @@ LEVEL = ../../../make
CXX_SOURCES := main.cpp
CFLAGS_EXTRAS += $(NO_LIMIT_DEBUG_INFO_FLAGS)
include $(LEVEL)/Makefile.rules

View File

@ -223,7 +223,8 @@ else
CFLAGS += $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) -I$(LLDB_BASE_DIR)include
endif
CFLAGS += -include $(THIS_FILE_DIR)test_common.h -I$(THIS_FILE_DIR) $(ARCH_CFLAGS) $(CFLAGS_EXTRAS)
CFLAGS += -include $(THIS_FILE_DIR)test_common.h -I$(THIS_FILE_DIR)
CFLAGS += $(NO_LIMIT_DEBUG_INFO_FLAGS) $(ARCH_CFLAGS) $(CFLAGS_EXTRAS)
# Use this one if you want to build one part of the result without debug information:
ifeq "$(OS)" "Darwin"

View File

@ -5,11 +5,4 @@ CXX_SOURCES := main.cpp
# Clean renamed executable on 'make clean'
clean: OBJECTS+=no_synth
# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
# targets. Other targets do not, which causes this test to fail.
# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules