Drop references to TestPlugin.so from cmake files
This commit is contained in:
		
							parent
							
								
									a894547e62
								
							
						
					
					
						commit
						5636e80d6b
					
				
							
								
								
									
										62
									
								
								0001-unittests-Don-t-install-TestPlugin.so.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								0001-unittests-Don-t-install-TestPlugin.so.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,62 @@ | |||||||
|  | From cf1fb43186fd4d97ee2de0b222d44ecc500f82c7 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Tom Stellard <tstellar@redhat.com> | ||||||
|  | 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 | ||||||
|  | 
 | ||||||
| @ -49,7 +49,7 @@ | |||||||
| 
 | 
 | ||||||
| Name:		%{pkg_name} | Name:		%{pkg_name} | ||||||
| Version:	%{maj_ver}.%{min_ver}.%{patch_ver} | 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 | Summary:	The Low Level Virtual Machine | ||||||
| 
 | 
 | ||||||
| License:	NCSA | 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 | Patch10:	0001-Don-t-run-BV-DAG-Combine-before-legalization-if-it-a.patch | ||||||
| Patch11:	0001-gold-Fix-Tests-cases-on-i686.patch | Patch11:	0001-gold-Fix-Tests-cases-on-i686.patch | ||||||
|  | Patch12:	0001-unittests-Don-t-install-TestPlugin.so.patch | ||||||
| 
 | 
 | ||||||
| BuildRequires:  gcc | BuildRequires:  gcc | ||||||
| BuildRequires:  gcc-c++ | BuildRequires:  gcc-c++ | ||||||
| @ -202,9 +203,6 @@ ninja -v | |||||||
| cd _build | cd _build | ||||||
| ninja -v install | ninja -v install | ||||||
| 
 | 
 | ||||||
| # FIXME: Patch upstream to not install this |  | ||||||
| rm %{buildroot}%{install_libdir}/TestPlugin.so |  | ||||||
| 
 |  | ||||||
| %if !0%{?compat_build} | %if !0%{?compat_build} | ||||||
| # fix multi-lib | # fix multi-lib | ||||||
| mv -v %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}} | mv -v %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}} | ||||||
| @ -335,6 +333,9 @@ fi | |||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Mon Aug 13 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.3.rc1 | ||||||
|  | - Drop references to TestPlugin.so from cmake files | ||||||
|  | 
 | ||||||
| * Fri Aug 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.2.rc1 | * Fri Aug 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.2.rc1 | ||||||
| - Fixes for lit tests | - Fixes for lit tests | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user