diff options
author | Kate Stone <katherine.stone@apple.com> | 2016-04-19 18:20:11 +0000 |
---|---|---|
committer | Kate Stone <katherine.stone@apple.com> | 2016-04-19 18:20:11 +0000 |
commit | 8410ddd8b6738dbd4d983c6d634660e2943f7e48 (patch) | |
tree | 4c92bfedff9ba6ddecf7747a6c74f9a867263bdc /lldb/packages/Python/lldbsuite/test/make | |
parent | 533965c195173714a8a000a465a075672d2c8a8b (diff) | |
download | bcm5719-llvm-8410ddd8b6738dbd4d983c6d634660e2943f7e48.tar.gz bcm5719-llvm-8410ddd8b6738dbd4d983c6d634660e2943f7e48.zip |
Adds a test to detect when clang omits specialized generic types from debug information when using precompiled headers and -gmodules.
llvm-svn: 266791
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/make')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/make/Makefile.rules | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index 762726d81f7..f39ab9a9b0f 100644 --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -183,9 +183,11 @@ endif LIMIT_DEBUG_INFO_FLAGS = NO_LIMIT_DEBUG_INFO_FLAGS = +MODULE_DEBUG_INFO_FLAGS = ifneq (,$(findstring clang,$(CC))) LIMIT_DEBUG_INFO_FLAGS += -flimit-debug-info NO_LIMIT_DEBUG_INFO_FLAGS += -fno-limit-debug-info + MODULE_DEBUG_INFO_FLAGS += -gmodules endif DEBUG_INFO_FLAG ?= -g @@ -344,6 +346,14 @@ ifneq "$(strip $(DYLIB_CXX_SOURCES))" "" endif #---------------------------------------------------------------------- +# Check if we have a precompiled header +#---------------------------------------------------------------------- +ifneq "$(strip $(PCH_CXX_SOURCE))" "" + PCH_OUTPUT = $(PCH_CXX_SOURCE:.h=.h.pch) + PCHFLAGS = -include $(PCH_CXX_SOURCE) +endif + +#---------------------------------------------------------------------- # Check if we have any C source files #---------------------------------------------------------------------- ifneq "$(strip $(C_SOURCES))" "" @@ -502,6 +512,17 @@ endif endif #---------------------------------------------------------------------- +# Make the precompiled header and compile C++ sources against it +#---------------------------------------------------------------------- + +#ifneq "$(PCH_OUTPUT)" "" +$(PCH_OUTPUT) : $(PCH_CXX_SOURCE) + $(CXX) $(CXXFLAGS) -x c++-header -o $(PCH_OUTPUT) $(PCH_CXX_SOURCE) +%.o : %.cpp $(PCH_OUTPUT) + $(CXX) $(PCHFLAGS) $(CXXFLAGS) $(CFLAGS) -c -o $@ $< +#endif + +#---------------------------------------------------------------------- # Automatic variables based on items already entered. Below we create # an object's lists from the list of sources by replacing all entries # that end with .c with .o, and we also create a list of prerequisite @@ -574,6 +595,9 @@ ifneq "$(DYLIB_NAME)" "" $(RM) -r $(DYLIB_FILENAME).dSYM $(RM) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_PREREQS:.d=.d.tmp) $(DYLIB_DWOS) $(DYLIB_FILENAME) $(DYLIB_FILENAME).debug endif +ifneq "$(PCH_OUTPUT)" "" + $(RM) $(PCH_OUTPUT) +endif ifneq "$(DSYM)" "" $(RM) -r "$(DSYM)" endif |