Skip to content

Commit

Permalink
CI: Use LDC-LLVM v15.0.7 for prebuilt packages
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Feb 24, 2023
1 parent 5c48fb2 commit fd6e761
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
environment:
- PARALLELISM: 4
- CI_OS: osx
- LLVM_VERSION: 14.0.3
- LLVM_VERSION: 15.0.7
- HOST_LDC_VERSION: 1.24.0
- EXTRA_CMAKE_FLAGS: "-DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DBUILD_LTO_LIBS=ON"
- MACOSX_DEPLOYMENT_TARGET: 11.0 # silence `ld: warning: object file (…/libphobos2-ldc.a(adler32.c.o)) was built for newer macOS version (11.6) than being linked (11.0)`
Expand All @@ -138,7 +138,7 @@ jobs:
environment:
- PARALLELISM: 4
- CI_OS: osx
- LLVM_VERSION: 14.0.3
- LLVM_VERSION: 15.0.7
- HOST_LDC_VERSION: 1.24.0
- EXTRA_CMAKE_FLAGS: "-DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DBUILD_SHARED_LIBS=ON -DBUILD_LTO_LIBS=ON"
- MACOSX_DEPLOYMENT_TARGET: 11.0
Expand Down
39 changes: 17 additions & 22 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,12 @@ install_macos_prerequisites_template: &INSTALL_MACOS_PREREQUISITES_TEMPLATE
mkdir ninja
tar -xf ninja-mac.zip -C ninja
rm ninja-mac.zip
# Download & extract LDC-flavoured LLVM (no withAsserts package available for arm64 yet)
assertsSuffix=""
if [[ "$CI_ARCH" == "x86_64" ]]; then
echo 'Using LLVM with enabled assertions'
assertsSuffix="-withAsserts"
fi
curl -fL --retry 3 --max-time 300 -o llvm.tar.xz https://github.com/ldc-developers/llvm-project/releases/download/ldc-v$LLVM_VERSION/llvm-$LLVM_VERSION-osx-${CI_ARCH}${assertsSuffix}.tar.xz
# Download & extract LDC-flavoured LLVM
echo 'Using LLVM with enabled assertions'
assertsSuffix="-withAsserts"
llvm_tag="CI"
if [[ "$LLVM_VERSION" == *.* ]]; then llvm_tag="ldc-v$LLVM_VERSION"; fi
curl -fL --retry 3 --max-time 300 -o llvm.tar.xz https://github.com/ldc-developers/llvm-project/releases/download/$llvm_tag/llvm-$LLVM_VERSION-osx-${CI_ARCH}${assertsSuffix}.tar.xz
mkdir llvm
tar -xf llvm.tar.xz --strip 1 -C llvm
rm llvm.tar.xz
Expand All @@ -228,7 +227,8 @@ install_macos_prerequisites_template: &INSTALL_MACOS_PREREQUISITES_TEMPLATE
environment:
CIRRUS_CLONE_DEPTH: 50
HOST_LDC_VERSION: 1.24.0
HOST_LDC_VERSION: 1.31.0
LLVM_VERSION: 15.0.7
GITHUB_TOKEN: ENCRYPTED[0955bd48c8d4e5391446fc0149d0719ad0b63df27ec9e6c180a5730a5b10dc7f28f09d1383423db158d21380ee2b022a]

task:
Expand Down Expand Up @@ -289,30 +289,26 @@ task:
allow_failures: true # FIXME
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
timeout_in: 15m
timeout_in: 25m
environment:
CI_OS: osx
LLVM_VERSION: 14.0.3
# OS is preset to `darwin`
OS: osx
PATH: ${CIRRUS_WORKING_DIR}/../cmake/bin:${CIRRUS_WORKING_DIR}/../ninja:${CIRRUS_WORKING_DIR}/../llvm/bin:${PATH}
PARALLELISM: 4
matrix:
#- TASK_NAME_SUFFIX: x64 (M1)
# EXTRA_CMAKE_FLAGS: "-DCMAKE_OSX_ARCHITECTURES=x86_64 -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DBUILD_LTO_LIBS=ON"
# EXTRA_CMAKE_FLAGS: -DCMAKE_OSX_ARCHITECTURES=x86_64 -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DBUILD_LTO_LIBS=ON
# CI_ARCH: x86_64
#- TASK_NAME_SUFFIX: x64 (M1) shared-libs-only
# EXTRA_CMAKE_FLAGS: "-DCMAKE_OSX_ARCHITECTURES=x86_64 -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DBUILD_LTO_LIBS=ON -DBUILD_SHARED_LIBS=ON"
# EXTRA_CMAKE_FLAGS: -DCMAKE_OSX_ARCHITECTURES=x86_64 -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DBUILD_LTO_LIBS=ON -DBUILD_SHARED_LIBS=ON
# CI_ARCH: x86_64
- TASK_NAME_SUFFIX: arm64
# no line infos for ldc2 unittests (compiled with -g with v1.30 host compiler - https://github.com/ldc-developers/ldc/issues/3864)
EXTRA_CMAKE_FLAGS: "-DDFLAGS_LDC=-preserve-dwarf-line-section=false -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DBUILD_LTO_LIBS=ON"
EXTRA_CMAKE_FLAGS: -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DBUILD_LTO_LIBS=ON
CI_ARCH: arm64
HOST_LDC_VERSION: 1.30.0
- TASK_NAME_SUFFIX: arm64 shared-libs-only
EXTRA_CMAKE_FLAGS: "-DDFLAGS_LDC=-preserve-dwarf-line-section=false -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DBUILD_LTO_LIBS=ON -DBUILD_SHARED_LIBS=ON"
EXTRA_CMAKE_FLAGS: -DD_COMPILER_FLAGS=-gcc=/usr/bin/c++ -DBUILD_LTO_LIBS=ON -DBUILD_SHARED_LIBS=ON
CI_ARCH: arm64
HOST_LDC_VERSION: 1.30.0
brew_cache:
folder: "$HOME/Library/Caches/Homebrew"
<< : *INSTALL_MACOS_PREREQUISITES_TEMPLATE
Expand All @@ -339,8 +335,7 @@ task:
-DLLVM_ROOT_DIR=$CIRRUS_WORKING_DIR/../llvm
-DD_COMPILER=$CIRRUS_WORKING_DIR/../bootstrap-ldc/bin/ldmd2
PARALLELISM: 4
LLVM_VERSION: 14.0.3
CLANG_VERSION: 14.0.0
CLANG_VERSION: '14.0.6' # 15.0.6 requires libtinfo.so.6 (but Ubuntu 18 has v5 only)
CC: $CIRRUS_WORKING_DIR/../clang/bin/clang
CXX: $CIRRUS_WORKING_DIR/../clang/bin/clang++
<< : *INSTALL_UBUNTU_PREREQUISITES_TEMPLATE
Expand All @@ -359,16 +354,16 @@ task:
mkdir -p llvm
tar -xf llvm.tar.xz --strip 1 -C llvm
rm llvm.tar.xz
# Make lld the default linker (likely with enabled assertions unfortunately)
ln -sf "$PWD/llvm/bin/ld.lld" /usr/bin/ld
ld --version
# Download & extract clang
download_prebuilt_clang_script: |
cd $CIRRUS_WORKING_DIR/..
curl -fL --retry 3 --max-time 300 -o clang.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-$CLANG_VERSION/clang+llvm-$CLANG_VERSION-$CI_ARCH-linux-gnu.tar.xz
mkdir clang
tar -xf clang.tar.xz --strip 1 -C clang
rm clang.tar.xz
# Make lld the default linker
ln -sf "$PWD/clang/bin/ld.lld" /usr/bin/ld
ld --version
clone_submodules_early_script: |
cd $CIRRUS_WORKING_DIR
git submodule update --init --depth $CIRRUS_CLONE_DEPTH
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ concurrency:
cancel-in-progress: true

env:
CLANG_VERSION: 14.0.0
LLVM_VERSION: 14.0.3
CLANG_VERSION: 15.0.6
LLVM_VERSION: 15.0.7

jobs:
build-native:
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
with_pgo: true

- job_name: Windows x64
os: windows-2019
os: windows-2022
arch: x64
bootstrap_cmake_flags: -DBUILD_LTO_LIBS=ON
extra_cmake_flags: >-
Expand All @@ -59,7 +59,7 @@ jobs:
with_pgo: true

- job_name: Windows x86
os: windows-2019
os: windows-2022
arch: x86
bootstrap_cmake_flags: -DBUILD_LTO_LIBS=ON
# Undefined symbol errors with FullLTO; ThinLTO works.
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

#### Big news
- Linker-level dead code elimination is enabled by default for Apple, wasm and *all* ELF targets too now. (#4320)
- LLVM for prebuilt packages bumped to v15.0.7. (#4311)

#### Platform support
- Supports LLVM 9.0 - 15.0.

#### Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ app:
- BITRISE_PROJECT_PATH: ldc-build-runtime.tmp/TestRunner/TestRunner.xcodeproj
- BITRISE_SCHEME: TestRunner
- BITRISE_EXPORT_METHOD: development
- LLVM_VERSION: 14.0.3
- LLVM_VERSION: 15.0.7
- HOST_LDC_VERSION: 1.24.0
- IOS_VERSION: 12.0

Expand Down

0 comments on commit fd6e761

Please sign in to comment.