]> granicus.if.org Git - llvm/commitdiff
Move manifest utils into separate lib, to reduce libxml2 deps.
authorEric Beckmann <ecbeckmann@google.com>
Wed, 26 Jul 2017 01:21:55 +0000 (01:21 +0000)
committerEric Beckmann <ecbeckmann@google.com>
Wed, 26 Jul 2017 01:21:55 +0000 (01:21 +0000)
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

include/llvm/WindowsManifest/WindowsManifestMerger.h [moved from include/llvm/Support/WindowsManifestMerger.h with 100% similarity]
include/llvm/module.modulemap
lib/CMakeLists.txt
lib/LLVMBuild.txt
lib/Support/CMakeLists.txt
lib/WindowsManifest/CMakeLists.txt [new file with mode: 0644]
lib/WindowsManifest/LLVMBuild.txt [new file with mode: 0644]
lib/WindowsManifest/WindowsManifestMerger.cpp [moved from lib/Support/WindowsManifestMerger.cpp with 99% similarity]
tools/llvm-mt/CMakeLists.txt
tools/llvm-mt/LLVMBuild.txt
tools/llvm-mt/llvm-mt.cpp

index 3c0c45f585d9ebfb0ef2c22fa2e6bcb4c5ae51c3..e95d0fcd5656f410d4acb20fbc19d9141ff8cf9b 100644 (file)
@@ -306,3 +306,9 @@ module LLVM_Support_DataTypes_Src {
   header "llvm/Support/DataTypes.h"
   export *
 }
+
+module LLVM_WindowsManifest {
+  requires cplusplus
+  umbrella "WindowsManifest"
+  module * { export * }
+}
index 946067e6358f3293798ce1dcf2fe32dfd5376a76..71b0a0aa0d3895e953fc936203d82a454717873a 100644 (file)
@@ -25,3 +25,4 @@ add_subdirectory(Passes)
 add_subdirectory(ToolDrivers)
 add_subdirectory(XRay)
 add_subdirectory(Testing)
+add_subdirectory(WindowsManifest)
index 1d22c2a11f131673a47a82f7daf3e480ce8ebd3c..91c3da53172cf9653c2d75b9dd14d98c384cb4a3 100644 (file)
@@ -42,6 +42,7 @@ subdirectories =
  Testing
  ToolDrivers
  Transforms
+ WindowsManifest
 
 [component_0]
 type = Group
index e258e4df79924c60a787ffea514d2a1b87f87be3..0a8e3897cce92bee0d9e72e8d75c8e5e65476602 100644 (file)
@@ -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 (file)
index 0000000..0bf5f42
--- /dev/null
@@ -0,0 +1,18 @@
+set(system_libs)\r
+if( CMAKE_HOST_UNIX )\r
+  if( LLVM_LIBXML2_ENABLED )\r
+    set(system_libs ${system_libs} ${LIBXML2_LIBS})\r
+  endif()\r
+endif()\r
+\r
+add_llvm_library(LLVMWindowsManifest\r
+  WindowsManifestMerger.cpp\r
+\r
+  ADDITIONAL_HEADER_DIRS\r
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/WindowsManifest\r
+  ${Backtrace_INCLUDE_DIRS}\r
+\r
+  LINK_LIBS ${system_libs}\r
+  )\r
+\r
+set_property(TARGET LLVMWindowsManifest PROPERTY LLVM_SYSTEM_LIBS "${system_libs}")\r
diff --git a/lib/WindowsManifest/LLVMBuild.txt b/lib/WindowsManifest/LLVMBuild.txt
new file mode 100644 (file)
index 0000000..d5de027
--- /dev/null
@@ -0,0 +1,22 @@
+;===- ./lib/WindowsManifest/LLVMBuild.txt ----------------------*- Conf -*--===;\r
+;\r
+;                     The LLVM Compiler Infrastructure\r
+;\r
+; This file is distributed under the University of Illinois Open Source\r
+; License. See LICENSE.TXT for details.\r
+;\r
+;===------------------------------------------------------------------------===;\r
+;\r
+; This is an LLVMBuild description file for the components in this subdirectory.\r
+;\r
+; For more information on the LLVMBuild system, please see:\r
+;\r
+;   http://llvm.org/docs/LLVMBuild.html\r
+;\r
+;===------------------------------------------------------------------------===;\r
+\r
+[component_0]\r
+type = Library\r
+name = WindowsManifest\r
+parent = Libraries\r
+required_libraries = Support\r
similarity index 99%
rename from lib/Support/WindowsManifestMerger.cpp
rename to lib/WindowsManifest/WindowsManifestMerger.cpp
index 59c8a3af42ebad2ea448c13eebe562d47670ed5a..0c9e7fda5795af78e268b0e6a0f2b8e993532617 100644 (file)
@@ -11,7 +11,7 @@
 //
 //===---------------------------------------------------------------------===//
 
-#include "llvm/Support/WindowsManifestMerger.h"
+#include "llvm/WindowsManifest/WindowsManifestMerger.h"
 #include "llvm/Support/MemoryBuffer.h"
 
 #include <stdarg.h>
index d97cc4fe446fa1c946e937309dfebd742074d2bf..e4e99468092145af4cccd0b6ef0571868aad2b61 100644 (file)
@@ -1,6 +1,7 @@
 set(LLVM_LINK_COMPONENTS
   Option
   Support
+  WindowsManifest
   )
 
 set(LLVM_TARGET_DEFINITIONS Opts.td)
index 894d3527924ba847a0552089eda7087f17cf1c21..02fc9ace7552165b017e2f2dbebeb5d8abcdb357 100644 (file)
@@ -19,4 +19,4 @@
 type = Tool
 name = llvm-mt
 parent = Tools
-required_libraries = Option Support
+required_libraries = Option Support WindowsManifest
index eca83b379fbbfee54aeba108b137bedcf44dcf3d..69af6a61c484f6373d466acba72b3d8a9894c724 100644 (file)
@@ -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>