[PATCH] D147057: [compiler-rt][asan][test] Fix lit test config on MinGW

Alvin Wong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 00:57:06 PDT 2023


alvinhochun added inline comments.


================
Comment at: compiler-rt/test/asan/lit.cfg.py:148
+# MSVC-specific tests might also use the clang-cl.exe driver.
+if platform.system() == 'Windows' and not re.match(r'.*-windows-gnu$', config.target_triple):
   clang_cl_cxxflags = ["-Wno-deprecated-declarations",
----------------
mstorsjo wrote:
> The RE match expression gets repeated quite a lot - is there any existing pattern for storing such things in a variable within asan (maybe for tests for other targets)?
If you mean only in `lit.cfg.py` and `lit.common.cfg.py`, I guess it wouldn't hurt to use a local variable. By the way I am considering changing this check to detect msvc target instead of "not gnu".

If you mean for the `UNSUPPORTED:` tag in tests, I think the intended way to check for target is with the regex judging from 38e9660eaa3478b003cbc48cb4ed0adcf22e053a.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147057/new/

https://reviews.llvm.org/D147057



More information about the llvm-commits mailing list