From 5636e80d6bd1b3cc2c55221473e38d030846dd3b Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 13 Aug 2018 21:00:15 +0000 Subject: [PATCH] Drop references to TestPlugin.so from cmake files --- ...nittests-Don-t-install-TestPlugin.so.patch | 62 +++++++++++++++++++ llvm.spec | 9 +-- 2 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 0001-unittests-Don-t-install-TestPlugin.so.patch diff --git a/0001-unittests-Don-t-install-TestPlugin.so.patch b/0001-unittests-Don-t-install-TestPlugin.so.patch new file mode 100644 index 0000000..f614036 --- /dev/null +++ b/0001-unittests-Don-t-install-TestPlugin.so.patch @@ -0,0 +1,62 @@ +From cf1fb43186fd4d97ee2de0b222d44ecc500f82c7 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Mon, 13 Aug 2018 12:22:28 -0700 +Subject: [PATCH] unittests: Don't install TestPlugin.so + +add_llvm_loadable_module adds an install target by default, but this +module is only used for a unit test, so we don't need to instal it. + +This patch adds a NO_INSTALL option to add_llvm_loadable_module that +can be used to disable installation of modules. +--- + cmake/modules/AddLLVM.cmake | 13 ++++++++----- + unittests/Passes/CMakeLists.txt | 2 +- + 2 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake +index 24ef5e4..1637ba6 100644 +--- a/cmake/modules/AddLLVM.cmake ++++ b/cmake/modules/AddLLVM.cmake +@@ -671,7 +671,8 @@ macro(add_llvm_library name) + endmacro(add_llvm_library name) + + macro(add_llvm_loadable_module name) +- llvm_add_library(${name} MODULE ${ARGN}) ++ cmake_parse_arguments(ARG "NO_INSTALL" "" "" ${ARGN}) ++ llvm_add_library(${name} MODULE ${ARG_UNPARSED_ARGUMENTS}) + if(NOT TARGET ${name}) + # Add empty "phony" target + add_custom_target(${name}) +@@ -693,10 +694,12 @@ macro(add_llvm_loadable_module name) + set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True) + endif() + +- install(TARGETS ${name} +- ${export_to_llvmexports} +- LIBRARY DESTINATION ${dlldir} +- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) ++ if (NOT ARG_NO_INSTALL) ++ install(TARGETS ${name} ++ ${export_to_llvmexports} ++ LIBRARY DESTINATION ${dlldir} ++ ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) ++ endif() + endif() + set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) + endif() +diff --git a/unittests/Passes/CMakeLists.txt b/unittests/Passes/CMakeLists.txt +index d90df20..99390e6 100644 +--- a/unittests/Passes/CMakeLists.txt ++++ b/unittests/Passes/CMakeLists.txt +@@ -14,7 +14,7 @@ add_llvm_unittest(PluginsTests + export_executable_symbols(PluginsTests) + + set(LLVM_LINK_COMPONENTS) +-add_llvm_loadable_module(TestPlugin ++add_llvm_loadable_module(TestPlugin NO_INSTALL + TestPlugin.cpp + ) + +-- +1.8.3.1 + diff --git a/llvm.spec b/llvm.spec index 7292e5b..28a2309 100644 --- a/llvm.spec +++ b/llvm.spec @@ -49,7 +49,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 0.2.rc%{rc_ver}%{?dist} +Release: 0.3.rc%{rc_ver}%{?dist} Summary: The Low Level Virtual Machine License: NCSA @@ -61,6 +61,7 @@ Patch7: 0001-Filter-out-cxxflags-not-supported-by-clang.patch Patch10: 0001-Don-t-run-BV-DAG-Combine-before-legalization-if-it-a.patch Patch11: 0001-gold-Fix-Tests-cases-on-i686.patch +Patch12: 0001-unittests-Don-t-install-TestPlugin.so.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -202,9 +203,6 @@ ninja -v cd _build ninja -v install -# FIXME: Patch upstream to not install this -rm %{buildroot}%{install_libdir}/TestPlugin.so - %if !0%{?compat_build} # fix multi-lib mv -v %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}} @@ -335,6 +333,9 @@ fi %endif %changelog +* Mon Aug 13 2018 Tom Stellard - 7.0.0-0.3.rc1 +- Drop references to TestPlugin.so from cmake files + * Fri Aug 10 2018 Tom Stellard - 7.0.0-0.2.rc1 - Fixes for lit tests