Upgrade Windows CI to llvm-mingw 20260908 (#1489)

* Upgrade Windows CI to llvm-mingw 20260908

Bumps the llvm-mingw release used by the Windows CI/CD build, sanitizer,
and PGO jobs from 20251216 to 20260908.

Also fixes two latent bugs surfaced while verifying the upgrade by
cross-compiling locally with the macOS build of llvm-mingw:

- plot_waterfall.cpp used std::atomic without including <atomic>,
  relying on it being pulled in transitively. Newer libc++ no longer
  does so.
- CMakeLists.txt chose the top-level project() LANGUAGES via if(APPLE)
  before any project()/enable_language() call had run, so APPLE
  reflected the host platform rather than CMAKE_SYSTEM_NAME from the
  cross-compile toolchain file. On a macOS host this silently took the
  Apple branch even when cross-compiling for Windows, adding
  -Wl,-ld_classic to the link flags -- a flag ld.lld doesn't understand.
  Windows CI (Linux-hosted) never hit this, but it broke any Windows
  cross-build attempted locally from macOS.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jz1Nz4hmnEzwQ7hjQtCBhk

* Add PR #1489 to changelog.

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
fix-windows-dpi-scaling
Mooneer Salem 2026-09-14 10:24:37 -07:00 committed by GitHub
parent 2c7aa5ff82
commit f0cb2a3996
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 35 additions and 31 deletions

View File

@ -46,14 +46,14 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}
run: |
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20251216/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64.tar.xz
tar xvf llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64.tar.xz
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20260908/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64.tar.xz
tar xvf llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64.tar.xz
- name: Configure freedv-gui (unsigned)
shell: bash
working-directory: ${{github.workspace}}
run: |
export PATH=${{github.workspace}}/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64/bin:$PATH
export PATH=${{github.workspace}}/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64/bin:$PATH
mkdir build_windows
cd build_windows
cmake -DENABLE_LTO=1 -DPGO_INSTRUMENT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cross-compile/freedv-mingw-llvm-${{ matrix.arch }}.cmake ..
@ -62,7 +62,7 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}/build_windows
run: |
export PATH=${{github.workspace}}/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64/bin:${{github.workspace}}/osslsigncode/build:$PATH
export PATH=${{github.workspace}}/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64/bin:${{github.workspace}}/osslsigncode/build:$PATH
make -j$(nproc) package
- name: Calculate installer filename
@ -125,14 +125,14 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}
run: |
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20251216/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64.tar.xz
tar xvf llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64.tar.xz
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20260908/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64.tar.xz
tar xvf llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64.tar.xz
- name: Configure freedv-gui (unsigned, ${{ matrix.sanitizer_name }})
shell: bash
working-directory: ${{github.workspace}}
run: |
export PATH=${{github.workspace}}/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64/bin:$PATH
export PATH=${{github.workspace}}/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64/bin:$PATH
mkdir build_windows
cd build_windows
cmake ${{ matrix.sanitizer_flag }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cross-compile/freedv-mingw-llvm-${{ matrix.arch }}.cmake ..
@ -141,7 +141,7 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}/build_windows
run: |
export PATH=${{github.workspace}}/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64/bin:$PATH
export PATH=${{github.workspace}}/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64/bin:$PATH
make -j$(nproc) package
- name: Calculate installer filename
@ -401,12 +401,12 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}
run: |
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20251216/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64.tar.xz
tar xvf llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64.tar.xz
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20260908/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64.tar.xz
tar xvf llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64.tar.xz
- name: Merge profile data
run: |
export PATH=${{github.workspace}}/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64/bin:$PATH
export PATH=${{github.workspace}}/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64/bin:$PATH
llvm-profdata merge -output ${{ github.workspace }}/code.profdata ${{ github.workspace }}/*.profraw
- name: Configure code signing tunnel
@ -460,7 +460,7 @@ jobs:
if: ${{ env.FREEDV_WINDOWS_CODE_SIGNING_SSH_KEY == '' }}
working-directory: ${{github.workspace}}
run: |
export PATH=${{github.workspace}}/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64/bin:$PATH
export PATH=${{github.workspace}}/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64/bin:$PATH
mkdir build_windows
cd build_windows
cmake -DENABLE_LTO=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPGO_USE_PROFILE=${{github.workspace}}/code.profdata -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cross-compile/freedv-mingw-llvm-${{ matrix.arch }}.cmake ..
@ -470,7 +470,7 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}
run: |
export PATH=${{github.workspace}}/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64/bin:${{github.workspace}}/osslsigncode/build:$PATH
export PATH=${{github.workspace}}/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64/bin:${{github.workspace}}/osslsigncode/build:$PATH
mkdir build_windows
cd build_windows
cmake -DENABLE_LTO=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPGO_USE_PROFILE=${{github.workspace}}/code.profdata -DSIGN_WINDOWS_BINARIES=1 -DPKCS11_MODULE=${{github.workspace}}/pkcs11-proxy/build/libpkcs11-proxy.so -DPKCS11_CERTIFICATE_FILE=${{github.workspace}}/freedv.cert -DPKCS11_KEY_FILE=${{github.workspace}}/freedv.key -DPKCS11_SECONDARY_CERTIFICATE_FILE=${{github.workspace}}/freedv-secondary.cert -DPKCS11_SECONDARY_KEY_FILE=${{github.workspace}}/freedv-secondary.key -DINTERMEDIATE_CERT_FILE=${{github.workspace}}/freedv.intermediatecerts -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cross-compile/freedv-mingw-llvm-${{ matrix.arch }}.cmake ..
@ -480,7 +480,7 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}/build_windows
run: |
export PATH=${{github.workspace}}/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64/bin:${{github.workspace}}/osslsigncode/build:$PATH
export PATH=${{github.workspace}}/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64/bin:${{github.workspace}}/osslsigncode/build:$PATH
make -j$(nproc) package
- name: Build freedv-gui (signed)
@ -488,7 +488,7 @@ jobs:
shell: bash
working-directory: ${{github.workspace}}/build_windows
run: |
export PATH=${{github.workspace}}/llvm-mingw-20251216-ucrt-ubuntu-22.04-x86_64/bin:${{github.workspace}}/osslsigncode/build:$PATH
export PATH=${{github.workspace}}/llvm-mingw-20260908-ucrt-ubuntu-22.04-x86_64/bin:${{github.workspace}}/osslsigncode/build:$PATH
ssh -fN -o "ServerAliveInterval 60" -p ${{ secrets.FREEDV_WINDOWS_CODE_SIGNING_SSH_PORT }} -i ${{github.workspace}}/code-sign.sshkey -L localhost:2222:127.0.0.1:2222 ${{ secrets.FREEDV_WINDOWS_CODE_SIGNING_SSH_USER }}@${{ secrets.FREEDV_WINDOWS_CODE_SIGNING_SSH_HOST }}
make -j$(nproc) package
killall ssh

View File

@ -22,28 +22,29 @@ set(PROJECT_HOMEPAGE_URL "https://freedv.org")
# Makes FreeDV overridden CMake platform available for ARM MinGW builds.
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
# NOTE: APPLE/WIN32/UNIX aren't reliably set until after the first
# project()/enable_language() call, so the platform-specific language
# list can't be chosen via if(APPLE) beforehand -- when cross-compiling
# for Windows from a macOS host, APPLE would (incorrectly) reflect the
# host platform at that point rather than the CMAKE_SYSTEM_NAME from the
# toolchain file. Always declare C/CXX first, then add OBJCXX afterward
# once APPLE reflects the actual target.
project(
${PROJECT_NAME}
VERSION ${PROJECT_VERSION}
DESCRIPTION ${PROJECT_DESCRIPTION}
HOMEPAGE_URL ${PROJECT_HOMEPAGE_URL}
LANGUAGES C CXX
)
if(APPLE)
project(
${PROJECT_NAME}
VERSION ${PROJECT_VERSION}
DESCRIPTION ${PROJECT_DESCRIPTION}
HOMEPAGE_URL ${PROJECT_HOMEPAGE_URL}
LANGUAGES C CXX OBJCXX
)
enable_language(OBJCXX)
# Workaround for Xcode 15 bug preventing FreeDV binaries from starting
# on older versions of macOS. See https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking.
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0.0.0)
add_link_options("-Wl,-ld_classic")
endif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0.0.0)
else(APPLE)
project(
${PROJECT_NAME}
VERSION ${PROJECT_VERSION}
DESCRIPTION ${PROJECT_DESCRIPTION}
HOMEPAGE_URL ${PROJECT_HOMEPAGE_URL}
LANGUAGES C CXX
)
endif(APPLE)
if(NOT DEFINED LINUX)

View File

@ -958,7 +958,9 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
* Fix uninitialized value read during waterfall plot render. (PR #1481)
* Match std::atomic memory ordering to what each atomic actually synchronises. (PR #1482)
* Remove use of mutexes in audio path during callsign decode. (PR #1486)
2. Other:
2. Build system:
* Windows versions are now built with llvm-mingw 20260908 (PR #1489)
3. Other:
* Waterfall and other plot performance improvements. (PR #1481)
* Windows audio thread timing improvements. (PR #1488)

View File

@ -20,6 +20,7 @@
//==========================================================================
#include <string.h>
#include <algorithm>
#include <atomic>
#include <wx/wx.h>
#include "os/os_interface.h"