From cd06e9103283c2f3af284077799fc6c7081e9281 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Tue, 20 Aug 2024 20:19:37 +0200 Subject: [PATCH] Merge pull request https://github.com/ldc-developers/ldc/pull/4736 from kinke/fix4734 Get rid of cycles in DtoType() Merge pull request #4712 from kinke/bump_ldc_llvm Bump LDC-LLVM to v18.1.8 Revert "Merge pull request https://github.com/ldc-developers/ldc/pull/4736 from kinke/fix4734" This reverts commit 53dc56a73f0704bee6fc5db82bae5e0d0b98f82b. --- .cirrus.yml | 2 +- .github/actions/1-setup/action.yml | 3 ++- .github/workflows/main.yml | 15 ++++++++++----- .github/workflows/supported_llvm_versions.yml | 3 ++- CHANGELOG.md | 3 +++ tests/dmd/runnable/ldc_extern_weak.d | 2 +- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c2263856d93..d6fbf71a89d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -203,7 +203,7 @@ install_ubuntu_prerequisites_template: &INSTALL_UBUNTU_PREREQUISITES_TEMPLATE environment: CIRRUS_CLONE_DEPTH: 50 HOST_LDC_VERSION: 1.31.0 - LLVM_VERSION: 18.1.5 + LLVM_VERSION: 18.1.8 GITHUB_TOKEN: ENCRYPTED[0955bd48c8d4e5391446fc0149d0719ad0b63df27ec9e6c180a5730a5b10dc7f28f09d1383423db158d21380ee2b022a] task: diff --git a/.github/actions/1-setup/action.yml b/.github/actions/1-setup/action.yml index 90ef3cf151b..d2f7db9eb8e 100644 --- a/.github/actions/1-setup/action.yml +++ b/.github/actions/1-setup/action.yml @@ -110,7 +110,8 @@ runs: - name: Install D host compiler uses: dlang-community/setup-dlang@v1 with: - compiler: ldc-latest + # macOS arm64: use LDC v1.39.0 using LLVM v17, as Xcode v16 + compiler: ${{ inputs.arch == 'arm64' && 'ldc-1.39.0' || 'ldc-latest' }} - name: 'Posix: Clear LD_LIBRARY_PATH env variable' # don't use host druntime/Phobos .so/.dylib etc. if: runner.os != 'Windows' shell: bash diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86a2cf46071..beffa50e350 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ concurrency: env: CLANG_VERSION: 15.0.6 - LLVM_VERSION: 18.1.5 + LLVM_VERSION: 18.1.8 jobs: build-native: @@ -62,7 +62,6 @@ jobs: -DD_COMPILER_FLAGS="-gcc=/usr/bin/c++ -O -flto=full -defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L-exported_symbol '-L__*' -L-w" -DEXTRA_CXXFLAGS=-flto=full with_pgo: true - llvm_version: 17.0.6 # FIXME: sporadic 'libc++abi: Pure virtual function called!' compiler crashes with LLVM 18 (see https://github.com/ldc-developers/ldc/pull/4604, https://github.com/ldc-developers/ldc/pull/4541) name: ${{ matrix.job_name }} runs-on: ${{ matrix.os }} @@ -74,20 +73,26 @@ jobs: with: submodules: true fetch-depth: 50 - - name: 'macOS 14: Switch to Xcode v14.3.1' + - name: 'macOS 14: Switch to Xcode 16 Beta 5' if: matrix.os == 'macos-14' - run: sudo xcode-select -switch /Applications/Xcode_14.3.1.app + run: sudo xcode-select -switch /Applications/Xcode_16_beta_5.app - name: Install prerequisites uses: ./.github/actions/1-setup with: - clang_version: ${{ runner.os == 'Windows' && '18.1.5' || env.CLANG_VERSION }} + clang_version: ${{ runner.os == 'Windows' && '18.1.8' || env.CLANG_VERSION }} llvm_version: ${{ matrix.llvm_version || env.LLVM_VERSION }} arch: ${{ matrix.arch }} - name: Build bootstrap LDC + if: matrix.os != 'macos-14' uses: ./.github/actions/2-build-bootstrap with: cmake_flags: ${{ matrix.bootstrap_cmake_flags }} arch: ${{ matrix.arch }} + # FIXME: on macOS arm64, LLVM 18 (from LDC) and LLVM 17 (from Xcode 16) seem incompatible, + # leading to sporadic 'libc++abi: Pure virtual function called!' compiler crashes + - name: 'macOS 14: Use host LDC (with Xcode-compatible LLVM version) as bootstrap LDC' + if: matrix.os == 'macos-14' + run: ln -s $(dirname $(dirname $(which ldmd2))) ../bootstrap-ldc - name: Build LDC with PGO instrumentation & gather profile from compiling default libs if: matrix.with_pgo uses: ./.github/actions/2a-build-pgo diff --git a/.github/workflows/supported_llvm_versions.yml b/.github/workflows/supported_llvm_versions.yml index e6aac84e10a..a0a9d3e1ce5 100644 --- a/.github/workflows/supported_llvm_versions.yml +++ b/.github/workflows/supported_llvm_versions.yml @@ -19,7 +19,8 @@ jobs: os: ubuntu-20.04 host_dc: ldc-beta # 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 + llvm_version: https://github.com/ldc-developers/llvm-project/releases/download/ldc-v18.1.8/llvm-18.1.8-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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bb6ae5b4d1..514c327208d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # LDC master #### Big news +- LLVM for prebuilt packages bumped to v18.1.8 (incl. macOS arm64). (#4712) +- Android: NDK for prebuilt package bumped from r26d to r27. (#4711) +- ldc2.conf: %%ldcconfigpath%% placeholder added - specifies the directory where current configuration file is located. (#4717) #### Platform support diff --git a/tests/dmd/runnable/ldc_extern_weak.d b/tests/dmd/runnable/ldc_extern_weak.d index 6ce9f90864f..47787d1ce6d 100644 --- a/tests/dmd/runnable/ldc_extern_weak.d +++ b/tests/dmd/runnable/ldc_extern_weak.d @@ -6,7 +6,7 @@ // REQUIRED_ARGS(osx): -L-undefined -Ldynamic_lookup // the linker on macOS-arm64 emits a warning -// TRANSFORM_OUTPUT(osx): remove_lines("warning: -undefined dynamic_lookup may not work with chained fixups") +// TRANSFORM_OUTPUT(osx): remove_lines("warning:.* -undefined dynamic_lookup") extern __gshared pragma(LDC_extern_weak) int nonExistent;