Douglas Gregor | 33b3d2a | 2011-10-21 23:20:41 +0000 | [diff] [blame] | 1 | // RUN: cd %S && %clang -### -g %s -c 2>&1 | FileCheck -check-prefix=CHECK-PWD %s |
| 2 | // CHECK-PWD: {{"-fdebug-compilation-dir" ".*Driver.*"}} |
| 3 | |
| 4 | // RUN: env PWD=/foo %clang -### -g %s -c 2>&1 | FileCheck -check-prefix=CHECK-FOO %s |
Douglas Gregor | 60419fa | 2011-10-21 23:37:41 +0000 | [diff] [blame] | 5 | // CHECK-FOO: {{"-fdebug-compilation-dir" ".*foo"}} |
Nick Lewycky | 7c4fd91 | 2011-10-21 02:32:14 +0000 | [diff] [blame] | 6 | |
| 7 | // "PWD=/foo gcc" wouldn't necessarily work. You would need to pick a different |
| 8 | // path to the same directory (try a symlink). |
Douglas Gregor | 4a8eff0 | 2011-10-21 23:57:02 +0000 | [diff] [blame] | 9 | |
NAKAMURA Takumi | ba81d96 | 2011-10-22 11:28:32 +0000 | [diff] [blame] | 10 | // This depends on host's behavior how $PWD would be set. |
| 11 | // REQUIRES: shell |