From fbc3b3618d43c1581fa98f98fff4fe899036a359 Mon Sep 17 00:00:00 2001 From: Eunseo Song <162149585+eunseo9311@users.noreply.github.com> Date: Fri, 27 Mar 2026 00:52:21 +0900 Subject: [PATCH] Fix Apple clang PCH compile error with -o flag (#7251) (#7327) Apple clang rejects `-o` when a precompiled header (.gch) is involved, reporting "cannot specify -o when generating multiple output files". Remove the unnecessary `-o $@` from the two PCH build rules; the `%.o: %.cpp` pattern already implies the correct output name. --- docs/CONTRIBUTORS | 1 + include/verilated.mk.in | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/CONTRIBUTORS b/docs/CONTRIBUTORS index ab4f4526b..89e5ca44c 100644 --- a/docs/CONTRIBUTORS +++ b/docs/CONTRIBUTORS @@ -60,6 +60,7 @@ Driss Hafdi Edgar E. Iglesias Eric Müller Eric Rippey +Eunseo Song Ethan Sifferman Eyck Jentzsch Fabian Keßler-Schulz diff --git a/include/verilated.mk.in b/include/verilated.mk.in index 4e71a5ac1..68fb5db5b 100644 --- a/include/verilated.mk.in +++ b/include/verilated.mk.in @@ -280,10 +280,10 @@ ifneq ($(VM_DEFAULT_RULES),0) $(OBJCACHE) $(CXX) $(OPT_FAST) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< $(VK_OBJS_FAST): %.o: %.cpp $(VK_PCH_H).fast.gch - $(OBJCACHE) $(CXX) $(OPT_FAST) $(CXXFLAGS) $(CPPFLAGS) $(VK_PCH_I_FAST) -c -o $@ $< + $(OBJCACHE) $(CXX) $(OPT_FAST) $(CXXFLAGS) $(CPPFLAGS) $(VK_PCH_I_FAST) -c $< $(VK_OBJS_SLOW): %.o: %.cpp $(VK_PCH_H).slow.gch - $(OBJCACHE) $(CXX) $(OPT_SLOW) $(CXXFLAGS) $(CPPFLAGS) $(VK_PCH_I_SLOW) -c -o $@ $< + $(OBJCACHE) $(CXX) $(OPT_SLOW) $(CXXFLAGS) $(CPPFLAGS) $(VK_PCH_I_SLOW) -c $< $(VK_GLOBAL_OBJS): %.o: %.cpp $(OBJCACHE) $(CXX) $(OPT_GLOBAL) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<