https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/183090
This patch fixes cross platform Makefile.rules macros and adds the `ECHO_TO_EXISTING_FILE` macros. Using `echo` in a macro to write to a file had quoting issues. >From bbfc12aa56d029b0160655b89aad5fcb57095ad2 Mon Sep 17 00:00:00 2001 From: Charles Zablit <[email protected]> Date: Tue, 24 Feb 2026 16:03:17 +0000 Subject: [PATCH] [lldb] fix Makefile.rules cross platform macros --- .../packages/Python/lldbsuite/test/make/Makefile.rules | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index eeaf651792fee..821558fbf8588 100644 --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -46,8 +46,9 @@ ifeq "$(OS)" "Windows_NT" RM_F = del /f /q $(subst /,\,$(1)) RM_RF = rd /s /q $(subst /,\,$(1)) LN_SF = mklink /D "$(subst /,\,$(2))" "$(subst /,\,$(1))" - ECHO = echo $(1) - ECHO_TO_FILE = echo $(1) > $(subst /,\,$(2)) + ECHO = echo $(1); + ECHO_TO_FILE = printf "%s\n" $(1) > "$(subst /,\,$(2))" + ECHO_TO_EXISTING_FILE = printf "%s\n" $(1) >> "$(subst /,\,$(2))" else MKDIR_P = mkdir -p $(1) CP = cp $(1) $(2) @@ -56,8 +57,9 @@ else RM_F = rm -f $(1) RM_RF = rm -rf $(1) LN_SF = ln -sf $(1) $(2) - ECHO = echo "$(1)" - ECHO_TO_FILE = echo $(1) > $(2) + ECHO = echo $(1); + ECHO_TO_FILE = printf '%s\n' $(1) > "$(2)" + ECHO_TO_EXISTING_FILE = printf '%s\n' $(1) >> "$(2)" endif # Suppress built-in suffix rules. We explicitly define rules for %.o. _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
