[PATCH] D147057: [compiler-rt][asan][test] Fix lit test config on MinGW
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 13:14:21 PDT 2023
mstorsjo added a subscriber: llvm-commits.
mstorsjo accepted this revision.
mstorsjo added a comment.
This revision is now accepted and ready to land.
Looks reasonable overall I think, nothing to object to from my point of view, just a few minor comments.. The patch is a bit unwieldy with the number of tests marked as unsupported, but I guess it's as good as it will be. If we're only touching tests that use specifically `clang_cl_*` to build/run, the mass editing probably is ok.
================
Comment at: compiler-rt/test/asan/lit.cfg.py:107
+ # On MSVC target, we need to simulate "clang-cl /MD" on the clang driver side.
asan_dynamic_flags += ["-D_MT", "-D_DLL", "-Wl,-nodefaultlib:libcmt,-defaultlib:msvcrt,-defaultlib:oldnames"]
elif platform.system() == 'FreeBSD':
----------------
Side note; since Clang 16.0.0 (fda44bedd64dbcde1b54432d99ad2f0fca0ad204) there's a new option in the GCC-style driver that does the same as `/MD` - `-fms-runtime-lib=dll`. So if/when we can assume Clang >= 16 here, we could simplify this line.
================
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",
----------------
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)?
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