[PATCH] D147444: [asan][test][win] Port more tests to not use clang-cl on MinGW
Alvin Wong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 07:30:50 PDT 2023
alvinhochun added inline comments.
================
Comment at: compiler-rt/test/asan/TestCases/Windows/crt_initializers.cpp:1
-// UNSUPPORTED: target={{.*-windows-gnu}}
-
-// RUN: %clang_cl_asan -Od %s -Fe%t
+// RUN: %if clang-cl %{ %clang_cl_asan -Od %s -Fe%t %} \
+// RUN: %else %{ %clangxx_asan -O0 %s -o %t %}
----------------
vitalybuka wrote:
> I believe it would be much cleaner if done substituting: llvm-project/compiler-rt/test/asan/lit.cfg.py:163
>
I don't know how one could use substitution for this, since clang and clang-cl use very different command line parameters (especially problematic for the more complex DLL tests which I have yet to port).
Or do you mean using substitution to turn certain `RUN:` commands into comments? Like:
```
// RUN: %if_clang_cl %clang_cl_asan -Od %s -Fe%t
// RUN: %if_not_clang_cl %clangxx_asan -O0 %s -o %t
```
...and conditionally substituting one of `%if_clang_cl` and `%if_not_clang_cl` to be `:` and the other one to be empty?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147444/new/
https://reviews.llvm.org/D147444
More information about the llvm-commits
mailing list