Skip to content

Conversation

@pogo59
Copy link
Collaborator

@pogo59 pogo59 commented Jun 3, 2024

A DEFAULT_SYSROOT interfered with the test, apparently. See #94055.

@pogo59 pogo59 requested review from jrtc27 and vvereschaka June 3, 2024 19:56
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Jun 3, 2024
@pogo59
Copy link
Collaborator Author

pogo59 commented Jun 3, 2024

Pls try in your environments to see if this solves the problem.

@llvmbot
Copy link
Member

llvmbot commented Jun 3, 2024

@llvm/pr-subscribers-clang

Author: Paul T Robinson (pogo59)

Changes

A DEFAULT_SYSROOT interfered with the test, apparently. See #95055.


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

1 Files Affected:

  • (modified) clang/test/Driver/sysroot.c (+2-4)
diff --git a/clang/test/Driver/sysroot.c b/clang/test/Driver/sysroot.c
index 2215d6fa8fe73..85da2499090af 100644
--- a/clang/test/Driver/sysroot.c
+++ b/clang/test/Driver/sysroot.c
@@ -1,15 +1,13 @@
-// Fails on ARM/AArch64-hosted Windows, can't tell why.
-// UNSUPPORTED: system-windows
-
 // Check that --sysroot= also applies to header search paths.
 // RUN: %clang -target i386-unk-unk --sysroot=/FOO -### -E %s 2> %t1
 // RUN: FileCheck --check-prefix=CHECK-SYSROOTEQ < %t1 %s
 // CHECK-SYSROOTEQ: "-cc1"{{.*}} "-isysroot" "{{[^"]*}}/FOO"
 
 // Apple Darwin uses -isysroot as the syslib root, too.
+// We pass --sysroot="" to defeat any -DDEFAULT_SYSROOT parameter.
 // RUN: touch %t2.o
 // RUN: %clang -target i386-apple-darwin10 \
-// RUN:   -isysroot /FOO -### %t2.o 2> %t2
+// RUN:   -isysroot /FOO --sysroot="" -### %t2.o 2> %t2
 // RUN: FileCheck --check-prefix=CHECK-APPLE-ISYSROOT < %t2 %s
 // CHECK-APPLE-ISYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "{{[^"]*}}/FOO"
 

@llvmbot
Copy link
Member

llvmbot commented Jun 3, 2024

@llvm/pr-subscribers-clang-driver

Author: Paul T Robinson (pogo59)

Changes

A DEFAULT_SYSROOT interfered with the test, apparently. See #95055.


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

1 Files Affected:

  • (modified) clang/test/Driver/sysroot.c (+2-4)
diff --git a/clang/test/Driver/sysroot.c b/clang/test/Driver/sysroot.c
index 2215d6fa8fe73..85da2499090af 100644
--- a/clang/test/Driver/sysroot.c
+++ b/clang/test/Driver/sysroot.c
@@ -1,15 +1,13 @@
-// Fails on ARM/AArch64-hosted Windows, can't tell why.
-// UNSUPPORTED: system-windows
-
 // Check that --sysroot= also applies to header search paths.
 // RUN: %clang -target i386-unk-unk --sysroot=/FOO -### -E %s 2> %t1
 // RUN: FileCheck --check-prefix=CHECK-SYSROOTEQ < %t1 %s
 // CHECK-SYSROOTEQ: "-cc1"{{.*}} "-isysroot" "{{[^"]*}}/FOO"
 
 // Apple Darwin uses -isysroot as the syslib root, too.
+// We pass --sysroot="" to defeat any -DDEFAULT_SYSROOT parameter.
 // RUN: touch %t2.o
 // RUN: %clang -target i386-apple-darwin10 \
-// RUN:   -isysroot /FOO -### %t2.o 2> %t2
+// RUN:   -isysroot /FOO --sysroot="" -### %t2.o 2> %t2
 // RUN: FileCheck --check-prefix=CHECK-APPLE-ISYSROOT < %t2 %s
 // CHECK-APPLE-ISYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "{{[^"]*}}/FOO"
 

A DEFAULT_SYSROOT interfered with the test, apparently.
See llvm#94055.
@pogo59 pogo59 force-pushed the fix-sysroot-test branch from c891830 to b4b78ef Compare June 3, 2024 19:58
Copy link
Collaborator

@jrtc27 jrtc27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't reproduce it myself, just worked out the problem from the build log. If this test still works locally for you then this should fix it.

@pogo59 pogo59 merged commit e783d5d into llvm:main Jun 3, 2024
@vvereschaka
Copy link
Contributor

I'm still building the toolchain in my environment. I'll let you known the test results.

@vvereschaka
Copy link
Contributor

The clang/test/Driver/sysroot.c test has passed in my environment.

@pogo59 pogo59 deleted the fix-sysroot-test branch October 3, 2024 16:42
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.

4 participants