https://github.com/dyung created https://github.com/llvm/llvm-project/pull/77861

Previous commit 67aea3b fixed the test for paths with '/', expand it to include 
'\' to fix the same problem on Windows.

Our internal Windows builder hit the same issue that was previously fixed on 
linux, but on Windows since the temporary path that had generated contained 
'crt':

```
"ld" "--eh-frame-hdr" "--hash-style=gnu" "--enable-new-dtags" "-o" "a.out" "-r" 
"-LC:\\j\\w\\779ddbee\\build\\bin/../lib" "-L/usr/lib" "-L/usr/lib/gcc80" 
"c:\\j\\w\\779ddbee\\temp\\lit-tmp-8crtk3__\\dragonfly-1efec1.o" "-r"
```

This change adds the Windows patch separator '\' to the list of disallowed 
characters to prevent the problem on Windows.

>From c1b503c199c15972fc2976b24e492c183a8550ee Mon Sep 17 00:00:00 2001
From: Douglas Yung <douglas.y...@sony.com>
Date: Thu, 11 Jan 2024 17:29:28 -0800
Subject: [PATCH] [clang] Make test Driver/dragonfly.c pass when running with
 temp dir containing "crt"

Previous commit 67aea3b fixed the test for paths with '/', expand it to
include '\' to fix the same problem on Windows.
---
 clang/test/Driver/dragonfly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/test/Driver/dragonfly.c b/clang/test/Driver/dragonfly.c
index 931f23f6f57b5f..fb250fd8432526 100644
--- a/clang/test/Driver/dragonfly.c
+++ b/clang/test/Driver/dragonfly.c
@@ -25,7 +25,7 @@
 // RELOCATABLE:     "-r"
 // RELOCATABLE-NOT: "-dynamic-linker"
 // RELOCATABLE-NOT: "-l
-// RELOCATABLE-NOT: {{.*}}crt{{[^./]+}}.o
+// RELOCATABLE-NOT: {{.*}}crt{{[^./\\]+}}.o
 
 // Check that the new linker flags are passed to DragonFly
 // RUN: %clang --target=x86_64-unknown-dragonfly -s -t -### %s 2>&1 \

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to