Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py @@ -26,6 +26,8 @@ @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24462: Data formatters have problems on Windows") + @skipIf(debug_info="gmodules", + bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048") def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py @@ -9,6 +9,7 @@ import time import lldb from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * import lldbsuite.test.lldbutil as lldbutil @@ -22,6 +23,8 @@ # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') + @skipIf(debug_info="gmodules", + bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048") def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py @@ -31,6 +31,8 @@ '// Set fourth break point at this line.') @add_test_categories(["libc++"]) + @skipIf(debug_info="gmodules", + bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048") def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() Index: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py @@ -18,6 +18,8 @@ mydir = TestBase.compute_mydir(__file__) @add_test_categories(["libc++"]) + @skipIf(debug_info="gmodules", + bugnumber="https://bugs.llvm.org/show_bug.cgi?id=36048") def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() Index: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile @@ -1,6 +1,6 @@ LEVEL = ../../../make OBJC_SOURCES := main.m -CFLAGS += -fmodules -gmodules -g +CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) include $(LEVEL)/Makefile.rules Index: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py @@ -26,7 +26,7 @@ self.line = line_number('main.m', '// Set breakpoint 0 here.') @skipUnlessDarwin - @skipIf(macos_version=["<", "10.12"]) + @skipIf(macos_version=["<", "10.12"], debug_info=no_match(["gmodules"])) def test_expr(self): self.build() exe = self.getBuildArtifact("a.out") Index: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile @@ -4,5 +4,5 @@ include $(LEVEL)/Makefile.rules -CFLAGS += -fmodules -I$(PWD) +CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(PWD) LDFLAGS += -framework Foundation Index: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py @@ -24,7 +24,7 @@ @skipUnlessDarwin @unittest2.expectedFailure("rdar://20416388") - @skipIf(macos_version=["<", "10.12"]) + @skipIf(macos_version=["<", "10.12"], debug_info=no_match(["gmodules"])) def test_expr(self): self.build() exe = self.getBuildArtifact("a.out") Index: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile @@ -6,4 +6,4 @@ include $(LEVEL)/Makefile.rules -CFLAGS += -fmodules -I$(PWD) +CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(PWD) Index: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py @@ -27,7 +27,7 @@ self.line = line_number('main.m', '// Set breakpoint here.') @skipUnlessDarwin - @skipIf(macos_version=["<", "10.12"]) + @skipIf(macos_version=["<", "10.12"], debug_info=no_match(["gmodules"])) def test_expr(self): self.build() exe = self.getBuildArtifact("a.out") Index: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules =================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules +++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules @@ -237,13 +237,15 @@ CFLAGS += -gsplit-dwarf endif +CLANG_MODULE_CACHE_DIR := module-cache + +MANDATORY_MODULE_BUILD_CFLAGS := -fmodules -gmodules -fmodules-cache-path=$(CLANG_MODULE_CACHE_DIR) + ifeq "$(MAKE_GMODULES)" "YES" - CFLAGS += -fmodules -gmodules + CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) endif -CXXFLAGS += -std=c++11 -# FIXME: C++ modules aren't supported on all platforms. -CXXFLAGS += $(subst -fmodules,, $(CFLAGS)) +CXXFLAGS += -std=c++11 $(CFLAGS) LD = $(CC) LDFLAGS ?= $(CFLAGS) LDFLAGS += $(LD_EXTRAS) $(ARCH_LDFLAGS) @@ -636,7 +638,7 @@ dsym: $(DSYM) all: $(EXE) $(DSYM) clean:: - $(RM) $(OBJECTS) $(PREREQS) $(PREREQS:.d=.d.tmp) $(DWOS) $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS) + $(RM) -rf $(OBJECTS) $(PREREQS) $(PREREQS:.d=.d.tmp) $(DWOS) $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS) $(CLANG_MODULE_CACHE_DIR) 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