mirror of
				https://git.proxmox.com/git/llvm-toolchain
				synced 2025-11-04 02:06:05 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
		
			720 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			720 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
 | 
						|
set -e
 | 
						|
 | 
						|
LLVM_VERSION=17
 | 
						|
 | 
						|
# this is taken from libjsoncpp package
 | 
						|
# Presence of $AUTOPKGTEST_TMP implies that someone will handle cleanup for us, so we
 | 
						|
# can avoid duplicating the effort (signal handling, etc.) here.
 | 
						|
if [ -z "$AUTOPKGTEST_TMP" ]
 | 
						|
then
 | 
						|
	echo "Required envvar AUTOPKGTEST_TMP \"$AUTOPKGTEST_TMP\" is not set" >&2
 | 
						|
	exit 1
 | 
						|
fi
 | 
						|
 | 
						|
 | 
						|
# the idea was taken from spirv-llvm-translator package
 | 
						|
 | 
						|
cd "$AUTOPKGTEST_TMP"
 | 
						|
cat <<EOF > CMakeLists.txt
 | 
						|
cmake_minimum_required(VERSION 3.22)
 | 
						|
project(cmake-llvm-test)
 | 
						|
find_package(LLVM $LLVM_VERSION REQUIRED
 | 
						|
  COMPONENTS
 | 
						|
    Analysis
 | 
						|
    BitReader
 | 
						|
    BitWriter
 | 
						|
    Core
 | 
						|
    Support
 | 
						|
    TransformUtils
 | 
						|
    llvm-as
 | 
						|
    llvm-dis
 | 
						|
)
 | 
						|
 | 
						|
EOF
 | 
						|
 | 
						|
 | 
						|
mkdir build && cd build
 | 
						|
cmake ..
 |