mstorsjo updated this revision to Diff 168848.
mstorsjo added a comment.
Relying on a linker pragma in sanitizers and mingw lib name logic in lld.
https://reviews.llvm.org/D52990
Files:
lib/CodeGen/TargetInfo.cpp
test/Driver/fsanitize.c
Index: test/Driver/fsanitize.c
=
mstorsjo added inline comments.
Comment at: lib/Driver/ToolChains/MinGW.cpp:266
+ // directives in the object files, but the static library needs
+ // -lpsapi unless the sanitizer was built targeting >= win7.
+ CmdArgs.push_back("-lpsapi");
smeenai added inline comments.
Comment at: lib/Driver/ToolChains/MinGW.cpp:266
+ // directives in the object files, but the static library needs
+ // -lpsapi unless the sanitizer was built targeting >= win7.
+ CmdArgs.push_back("-lpsapi");
-
rnk added inline comments.
Comment at: lib/Driver/ToolChains/MinGW.cpp:266
+ // directives in the object files, but the static library needs
+ // -lpsapi unless the sanitizer was built targeting >= win7.
+ CmdArgs.push_back("-lpsapi");
mstorsjo added inline comments.
Comment at: lib/Driver/ToolChains/MinGW.cpp:266
+ // directives in the object files, but the static library needs
+ // -lpsapi unless the sanitizer was built targeting >= win7.
+ CmdArgs.push_back("-lpsapi");
smeenai added inline comments.
Comment at: lib/Driver/ToolChains/MinGW.cpp:266
+ // directives in the object files, but the static library needs
+ // -lpsapi unless the sanitizer was built targeting >= win7.
+ CmdArgs.push_back("-lpsapi");
-
mstorsjo created this revision.
mstorsjo added a reviewer: rnk.
Turns out that ubsan actually already was supported for msvc mode as well; it
just didn't require any code in lib/Driver/ToolChains/MSVC.cpp,
Repository:
rC Clang
https://reviews.llvm.org/D52990
Files:
lib/CodeGen/TargetInfo.