diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d76e325e8b6..1dfc556cd6b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,12 +5,19 @@ ARG VARIANT="6.0-jammy" FROM mcr.microsoft.com/devcontainers/dotnet:0-${VARIANT} +# Set up machine requirements to build the repo and the gh CLI +# Clang-16 up is required but Ubuntu 22.04 comes with clang-14 highest, so add clang-18 sources +RUN apt-get update \ + && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - \ + && apt-get install software-properties-common -y \ + && add-apt-repository "deb http://apt.llvm.org/$(lsb_release -s -c)/ llvm-toolchain-$(lsb_release -s -c)-18 main" -y \ + && apt-get update \ + && apt-get install clang-18 -y + # Set up machine requirements to build the repo and the gh CLI RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && apt-get -y install --no-install-recommends \ cmake \ - llvm \ - clang \ build-essential \ python3 \ curl \ diff --git a/.devcontainer/wasm-multiThreaded/Dockerfile b/.devcontainer/wasm-multiThreaded/Dockerfile index 75f2465b391..9062a8b8570 100644 --- a/.devcontainer/wasm-multiThreaded/Dockerfile +++ b/.devcontainer/wasm-multiThreaded/Dockerfile @@ -5,12 +5,19 @@ ARG VARIANT="6.0-jammy" FROM mcr.microsoft.com/devcontainers/dotnet:0-${VARIANT} +# Set up machine requirements to build the repo and the gh CLI +# Clang-16 up is required but Ubuntu 22.04 comes with clang-14 highest, so add clang-18 sources +RUN apt-get update \ + && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - \ + && apt-get install software-properties-common -y \ + && add-apt-repository "deb http://apt.llvm.org/$(lsb_release -s -c)/ llvm-toolchain-$(lsb_release -s -c)-18 main" -y \ + && apt-get update \ + && apt-get install clang-18 -y + # Set up machine requirements to build the repo and the gh CLI RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && apt-get -y install --no-install-recommends \ cmake \ - llvm \ - clang \ build-essential \ python3 \ curl \ diff --git a/.devcontainer/wasm/Dockerfile b/.devcontainer/wasm/Dockerfile index 75f2465b391..1dcab2652c6 100644 --- a/.devcontainer/wasm/Dockerfile +++ b/.devcontainer/wasm/Dockerfile @@ -6,11 +6,17 @@ ARG VARIANT="6.0-jammy" FROM mcr.microsoft.com/devcontainers/dotnet:0-${VARIANT} # Set up machine requirements to build the repo and the gh CLI +# Clang-16 up is required but Ubuntu 22.04 comes with clang-14 highest, so add clang-18 sources +RUN apt-get update \ + && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - \ + && apt-get install software-properties-common -y \ + && add-apt-repository "deb http://apt.llvm.org/$(lsb_release -s -c)/ llvm-toolchain-$(lsb_release -s -c)-18 main" -y \ + && apt-get update \ + && apt-get install clang-18 -y + RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && apt-get -y install --no-install-recommends \ cmake \ - llvm \ - clang \ build-essential \ python3 \ curl \ diff --git a/docs/workflow/requirements/linux-requirements.md b/docs/workflow/requirements/linux-requirements.md index 6b4aa1ee65e..053b2d98616 100644 --- a/docs/workflow/requirements/linux-requirements.md +++ b/docs/workflow/requirements/linux-requirements.md @@ -37,7 +37,7 @@ Install the following packages for the toolchain: * CMake 3.20 or newer * llvm * lld -* clang +* clang 16 or newer * build-essential * python-is-python3 * curl @@ -59,6 +59,7 @@ sudo apt install -y cmake llvm lld clang build-essential \ ``` **NOTE**: As of now, Ubuntu's `apt` only has until CMake version 3.16.3 if you're using Ubuntu 20.04 LTS (less in older Ubuntu versions), and version 3.18.4 in Debian 11 (less in older Debian versions). This is lower than the required 3.20, which in turn makes it incompatible with the repo. For this case, we can use the `snap` package manager or the _Kitware APT feed_ to get a new enough version of CMake. +**NOTE**: If you have Ubuntu 22.04 LTS and older and your `apt` does not have clang version 16, you can add `"deb http://apt.llvm.org/$(lsb_release -s -c)/ llvm-toolchain-$(lsb_release -s -c)-18 main"` repository to your `apt`. See how we do it for linux-based containers [here](./../../../.devcontainer/Dockerfile). For snap: