[PATCH] D71786: RFC: [Support] On Windows, add optional support for rpmalloc
Russell Gallop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 8 08:46:52 PST 2020
russell.gallop added inline comments.
================
Comment at: llvm/tools/remarks-shlib/CMakeLists.txt:15
+ # Make sure we search LLVMSupport first, before the CRT libs
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -INCLUDE:malloc")
+endif()
----------------
I think this should be:
```
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -INCLUDE:malloc")
```
as it needs adding onto the shared library link flags.
I also had to add similar to llvm/tools/llvm-shlib/CMakeLists.txt:
```
--- a/llvm/tools/llvm-shlib/CMakeLists.txt
+++ b/llvm/tools/llvm-shlib/CMakeLists.txt
@@ -172,4 +172,9 @@ if(MSVC)
# Finally link the target.
add_llvm_library(LLVM-C SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES} DEPENDS intrinsics_gen)
+ if (LLVM_ENABLE_RPMALLOC AND MSVC)
+ # Make sure we search LLVMSupport first, before the CRT libs
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -INCLUDE:malloc")
+ endif()
+
endif()
```
With those, it builds for me with VS2017.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71786/new/
https://reviews.llvm.org/D71786
More information about the llvm-commits
mailing list