[clang] [llvm-lit] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 17:12:02 PDT 2024


================
@@ -87,8 +87,8 @@
 
 /// <default-triple>-gcc has lowest priority so <triple>-gcc
 /// on PATH beats default triple in program path
-// RUN: DEFAULT_TRIPLE=`%t/clang --version | grep "Target:" | cut -d ' ' -f2`
-// RUN: touch %t/$DEFAULT_TRIPLE-gcc && chmod +x %t/$DEFAULT_TRIPLE-gcc
+// RUN: %clang --version | grep "Target:" | cut -d ' ' -f2 > %t/default-triple.txt
----------------
ilovepi wrote:

```suggestion
// RUN: %t/clang --version | grep "Target:" | cut -d ' ' -f2 > %t/default-triple.txt
```
Wasn't the test originally written that way? `%clang` is its own substitution that invokes the driver: https://llvm.org/docs/TestingGuide.html
While I don't think you'll get meaningfully different behavior, lets leave the existing behavior intact unless we have a reason to change it.

https://github.com/llvm/llvm-project/pull/102647


More information about the cfe-commits mailing list