Skip to content

Commit ecf98ed

Browse files
michalkr52igcbot
authored andcommitted
Refresh build scripts
Removed Ubuntu 20.04 support from build scripts. Updated `add-apt-repository` section to current versions. Unified buildSLT.sh to versions in buildIGC.sh.
1 parent 06dfb54 commit ecf98ed

File tree

2 files changed

+14
-41
lines changed

2 files changed

+14
-41
lines changed

scripts/buildIGC.sh

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
#=========================== begin_copyright_notice ============================
44
#
5-
# Copyright (C) 2022 Intel Corporation
5+
# Copyright (C) 2022-2025 Intel Corporation
66
#
77
# SPDX-License-Identifier: MIT
88
#
99
#============================ end_copyright_notice =============================
1010

1111
set -e
12-
# UBUNTU_VERSION supported value [ 20.04, 22.04, 24.04 ] default 24.04
12+
# UBUNTU_VERSION supported value [ 22.04, 24.04 ] default 24.04
1313
# LLVM_VERSION supported value [ 14, 15, 16 ] default 16
1414
# COMPILER supported value [ gcc, clang ] default gcc
1515
# OWN_CMAKE_FLAGS not suported but can be use as WA (each flag should be with -D prefix) default empty
@@ -52,25 +52,12 @@ apt-get update
5252
apt-get install -y flex bison libz-dev cmake curl wget build-essential git software-properties-common unzip file lsb-release python3-mako libc6 libstdc++6 libzstd-dev
5353
echo "[Build Status] flex bison libz-dev cmake curl wget build-essential git software-properties-common unzip file INSTALLED"
5454

55-
if [ "$UBUNTU_VERSION" = "20.04" ]; then
56-
echo "[Build Status] Download new cmake version for Ubuntu 20.04";
57-
apt-get purge -y --auto-remove cmake
58-
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
59-
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
60-
apt-get update
61-
apt-get install -y cmake
62-
fi
63-
64-
if ([ "$UBUNTU_VERSION" = "20.04" ] && [ "$LLVM_VERSION" -ge 14 ]) || ([ "$UBUNTU_VERSION" = "22.04" ] && [ "$LLVM_VERSION" -ge 15 ])
55+
if ([ "$UBUNTU_VERSION" = "22.04" ] && [ "$LLVM_VERSION" -ge 16 ])
6556
then
6657
echo "[Build Status] Retrieve the LLVM archive signature for LLVM $LLVM_VERSION on Ubuntu $UBUNTU_VERSION";
6758
wget -q https://apt.llvm.org/llvm-snapshot.gpg.key
6859
apt-key add llvm-snapshot.gpg.key
69-
case "$UBUNTU_VERSION" in
70-
20.04) OS_HANDLE=focal;;
71-
22.04) OS_HANDLE=jammy;;
72-
esac
73-
add-apt-repository "deb http://apt.llvm.org/$OS_HANDLE/ llvm-toolchain-$OS_HANDLE-$LLVM_VERSION main"
60+
add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-$LLVM_VERSION main"
7461
fi
7562

7663
apt-get install -y llvm-"$LLVM_VERSION" llvm-"$LLVM_VERSION"-dev clang-"$LLVM_VERSION" liblld-"$LLVM_VERSION" liblld-"$LLVM_VERSION"-dev

scripts/buildSLT.sh

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,28 @@
22

33
#=========================== begin_copyright_notice ============================
44
#
5-
# Copyright (C) 2022 Intel Corporation
5+
# Copyright (C) 2022-2025 Intel Corporation
66
#
77
# SPDX-License-Identifier: MIT
88
#
99
#============================ end_copyright_notice =============================
1010

1111
set -e
12-
# UBUNTU_VERSION supported value [ 20, 22 ] default 20
13-
# LLVM_VERSION supported value [ 10, 11, 12, 13, 14, 15] default 11
14-
# OWN_CMAKE_FLAGS not suported but can be use as WA (each flag should be with -D prefix) default empty
15-
# example run: UBUNTU_VERSION=ubuntu2004 LLVM_VERSION=11 sh /home/buildSLT.sh
12+
# UBUNTU_VERSION supported value [ 22.04, 24.04 ] default 24.04
13+
# LLVM_VERSION supported value [ 14, 15, 16 ] default 16
14+
# example run: UBUNTU_VERSION=24.04 LLVM_VERSION=16 sh /home/buildSLT.sh
1615

1716
echo "====================BUILD SPIRV-LLVM-Translator========================="
1817
echo "[Build Status] build script started"
1918
if [ -z ${UBUNTU_VERSION+x} ]; then
20-
echo "[Build Status] UBUNTU_VERSION is unset, use default 20";
21-
UBUNTU_VERSION="20.04"
19+
echo "[Build Status] UBUNTU_VERSION is unset, use default 24.04";
20+
UBUNTU_VERSION="24.04"
2221
else
2322
echo "[Build Status] UBUNTU_VERSION = ${UBUNTU_VERSION}"
2423
fi
2524
if [ -z ${LLVM_VERSION+x} ]; then
26-
echo "[Build Status] LLVM_VERSION is unset, use default 14";
27-
LLVM_VERSION="14"
25+
echo "[Build Status] LLVM_VERSION is unset, use default 16";
26+
LLVM_VERSION="16"
2827
else
2928
echo "[Build Status] LLVM_VERSION = ${LLVM_VERSION}"
3029
fi
@@ -33,25 +32,12 @@ apt-get update
3332
apt-get install -y flex bison libz-dev cmake curl wget build-essential git software-properties-common unzip lsb-release
3433
echo "[Build Status] flex bison libz-dev cmake curl wget build-essential git software-properties-common INSTALLED"
3534

36-
if [ "$UBUNTU_VERSION" = "20.04" ]; then
37-
echo "[Build Status] Download new cmake version for Ubuntu 20.04";
38-
apt-get purge -y --auto-remove cmake
39-
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
40-
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
41-
apt-get update
42-
apt-get install -y cmake
43-
fi
44-
45-
if ([ "$UBUNTU_VERSION" = "20.04" ] && [ "$LLVM_VERSION" -ge 14 ]) || ([ "$UBUNTU_VERSION" = "22.04" ] && [ "$LLVM_VERSION" -ge 15 ])
35+
if ([ "$UBUNTU_VERSION" = "22.04" ] && [ "$LLVM_VERSION" -ge 16 ])
4636
then
4737
echo "[Build Status] Retrieve the LLVM archive signature for LLVM $LLVM_VERSION on Ubuntu $UBUNTU_VERSION";
4838
wget -q https://apt.llvm.org/llvm-snapshot.gpg.key
4939
apt-key add llvm-snapshot.gpg.key
50-
case "$UBUNTU_VERSION" in
51-
20.04) OS_HANDLE=focal;;
52-
22.04) OS_HANDLE=jammy;;
53-
esac
54-
add-apt-repository "deb http://apt.llvm.org/$OS_HANDLE/ llvm-toolchain-$OS_HANDLE-$LLVM_VERSION main"
40+
add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-$LLVM_VERSION main"
5541
fi
5642

5743
apt-get install -y llvm-"$LLVM_VERSION" llvm-"$LLVM_VERSION"-dev clang-"$LLVM_VERSION" liblld-"$LLVM_VERSION" liblld-"$LLVM_VERSION"-dev

0 commit comments

Comments
 (0)