summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Beckmann <ecbeckmann@google.com>2017-07-26 01:21:55 +0000
committerEric Beckmann <ecbeckmann@google.com>2017-07-26 01:21:55 +0000
commitf74bed27b433390460f80b2b6d1235cbadc5f482 (patch)
treecb5e8a7244d7936dbdfbd827f9af5c8fbb10c408
parent49fc1e6fbc4dbcde96f77f13f9d47e717f83872b (diff)
Move manifest utils into separate lib, to reduce libxml2 deps.
Summary: Previously were in support. Since many many things depend on support, were all forced to also depend on libxml2, which we only want in a few cases. This puts all the libxml2 deps in a separate lib to be used only in a few places. Reviewers: ruiu, thakis, rnk Subscribers: mgorny, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35819 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309070 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/WindowsManifest/WindowsManifestMerger.h (renamed from include/llvm/Support/WindowsManifestMerger.h)0
-rw-r--r--include/llvm/module.modulemap6
-rw-r--r--lib/CMakeLists.txt1
-rw-r--r--lib/LLVMBuild.txt1
-rw-r--r--lib/Support/CMakeLists.txt4
-rw-r--r--lib/WindowsManifest/CMakeLists.txt18
-rw-r--r--lib/WindowsManifest/LLVMBuild.txt22
-rw-r--r--lib/WindowsManifest/WindowsManifestMerger.cpp (renamed from lib/Support/WindowsManifestMerger.cpp)2
-rw-r--r--tools/llvm-mt/CMakeLists.txt1
-rw-r--r--tools/llvm-mt/LLVMBuild.txt2
-rw-r--r--tools/llvm-mt/llvm-mt.cpp2
11 files changed, 52 insertions, 7 deletions
diff --git a/include/llvm/Support/WindowsManifestMerger.h b/include/llvm/WindowsManifest/WindowsManifestMerger.h
index e87551e83b5..e87551e83b5 100644
--- a/include/llvm/Support/WindowsManifestMerger.h
+++ b/include/llvm/WindowsManifest/WindowsManifestMerger.h
diff --git a/include/llvm/module.modulemap b/include/llvm/module.modulemap
index 3c0c45f585d..e95d0fcd565 100644
--- a/include/llvm/module.modulemap
+++ b/include/llvm/module.modulemap
@@ -306,3 +306,9 @@ module LLVM_Support_DataTypes_Src {
header "llvm/Support/DataTypes.h"
export *
}
+
+module LLVM_WindowsManifest {
+ requires cplusplus
+ umbrella "WindowsManifest"
+ module * { export * }
+}
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 946067e6358..71b0a0aa0d3 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -25,3 +25,4 @@ add_subdirectory(Passes)
add_subdirectory(ToolDrivers)
add_subdirectory(XRay)
add_subdirectory(Testing)
+add_subdirectory(WindowsManifest)
diff --git a/lib/LLVMBuild.txt b/lib/LLVMBuild.txt
index 1d22c2a11f1..91c3da53172 100644
--- a/lib/LLVMBuild.txt
+++ b/lib/LLVMBuild.txt
@@ -42,6 +42,7 @@ subdirectories =
Testing
ToolDrivers
Transforms
+ WindowsManifest
[component_0]
type = Group
diff --git a/lib/Support/CMakeLists.txt b/lib/Support/CMakeLists.txt
index e258e4df799..0a8e3897cce 100644
--- a/lib/Support/CMakeLists.txt
+++ b/lib/Support/CMakeLists.txt
@@ -27,9 +27,6 @@ elseif( CMAKE_HOST_UNIX )
if( UNIX AND NOT (BEOS OR HAIKU) )
set(system_libs ${system_libs} m)
endif()
- if( LLVM_LIBXML2_ENABLED )
- set(system_libs ${system_libs} ${LIBXML2_LIBS})
- endif()
endif( MSVC OR MINGW )
add_llvm_library(LLVMSupport
@@ -113,7 +110,6 @@ add_llvm_library(LLVMSupport
Triple.cpp
Twine.cpp
Unicode.cpp
- WindowsManifestMerger.cpp
YAMLParser.cpp
YAMLTraits.cpp
raw_os_ostream.cpp
diff --git a/lib/WindowsManifest/CMakeLists.txt b/lib/WindowsManifest/CMakeLists.txt
new file mode 100644
index 00000000000..0bf5f421c18
--- /dev/null
+++ b/lib/WindowsManifest/CMakeLists.txt
@@ -0,0 +1,18 @@
+set(system_libs)
+if( CMAKE_HOST_UNIX )
+ if( LLVM_LIBXML2_ENABLED )
+ set(system_libs ${system_libs} ${LIBXML2_LIBS})
+ endif()
+endif()
+
+add_llvm_library(LLVMWindowsManifest
+ WindowsManifestMerger.cpp
+
+ ADDITIONAL_HEADER_DIRS
+ ${LLVM_MAIN_INCLUDE_DIR}/llvm/WindowsManifest
+ ${Backtrace_INCLUDE_DIRS}
+
+ LINK_LIBS ${system_libs}
+ )
+
+set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS "${system_libs}")
diff --git a/lib/WindowsManifest/LLVMBuild.txt b/lib/WindowsManifest/LLVMBuild.txt
new file mode 100644
index 00000000000..d5de0275b66
--- /dev/null
+++ b/lib/WindowsManifest/LLVMBuild.txt
@@ -0,0 +1,22 @@
+;===- ./lib/WindowsManifest/LLVMBuild.txt ----------------------*- Conf -*--===;
+;
+; The LLVM Compiler Infrastructure
+;
+; This file is distributed under the University of Illinois Open Source
+; License. See LICENSE.TXT for details.
+;
+;===------------------------------------------------------------------------===;
+;
+; This is an LLVMBuild description file for the components in this subdirectory.
+;
+; For more information on the LLVMBuild system, please see:
+;
+; http://llvm.org/docs/LLVMBuild.html
+;
+;===------------------------------------------------------------------------===;
+
+[component_0]
+type = Library
+name = WindowsManifest
+parent = Libraries
+required_libraries = Support
diff --git a/lib/Support/WindowsManifestMerger.cpp b/lib/WindowsManifest/WindowsManifestMerger.cpp
index 59c8a3af42e..0c9e7fda579 100644
--- a/lib/Support/WindowsManifestMerger.cpp
+++ b/lib/WindowsManifest/WindowsManifestMerger.cpp
@@ -11,7 +11,7 @@
//
//===---------------------------------------------------------------------===//
-#include "llvm/Support/WindowsManifestMerger.h"
+#include "llvm/WindowsManifest/WindowsManifestMerger.h"
#include "llvm/Support/MemoryBuffer.h"
#include <stdarg.h>
diff --git a/tools/llvm-mt/CMakeLists.txt b/tools/llvm-mt/CMakeLists.txt
index d97cc4fe446..e4e99468092 100644
--- a/tools/llvm-mt/CMakeLists.txt
+++ b/tools/llvm-mt/CMakeLists.txt
@@ -1,6 +1,7 @@
set(LLVM_LINK_COMPONENTS
Option
Support
+ WindowsManifest
)
set(LLVM_TARGET_DEFINITIONS Opts.td)
diff --git a/tools/llvm-mt/LLVMBuild.txt b/tools/llvm-mt/LLVMBuild.txt
index 894d3527924..02fc9ace755 100644
--- a/tools/llvm-mt/LLVMBuild.txt
+++ b/tools/llvm-mt/LLVMBuild.txt
@@ -19,4 +19,4 @@
type = Tool
name = llvm-mt
parent = Tools
-required_libraries = Option Support
+required_libraries = Option Support WindowsManifest
diff --git a/tools/llvm-mt/llvm-mt.cpp b/tools/llvm-mt/llvm-mt.cpp
index eca83b379fb..69af6a61c48 100644
--- a/tools/llvm-mt/llvm-mt.cpp
+++ b/tools/llvm-mt/llvm-mt.cpp
@@ -22,8 +22,8 @@
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Signals.h"
-#include "llvm/Support/WindowsManifestMerger.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/WindowsManifest/WindowsManifestMerger.h"
#include <system_error>