diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -458,11 +458,11 @@ endif #---------------------------------------------------------------------- -# Check if we have a precompiled header +# Check if we have a precompiled headers #---------------------------------------------------------------------- -ifneq "$(strip $(PCH_CXX_SOURCE))" "" - PCH_OUTPUT = $(PCH_CXX_SOURCE:.h=.h.pch) - PCHFLAGS = -include $(PCH_CXX_SOURCE) +ifneq "$(strip $(PCH_CXX_SOURCES))" "" + PCH_OUTPUT = $(PCH_CXX_SOURCES:.h=.h.pch) + PCHFLAGS = $(addprefix -include-pch , $(PCH_OUTPUT)) endif #---------------------------------------------------------------------- @@ -600,11 +600,11 @@ endif #---------------------------------------------------------------------- -# Make the precompiled header and compile C++ sources against it +# Make the precompiled headers and compile C++ sources against it #---------------------------------------------------------------------- ifneq "$(PCH_OUTPUT)" "" -$(PCH_OUTPUT) : $(PCH_CXX_SOURCE) +$(PCH_OUTPUT) : $(PCH_CXX_SOURCES) $(CXX) $(CXXFLAGS) -x c++-header -o $@ $< endif diff --git a/lldb/test/API/lang/cpp/gmodules/basic/Makefile b/lldb/test/API/lang/cpp/gmodules/basic/Makefile --- a/lldb/test/API/lang/cpp/gmodules/basic/Makefile +++ b/lldb/test/API/lang/cpp/gmodules/basic/Makefile @@ -1,4 +1,4 @@ -PCH_CXX_SOURCE = pch.h +PCH_CXX_SOURCES = pch.h CXX_SOURCES = main.cpp CFLAGS_EXTRAS := $(MODULE_DEBUG_INFO_FLAGS)