Skip to content

Commit 470c82e

Browse files
Artem Gindinsonvmaksimo
authored andcommitted
Facilitate pre-installed Clang detection for in-tree builds
Comply with LLORG community changes in llvm/llvm-project@a1e6565. Signed-off-by: Artem Gindinson <artem.gindinson@intel.com> Original commit: KhronosGroup/SPIRV-LLVM-Translator@efa761b
1 parent 1d141b1 commit 470c82e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

llvm-spirv/.github/workflows/check-in-tree-build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,11 @@ jobs:
5454
echo "deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic main" | sudo tee -a /etc/apt/sources.list
5555
echo "deb https://packages.lunarg.com/vulkan bionic main" | sudo tee -a /etc/apt/sources.list
5656
sudo apt-get update
57-
# Linux systems in GitHub Actions already have a pre-installed clang
58-
# that is not needed for the translator as we rely on newer version
59-
sudo apt-get --purge remove clang-8 clang-9
6057
sudo apt-get -yq --no-install-suggests --no-install-recommends install \
6158
clang-${{ env.LLVM_VERSION }} \
6259
spirv-tools
60+
# Linux systems in GitHub Actions already have older versions of clang
61+
# pre-installed. Make sure to override these with the relevant version.
6362
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.LLVM_VERSION }} 1000
6463
- name: Checkout LLVM sources
6564
uses: actions/checkout@v2

llvm-spirv/.github/workflows/check-out-of-tree-build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,14 @@ jobs:
4747
echo "deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic main" | sudo tee -a /etc/apt/sources.list
4848
echo "deb https://packages.lunarg.com/vulkan bionic main" | sudo tee -a /etc/apt/sources.list
4949
sudo apt-get update
50-
# Linux systems in GitHub Actions already have a pre-installed clang
51-
# that is not needed for the translator as we rely on newer version
52-
sudo apt-get --purge remove clang-8 clang-9
5350
sudo apt-get -yq --no-install-suggests --no-install-recommends install \
5451
clang-${{ env.LLVM_VERSION }} \
5552
llvm-${{ env.LLVM_VERSION }}-dev \
5653
libomp-${{ env.LLVM_VERSION }}-dev \
5754
llvm-${{ env.LLVM_VERSION }}-tools \
5855
spirv-tools
56+
# Linux systems in GitHub Actions already have older versions of clang
57+
# pre-installed. Make sure to override these with the relevant version.
5958
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.LLVM_VERSION }} 1000
6059
- name: Checkout the translator sources
6160
uses: actions/checkout@v2

llvm-spirv/test/lit.cfg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141

4242
llvm_config.use_default_substitutions()
4343

44-
llvm_config.use_clang()
44+
# Explicitly set `use_installed` to alleviate downstream CI pipelines of
45+
# any additional environment setup for pre-installed Clang usage.
46+
llvm_config.use_clang(use_installed=True)
4547

4648
config.substitutions.append(('%PATH%', config.environment['PATH']))
4749

0 commit comments

Comments
 (0)