Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang] Make test Driver/dragonfly.c pass when running with temp dir containing "crt" #77861

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dyung
Copy link
Collaborator

@dyung dyung commented Jan 12, 2024

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.

…containing "crt"

Previous commit 67aea3b fixed the test for paths with '/', expand it to
include '\' to fix the same problem on Windows.
@dyung dyung requested a review from nico January 12, 2024 01:40
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Jan 12, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jan 12, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: None (dyung)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/77861.diff

1 Files Affected:

  • (modified) clang/test/Driver/dragonfly.c (+1-1)
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 \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants