From d8212edf6840cf44f381da81039fa17a35e6102c Mon Sep 17 00:00:00 2001 From: Russell Gallop Date: Mon, 29 Apr 2019 10:10:17 +0000 Subject: [PATCH] vs integration: Use llvm-lib for librarian This uses llvm-lib.exe for the librarian instead of Visual Studio provided lib.exe. Without this it is not possible to create static libraries with -flto using the plugin. Original patch by Steven Noonan This fixes: PR41147 Differential Revision: https://reviews.llvm.org/D61193 llvm-svn: 359430 --- llvm/tools/msbuild/LLVM.Cpp.Common.props | 2 ++ llvm/tools/msbuild/LLVM.Cpp.Common.targets | 1 + llvm/tools/msbuild/llvm-general.xml | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/llvm/tools/msbuild/LLVM.Cpp.Common.props b/llvm/tools/msbuild/LLVM.Cpp.Common.props index 3420b77cfffa..bc021b3b9e1f 100644 --- a/llvm/tools/msbuild/LLVM.Cpp.Common.props +++ b/llvm/tools/msbuild/LLVM.Cpp.Common.props @@ -42,8 +42,10 @@ $(LLVMInstallDir)\ $(LLVMInstallDir)bin\clang-cl.exe $(LLVMInstallDir)bin\lld-link.exe + $(LLVMInstallDir)bin\llvm-lib.exe true true + true diff --git a/llvm/tools/msbuild/LLVM.Cpp.Common.targets b/llvm/tools/msbuild/LLVM.Cpp.Common.targets index 5870a3d4c594..74a98d6439b4 100644 --- a/llvm/tools/msbuild/LLVM.Cpp.Common.targets +++ b/llvm/tools/msbuild/LLVM.Cpp.Common.targets @@ -9,6 +9,7 @@ that the user may have overridden in the UI. --> $(ClangClExecutable) $(LldLinkExecutable) + $(LlvmLibExecutable) diff --git a/llvm/tools/msbuild/llvm-general.xml b/llvm/tools/msbuild/llvm-general.xml index a14a68441513..66a2cfec0b4c 100644 --- a/llvm/tools/msbuild/llvm-general.xml +++ b/llvm/tools/msbuild/llvm-general.xml @@ -52,4 +52,25 @@ Category="General"> + + + + + + + + +