Skip to content

Commit

Permalink
[Driver] Fix the sysroot.c test properly (llvm#94276)
Browse files Browse the repository at this point in the history
A DEFAULT_SYSROOT interfered with the test, apparently. See llvm#94055.
  • Loading branch information
pogo59 authored Jun 3, 2024
1 parent c759334 commit e783d5d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions clang/test/Driver/sysroot.c
Original file line number Diff line number Diff line change
@@ -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"

Expand Down

0 comments on commit e783d5d

Please sign in to comment.