[Lldb-commits] [PATCH] D42277: Use test-specific module caches to avoid stale header conflicts
Vedant Kumar via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 19 00:57:59 PST 2018
vsk updated this revision to Diff 130566.
vsk added a comment.
- Upload a diff with context.
https://reviews.llvm.org/D42277
Files:
packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
packages/Python/lldbsuite/test/make/Makefile.rules
Index: packages/Python/lldbsuite/test/make/Makefile.rules
===================================================================
--- packages/Python/lldbsuite/test/make/Makefile.rules
+++ 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 -fmodules-cache-path=$(CLANG_MODULE_CACHE_DIR)
+
ifeq "$(MAKE_GMODULES)" "YES"
- CFLAGS += -fmodules -gmodules
+ CFLAGS += -gmodules $(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
Index: packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
===================================================================
--- packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
+++ 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: packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
===================================================================
--- packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
+++ 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: packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
===================================================================
--- packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
+++ 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 += -gmodules $(MANDATORY_MODULE_BUILD_CFLAGS)
include $(LEVEL)/Makefile.rules
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42277.130566.patch
Type: text/x-patch
Size: 2642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180119/f6c9e9eb/attachment.bin>
More information about the lldb-commits
mailing list