forked from OSchip/llvm-project
03d703bb62
This is necessary to support the dynamic CRT (/MD) with VS2015. In VS2015, these symbols are no longer imported from a DLL, they provided statically by msvcrt.lib. This means our approach of hotpatching the DLL no longer works. By exporting the symbols, we end up relying on the same mechanism that we use to intercept symbols in the static CRT (/MT) case. The ASan runtime always needs to appear first on the link line, and the linker searches for symbol definitions from left to right. This means we can stop hotpatching operator new and delete in the CRT, which is nice. I think that the only reason we weren't exporting the symbols already is because MSVC doesn't allow you to do it directly with __declspec(dllexport). Instead, we can use `#pragma comment(linker, "/export:foo")`, which is most of what the attribute does under the hood. It does mean we have to write down the mangled names of the operators, but that's not too bad. llvm-svn: 264190 |
||
---|---|---|
.. | ||
BlocksRuntime | ||
asan | ||
builtins | ||
cfi | ||
dfsan | ||
interception | ||
lsan | ||
msan | ||
profile | ||
safestack | ||
sanitizer_common | ||
stats | ||
tsan | ||
ubsan | ||
CMakeLists.txt | ||
Makefile.mk |