Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into merge-2.109
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Jun 2, 2024
2 parents c006a2a + fd78d7b commit b2ebb2f
Show file tree
Hide file tree
Showing 163 changed files with 881 additions and 21,174 deletions.
36 changes: 22 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ commonSteps: &commonSteps
- run:
name: Install prerequisites
command: |
set -x
set -ux
cd ..
if [ "$CI_OS" = "linux" ]; then
export DEBIAN_FRONTEND=noninteractive
if [[ "$EXTRA_CMAKE_FLAGS" = *-DMULTILIB?ON* ]]; then
if [[ "${EXTRA_CMAKE_FLAGS:-}" = *-DMULTILIB?ON* ]]; then
dpkg --add-architecture i386
gcc_pkg="g++-multilib"
libcurl_pkg="libcurl4 libcurl4:i386"
Expand All @@ -20,7 +20,13 @@ commonSteps: &commonSteps
apt-get -yq install \
git-core $gcc_pkg \
zlib1g-dev $libcurl_pkg curl gdb python3 python3-pip tzdata unzip zip \
$EXTRA_APT_PACKAGES
software-properties-common gnupg \
${EXTRA_APT_PACKAGES:-}
# set up apt.llvm.org repo for being able to install more recent LLVM versions than provided by the distro
curl -fsS https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
add-apt-repository -y "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$LLVM_MAJOR main"
apt-get -q update
apt-get -yq install llvm-$LLVM_MAJOR-dev libclang-common-$LLVM_MAJOR-dev
# Download & extract CMake
curl -fL --retry 3 --max-time 300 -o cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v3.27.1/cmake-3.27.1-linux-x86_64.tar.gz
mkdir cmake
Expand All @@ -39,29 +45,31 @@ commonSteps: &commonSteps
python3 -m pip install --user setuptools wheel
python3 -m pip install --user lit
python3 -c "import lit.main; lit.main.main();" --version . | head -n 1
# Download & extract host LDC
curl -fL --retry 3 --max-time 300 -o ldc2.tar.xz https://github.com/ldc-developers/ldc/releases/download/v$HOST_LDC_VERSION/ldc2-$HOST_LDC_VERSION-$CI_OS-x86_64.tar.xz
mkdir host-ldc
tar -xf ldc2.tar.xz --strip 1 -C host-ldc
rm ldc2.tar.xz
# Download & extract host LDC if HOST_LDC_VERSION is set
if [[ -v HOST_LDC_VERSION ]]; then
curl -fL --retry 3 --max-time 300 -o ldc2.tar.xz https://github.com/ldc-developers/ldc/releases/download/v$HOST_LDC_VERSION/ldc2-$HOST_LDC_VERSION-$CI_OS-x86_64.tar.xz
mkdir host-ldc
tar -xf ldc2.tar.xz --strip 1 -C host-ldc
rm ldc2.tar.xz
fi
- checkout
- run:
name: Checkout git submodules
command: git submodule update --init
- run:
name: Build LDC & LDC D unittests & defaultlib unittest runners
command: |
set -x
set -ux
cd ..
cmake --version
ninja --version
mkdir build
cd build
cmake -G Ninja $CIRCLE_WORKING_DIRECTORY \
-DCMAKE_BUILD_TYPE=Release \
-DD_COMPILER=$PWD/../host-ldc/bin/ldmd2 \
${HOST_LDC_VERSION:+-DD_COMPILER=$PWD/../host-ldc/bin/ldmd2} \
-DLDC_LINK_MANUALLY=OFF \
$EXTRA_CMAKE_FLAGS
${EXTRA_CMAKE_FLAGS:-}
ninja -j$PARALLELISM obj/ldc2.o all ldc2-unittest all-test-runners
bin/ldc2 -version
- run:
Expand Down Expand Up @@ -97,7 +105,7 @@ jobs:
environment:
- PARALLELISM: 4
- CI_OS: linux
- EXTRA_APT_PACKAGES: llvm-11-dev libclang-common-11-dev
- LLVM_MAJOR: 15
- HOST_LDC_VERSION: 1.24.0
- EXTRA_CMAKE_FLAGS: "-DMULTILIB=ON -DRT_SUPPORT_SANITIZERS=ON -DBUILD_LTO_LIBS=ON"
Ubuntu-20.04-sharedLibsOnly-gdmd:
Expand All @@ -108,8 +116,8 @@ jobs:
environment:
- PARALLELISM: 4
- CI_OS: linux
- EXTRA_APT_PACKAGES: gdmd llvm-11-dev libclang-common-11-dev
- HOST_LDC_VERSION: 1.24.0
- LLVM_MAJOR: 15
- EXTRA_APT_PACKAGES: gdmd
- EXTRA_CMAKE_FLAGS: "-DBUILD_SHARED_LIBS=ON -DBUILD_LTO_LIBS=ON -DD_COMPILER=gdmd -DLDC_LINK_MANUALLY=ON"

workflows:
Expand Down
6 changes: 3 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ task:
-DEXTRA_CXXFLAGS=-flto=full
-DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++
-DJITRT_EXTRA_LDFLAGS=-static-libstdc++
-DLDC_INSTALL_LLVM_RUNTIME_LIBS_OS=aarch64-unknown-linux-gnu
-DCOMPILER_RT_LIBDIR_OS=aarch64-unknown-linux-gnu
-DLLVM_ROOT_DIR=$CIRRUS_WORKING_DIR/../llvm
-DD_COMPILER=$CIRRUS_WORKING_DIR/../bootstrap-ldc/bin/ldmd2
PARALLELISM: 4
Expand Down Expand Up @@ -304,9 +304,9 @@ task:
<< : *PACKAGING_STEPS_TEMPLATE

task:
name: FreeBSD 13.2 x64
name: FreeBSD 13.3 x64
freebsd_instance:
image_family: freebsd-13-2
image_family: freebsd-13-3
cpu: 4
memory: 8G
timeout_in: 60m
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ jobs:
arch: aarch64
android_x86_arch: x86_64
extra_cmake_flags: >-
-DLDC_INSTALL_LLVM_RUNTIME_LIBS_OS=linux
-DCOMPILER_RT_LIBDIR_OS=linux
-DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=aarch64-android
name: ${{ matrix.job_name }}
Expand Down
40 changes: 10 additions & 30 deletions .github/workflows/supported_llvm_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ jobs:
fail-fast: false
matrix:
include:
- job_name: Ubuntu 20.04, LDC-LLVM 18, latest LDC beta
- job_name: Ubuntu 20.04, LDC-LLVM 18, bootstrap LDC
os: ubuntu-20.04
host_dc: ldc-beta
host_dc: ldc-1.19.0
# FIXME: no usable official package available yet
llvm_version: https://github.com/ldc-developers/llvm-project/releases/download/ldc-v18.1.5/llvm-18.1.5-linux-x86_64.tar.xz
cmake_flags: -DRT_SUPPORT_SANITIZERS=ON
- job_name: macOS 14, LLVM 17, latest LDC beta
os: macos-14
host_dc: ldc-beta
Expand All @@ -30,30 +31,11 @@ jobs:
host_dc: ldc-beta
llvm_version: 16.0.5
cmake_flags: -DBUILD_SHARED_LIBS=OFF -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DCMAKE_EXE_LINKER_FLAGS=-L/opt/homebrew/opt/zstd/lib
- job_name: Ubuntu 20.04, LLVM 15, latest LDC beta
os: ubuntu-20.04
host_dc: ldc-beta
llvm_version: 15.0.6
- job_name: macOS 11, LLVM 14, latest DMD beta
os: macos-11
host_dc: dmd-beta
llvm_version: 14.0.6
cmake_flags: -DBUILD_SHARED_LIBS=ON -DRT_SUPPORT_SANITIZERS=ON -DLDC_LINK_MANUALLY=ON -DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/cc
- job_name: Ubuntu 20.04, LLVM 13, latest LDC beta
os: ubuntu-20.04
host_dc: ldc-beta
llvm_version: 13.0.1
cmake_flags: -DRT_SUPPORT_SANITIZERS=ON
- job_name: Ubuntu 20.04, LLVM 12, bootstrap LDC
os: ubuntu-20.04
host_dc: ldc-1.19.0
llvm_version: 12.0.1
cmake_flags: -DBUILD_SHARED_LIBS=ON -DLIB_SUFFIX=64
- job_name: Ubuntu 20.04, LLVM 11, latest DMD beta
- job_name: Ubuntu 20.04, LLVM 15, latest DMD beta
os: ubuntu-20.04
host_dc: dmd-beta
llvm_version: 11.1.0
cmake_flags: -DBUILD_SHARED_LIBS=OFF -DRT_SUPPORT_SANITIZERS=ON -DLDC_LINK_MANUALLY=ON
llvm_version: 15.0.6
cmake_flags: -DBUILD_SHARED_LIBS=ON -DRT_SUPPORT_SANITIZERS=ON -DLIB_SUFFIX=64 -DLDC_LINK_MANUALLY=ON
name: ${{ matrix.job_name }}
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -116,10 +98,8 @@ jobs:
fi
elif [[ "$version" =~ ^1[7-9]\. ]]; then
suffix='x86_64-linux-gnu-ubuntu-22.04' # LLVM 17+
elif [[ "$version" =~ ^1[3-6]\. ]]; then
suffix='x86_64-linux-gnu-ubuntu-18.04' # LLVM 13.0.1+
else
suffix='x86_64-linux-gnu-ubuntu-16.04'
suffix='x86_64-linux-gnu-ubuntu-18.04' # LLVM 14+
fi
url="https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/clang+llvm-$version-$suffix.tar.xz"
Expand All @@ -136,7 +116,7 @@ jobs:
fi
- name: 'Linux: Make lld the default linker'
if: runner.os == 'Linux' && matrix.host_dc != 'ldc-1.9.0'
if: runner.os == 'Linux'
run: |
set -eux
echo "Using lld to work around sporadic failures"
Expand All @@ -161,8 +141,8 @@ jobs:
if: success() || failure()
run: |
set -eux
# LLVM 14+ on Linux: don't use vanilla llvm-symbolizer (no support for zlib-compressed debug sections => failing ASan tests)
if [[ '${{ runner.os }}' == 'Linux' && ! '${{ matrix.llvm_version }}' =~ ^1[1-3]\. ]]; then
# Linux: don't use vanilla llvm-symbolizer (no support for zlib-compressed debug sections => failing ASan tests)
if [[ '${{ runner.os }}' == 'Linux' ]]; then
mv llvm/bin/llvm-symbolizer llvm/bin/llvm-symbolizer.bak
fi
ctest -V -R "lit-tests"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#### Big news

#### Platform support
- Supports LLVM 15 - 18. Support for LLVM 11 - 14 was dropped. The CLI options `-passmanager` and `-opaque-pointers` were removed.

#### Bug fixes

Expand Down
Loading

0 comments on commit b2ebb2f

Please sign in to comment.