File: clang_f_opts_withspaces.c

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,245,028 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,675; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (20 lines) | stat: -rw-r--r-- 1,202 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// UNSUPPORTED: target={{.*}}-aix{{.*}}

// Copying clang to a new location and running it will not work unless it is
// statically linked. Dynamically linked builds typically use relative rpaths,
// which this will break.
// REQUIRES: static-libs

// Test when clang is in a path containing a space.
// The initial `rm` is a workaround for https://openradar.appspot.com/FB8914243
// (Scenario: Run tests once, `clang` gets copied and run at new location and signature
// is cached at the new clang's inode, then clang is changed, tests run again, old signature
// is still cached with old clang's inode, so it won't execute this time. Removing the dir
// first guarantees a new inode without old cache entries.)
// RUN: rm -rf "%t.r/with spaces"
// RUN: mkdir -p "%t.r/with spaces"
// RUN: cp %clang "%t.r/with spaces/clang"
// RUN: "%t.r/with spaces/clang" -### -S --target=x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ESCAPED %s
// CHECK-RECORD-GCC-SWITCHES-ESCAPED: "-record-command-line" "{{.+}}with\\ spaces{{.+}}"
// Clean up copy of large binary copied into temp directory to avoid bloat.
// RUN: rm -f "%t.r/with spaces/clang" || true