mirror of
				https://git.proxmox.com/git/llvm-toolchain
				synced 2025-10-31 10:24:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From d0d969074f6e0f975ad53d21e7ce6c7b40cf2957 Mon Sep 17 00:00:00 2001
 | |
| From: Peter Wu <peter@lekensteyn.nl>
 | |
| Date: Fri, 4 May 2018 15:43:06 +0200
 | |
| Subject: [PATCH] [llvm] cmake: resolve symlinks in LLVMConfig.cmake
 | |
| 
 | |
| Ensure that symlinks such as /usr/lib/llvm-X.Y/cmake (pointing to
 | |
| lib/cmake/llvm) are resolved. This ensures that LLVM_INSTALL_PREFIX
 | |
| becomes /usr/lib/llvm-X.Y instead of /usr.
 | |
| 
 | |
| Partially addresses PR37128
 | |
| ---
 | |
|  cmake/modules/CMakeLists.txt | 4 ++--
 | |
|  1 file changed, 2 insertions(+), 2 deletions(-)
 | |
| 
 | |
| Index: llvm-toolchain-snapshot_11~++20200326111000+4673699a470/llvm/cmake/modules/CMakeLists.txt
 | |
| ===================================================================
 | |
| --- llvm-toolchain-snapshot_11~++20200326111000+4673699a470.orig/llvm/cmake/modules/CMakeLists.txt
 | |
| +++ llvm-toolchain-snapshot_11~++20200326111000+4673699a470/llvm/cmake/modules/CMakeLists.txt
 | |
| @@ -88,10 +88,10 @@ file(COPY .
 | |
|  # Generate LLVMConfig.cmake for the install tree.
 | |
|  set(LLVM_CONFIG_CODE "
 | |
|  # Compute the installation prefix from this LLVMConfig.cmake file location.
 | |
| -get_filename_component(LLVM_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)")
 | |
| +get_filename_component(LLVM_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" REALPATH)")
 | |
|  # Construct the proper number of get_filename_component(... PATH)
 | |
|  # calls to compute the installation prefix.
 | |
| -string(REGEX REPLACE "/" ";" _count "${LLVM_INSTALL_PACKAGE_DIR}")
 | |
| +string(REGEX REPLACE "/" ";" _count "prefix/${LLVM_INSTALL_PACKAGE_DIR}")
 | |
|  foreach(p ${_count})
 | |
|    set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE}
 | |
|  get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)")
 | 
