[PATCH] D151152: [compiler-rt] Avoid memintrinsic calls inserted by the compiler

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 04:42:56 PDT 2023


mstorsjo added a comment.

This broke linking the sanitizers for mingw targets. Building now fails with errors like these:

  [330/350] Linking CXX shared library lib/windows/libclang_rt.asan_dynamic-x86_64.dll
  FAILED: lib/windows/libclang_rt.asan_dynamic-x86_64.dll lib/windows/libclang_rt.asan_dynamic-x86_64.dll.a
  [...]
  ld.lld: error: lib/interception/CMakeFiles/RTInterception.x86_64.dir/interception_linux.cpp.obj: memcpy should not refer to special section 0
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

I see that this also was happening with clang-cl configurations, which was then fixed in caa2c1bacbd76c017ebbb4fd13861f0f66770299 <https://reviews.llvm.org/rGcaa2c1bacbd76c017ebbb4fd13861f0f66770299>. I'll go ahead and push a change that changes `_MSC_VER` into `_WIN32` there, to keep the same behaviour in mingw configs as in clang-cl configs.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151152



More information about the llvm-commits mailing list