Debian Codegraph @

clang/test/Driver/clang_f_opts_withspaces.c

raw
1 // UNSUPPORTED: target={{.*}}-aix{{.*}}
2
3 // Copying clang to a new location and running it will not work unless it is
4 // statically linked. Dynamically linked builds typically use relative rpaths,
5 // which this will break.
6 // REQUIRES: static-libs
7
8 // Test when clang is in a path containing a space.
9 // The initial `rm` is a workaround for https://openradar.appspot.com/FB8914243
10 // (Scenario: Run tests once, `clang` gets copied and run at new location and signature
11 // is cached at the new clang's inode, then clang is changed, tests run again, old signature
12 // is still cached with old clang's inode, so it won't execute this time. Removing the dir
13 // first guarantees a new inode without old cache entries.)
14 // RUN: rm -rf "%t.r/with spaces"
15 // RUN: mkdir -p "%t.r/with spaces"
16 // RUN: cp %clang "%t.r/with spaces/clang"
17 // 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
18 // CHECK-RECORD-GCC-SWITCHES-ESCAPED: "-record-command-line" "{{.+}}with\\ spaces{{.+}}"
19 // Clean up copy of large binary copied into temp directory to avoid bloat.
20 // RUN: rm -f "%t.r/with spaces/clang" || true