diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml index d7bd6256..403c9fef 100644 --- a/.github/workflows/cmake-windows.yml +++ b/.github/workflows/cmake-windows.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ae7a7ae..bbfc45ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/USER_MANUAL.md b/USER_MANUAL.md index 8a068810..efd0f124 100644 --- a/USER_MANUAL.md +++ b/USER_MANUAL.md @@ -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) diff --git a/src/gui/controls/plot_waterfall.cpp b/src/gui/controls/plot_waterfall.cpp index 96987a9d..d5d11b46 100644 --- a/src/gui/controls/plot_waterfall.cpp +++ b/src/gui/controls/plot_waterfall.cpp @@ -20,6 +20,7 @@ //========================================================================== #include #include +#include #include #include "os/os_interface.h"