[PATCH] D71786: [Support] On Windows, add optional support for {rpmalloc|snmalloc|mimalloc}
Hans Wennborg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 05:26:28 PDT 2020
hans added a comment.
This seems to have broken 32-bit builds for me. In an x86 VS 2019 prompt:
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" ../llvm
ninja unittests\Support\DynamicLibrary\SecondLib.dll
LINK : error LNK2001: unresolved external symbol malloc
unittests\Support\DynamicLibrary\SecondLib.dll : fatal error LNK1120: 1 unresolved externals
This diff appears to fix it:
diff --git a/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt b/llvm/unittests/Support/DynamicLibrary/CMakeLists.txtindex 00d20510ffd..b9bcc2d9680 100644
--- a/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
+++ b/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
@@ -45,7 +45,7 @@ function(dynlib_add_module NAME)
# allocator (see llvm/lib/Support/Windows/Memory.inc).
# /INCLUDE:malloc is there to force searching into LLVMSupport before libucrt
llvm_map_components_to_libnames(llvm_libs Support)
- target_link_libraries(${NAME} ${llvm_libs} "-INCLUDE:malloc")
+ target_link_libraries(${NAME} ${llvm_libs} "-INCLUDE:_malloc")
endfunction(dynlib_add_module)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71786/new/
https://reviews.llvm.org/D71786
More information about the llvm-commits
mailing list