1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

CI updates

This commit is contained in:
Markus F.X.J. Oberhumer 2023-11-15 13:06:29 +01:00
parent f74c225338
commit 46029bb8a0
14 changed files with 90 additions and 50 deletions

View File

@ -118,13 +118,13 @@ jobs:
run: |
(cd build/extra/gcc/release && DESTDIR=$PWD/Install-with-cmake cmake --install .)
(cd build/extra/gcc/release && DESTDIR=$PWD/Install-with-make make install)
- name: 'Run basic tests'
- name: 'Run ctest tests'
run: |
make -C build/extra/gcc/debug test
make -C build/extra/gcc/release test
make -C build/extra/clang/debug test
make -C build/extra/clang/release test
- name: 'Run basic tests 32-bit'
- name: 'Run ctest tests 32-bit'
if: ${{ matrix.use_m32 }}
run: |
make -C build/extra/gcc-m32/debug test
@ -152,6 +152,8 @@ jobs:
- { os: macos-11, gcc: gcc-10, gxx: 'g++-10', testsuite: true }
- { os: macos-12, gcc: gcc-11, gxx: 'g++-11', testsuite: true }
- { os: macos-13, gcc: gcc-12, gxx: 'g++-12', testsuite: true }
env:
UPX_CONFIG_EXPECT_THREADS: 'ON'
steps:
- name: 'Install brew packages'
if: ${{ matrix.testsuite }}
@ -203,7 +205,7 @@ jobs:
run: |
(cd build/extra/clang/release && DESTDIR=$PWD/Install-with-cmake cmake --install .)
(cd build/extra/clang/release && DESTDIR=$PWD/Install-with-make make install)
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ !contains(matrix.os, 'macos-13') }} # FIXME: UPX on macos-13 is broken => disable self-test for now
run: |
make -C build/extra/clang/debug test
@ -236,6 +238,8 @@ jobs:
include:
- { name: windows-2019-amd64, os: windows-2019, vsversion: 2019, arch: amd64 }
- { name: windows-2022-amd64, os: windows-2022, vsversion: 2022, arch: amd64 }
env:
UPX_CONFIG_EXPECT_THREADS: 'ON'
steps:
- run: git config --global core.autocrlf false
- name: 'Check out code'
@ -265,7 +269,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
run: |
ctest --test-dir build/debug -C Debug
@ -425,6 +429,7 @@ jobs:
# { zig_target: x86_64-macos.13.0-none }
- { zig_target: x86_64-windows-gnu }
env:
UPX_CONFIG_EXPECT_THREADS: 'ON'
# for zig-cc wrapper scripts (see below):
ZIG_CPPFLAGS: -DUPX_DOCTEST_CONFIG_MULTITHREADING
ZIG_FLAGS: ${{ matrix.zig_flags }}

View File

@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
jobs:
job-cmake-macos-xcode: # uses cmake + xcodebuild
@ -44,7 +45,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.run_test }}
run: |
ctest --test-dir build/xcode -C Debug

View File

@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
UPX_CMAKE_BUILD_FLAGS: --verbose
UPX_CMAKE_CONFIG_FLAGS: -G "Unix Makefiles"
@ -85,7 +86,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
shell: bash
run: |

View File

@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
UPX_CMAKE_BUILD_FLAGS: --verbose
UPX_CMAKE_CONFIG_FLAGS: -G Ninja
@ -84,7 +85,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
shell: bash
run: |

View File

@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
jobs:
job-cmake-windows-nmake: # uses cmake + nmake
@ -44,7 +45,7 @@ jobs:
shell: cmd
run: |
set X=${{ matrix.clang_cl && '-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl' || '' }}
cmake -S . -B build/debug -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug %X%
cmake -S . -B build/debug -G "NMake Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug %X%
cd build/debug
nmake
dir *.exe
@ -53,7 +54,7 @@ jobs:
shell: cmd
run: |
set X=${{ matrix.clang_cl && '-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl' || '' }}
cmake -S . -B build/release -G "NMake Makefiles" %X%
cmake -S . -B build/release -G "NMake Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON %X%
cd build/release
nmake
dir *.exe
@ -71,7 +72,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests'
- name: 'Run ctest tests'
if: ${{ matrix.arch != 'amd64_arm64' }}
run: |
ctest --test-dir build/debug

View File

@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
UPX_CMAKE_BUILD_FLAGS: --verbose
jobs:

View File

@ -174,12 +174,12 @@ jobs:
(cd "upx with space"/build/xtarget/gcc-static/release && DESTDIR="$PWD/Install with cmake" cmake --install .)
(cd "upx with space"/build/xtarget/gcc-static/release && DESTDIR="$PWD/Install with make" make install)
- { name: 'Run basic tests clang Debug', run: 'make -C "upx with space"/build/xtarget/clang-static/debug test' }
- { name: 'Run basic tests clang Release', run: 'make -C "upx with space"/build/xtarget/clang-static/release test' }
- { name: 'Run basic tests gcc Debug', run: 'make -C "upx with space"/build/xtarget/gcc-static/debug test' }
- { name: 'Run basic tests gcc Release', run: 'make -C "upx with space"/build/xtarget/gcc-static/release test' }
- { name: 'Run ctest tests clang Debug', run: 'make -C "upx with space"/build/xtarget/clang-static/debug test' }
- { name: 'Run ctest tests clang Release', run: 'make -C "upx with space"/build/xtarget/clang-static/release test' }
- { name: 'Run ctest tests gcc Debug', run: 'make -C "upx with space"/build/xtarget/gcc-static/debug test' }
- { name: 'Run ctest tests gcc Release', run: 'make -C "upx with space"/build/xtarget/gcc-static/release test' }
- name: 'Run basic tests C++20, C++23 and LTO'
- name: 'Run ctest tests C++20, C++23 and LTO'
if: matrix.use_cxx20 || matrix.use_cxx23 || matrix.use_cxx2b || matrix.use_lto
run: |
for dir in "upx with space"/build/xtarget/*-cxx*/*; do

View File

@ -10,6 +10,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
jobs:
job-alpine-mingw: # uses cmake + make
@ -18,8 +19,8 @@ jobs:
fail-fast: false
matrix:
include:
- { container: 'alpine:3.11', wine: false, i686_mingw: false } # skip Wine testsuite; TODO: internal error: doctest check failed
- { container: 'alpine:3.12', wine: false, i686_mingw: false } # skip Wine testsuite; TODO: internal error: doctest check failed
- { container: 'alpine:3.11', wine: true, i686_mingw: false } # wine-4.0.3
- { container: 'alpine:3.12', wine: true, i686_mingw: false } # wine-4.0.3
- { container: 'alpine:3.13', wine: true, i686_mingw: false } # wine-4.0.3
- { container: 'alpine:3.14', wine: true, i686_mingw: false } # wine-6.18
- { container: 'alpine:3.15', wine: true, i686_mingw: false } # wine-6.23
@ -27,7 +28,7 @@ jobs:
- { container: 'alpine:3.17', wine: true, i686_mingw: false } # wine-7.21
# Wine >= 8.0 can run i686 32-bit programs in WOW64 mode on pure 64-bit systems
- { container: 'alpine:3.18', wine: true, i686_mingw: true } # wine-8.13
- { container: 'alpine:edge', wine: true, i686_mingw: true } # wine-8.17
- { container: 'alpine:edge', wine: true, i686_mingw: true } # wine-8.19
name: ${{ format('container {0}', matrix.container) }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
@ -37,12 +38,17 @@ jobs:
apk update && apk upgrade && apk add bash cmake coreutils file git make tar xz
apk add mingw-w64-gcc
test "${{ matrix.i686_mingw }}" = "true" && apk add i686-mingw-w64-gcc
test "${{ matrix.wine }}" = "true" && apk add wine
true
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
- name: 'Install Wine'
if: ${{ matrix.wine }}
run: |
apk add wine
test -f /usr/bin/wine || ln -s -v wine64 /usr/bin/wine
# this seems to be needed for Wine when running in a container (beause of UID mismatch??)
mkdir -p -v ~/.wine
wineboot --init
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
# this seems to be needed when running in a container (beause of UID mismatch??)
git config --global --add safe.directory '*'
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
@ -89,7 +95,7 @@ jobs:
run: |
git clone --depth=1 https://github.com/upx/upx-testsuite ../upx-testsuite
testsuite_1="$(readlink -fn ./misc/testsuite/upx_testsuite_1.sh)"
export upx_exe_runner="wine64"
export upx_exe_runner="wine"
if test "${{ matrix.i686_mingw }}" = "true"; then
UPX_TESTSUITE_LEVEL=2 \
env -C build/extra/cross-windows-mingw32/debug upx_exe=./upx.exe bash "$testsuite_1"
@ -109,7 +115,7 @@ jobs:
cd build/extra/cross-windows-mingw32/debug
[[ -f upx && ! -f upx.exe ]] && mv -i -v upx upx.exe
pwd; file ./upx.exe
wine=wine64
wine=wine
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe --sysinfo -v
@ -128,7 +134,7 @@ jobs:
cd build/extra/cross-windows-mingw32/release
[[ -f upx && ! -f upx.exe ]] && mv -i -v upx upx.exe
pwd; file ./upx.exe
wine=wine64
wine=wine
tt='./upx.exe'
$wine ./upx.exe --version-short
$wine ./upx.exe --sysinfo -v
@ -176,3 +182,19 @@ jobs:
$wine ./upx.exe -d tt.packed.exe -o tt.unpacked.exe
$wine ./tt.packed.exe --version-short
$wine ./tt.unpacked.exe --version-short
- name: 'Run ctest tests under Wine - mingw32/debug'
if: ${{ matrix.wine && matrix.i686_mingw }}
run: 'make -C build/extra/cross-windows-mingw32/debug test'
- name: 'Run ctest tests under Wine - mingw32/release'
if: ${{ matrix.wine && matrix.i686_mingw }}
run: 'make -C build/extra/cross-windows-mingw32/release test'
- name: 'Run ctest tests under Wine - mingw64/debug'
if: ${{ matrix.wine }}
run: 'make -C build/extra/cross-windows-mingw64/debug test'
- name: 'Run ctest tests under Wine - mingw64/release'
if: ${{ matrix.wine }}
run: 'make -C build/extra/cross-windows-mingw64/release test'

View File

@ -12,6 +12,7 @@ env:
CMAKE_VERBOSE_MAKEFILE: 'ON'
CTEST_OUTPUT_ON_FAILURE: 'ON'
DEBIAN_FRONTEND: noninteractive
UPX_CONFIG_EXPECT_THREADS: 'ON'
jobs:
job-llvm-mingw: # uses cmake + make
@ -26,12 +27,12 @@ jobs:
- name: llvm-mingw-20230614-ucrt
llvm_version: 16.0.6
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20230614/llvm-mingw-20230614-ucrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231031-msvcrt
llvm_version: 17.0.4
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231031/llvm-mingw-20231031-msvcrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231031-ucrt
llvm_version: 17.0.4
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231031/llvm-mingw-20231031-ucrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231114-msvcrt
llvm_version: 17.0.5
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231114/llvm-mingw-20231114-msvcrt-ubuntu-20.04-x86_64.tar.xz'
- name: llvm-mingw-20231114-ucrt
llvm_version: 17.0.5
url: 'https://github.com/mstorsjo/llvm-mingw/releases/download/20231114/llvm-mingw-20231114-ucrt-ubuntu-20.04-x86_64.tar.xz'
name: ${{ format('{0} {1}', matrix.name, matrix.llvm_version) }}
runs-on: ubuntu-latest
steps:
@ -53,24 +54,28 @@ jobs:
run: |
export CC="aarch64-w64-mingw32-clang -static" CXX="aarch64-w64-mingw32-clang++ -static"
CC="$CC -D_WIN32_WINNT=0x0400"; CXX="$CXX -D_WIN32_WINNT=0x0400"
export CMAKE_SYSTEM_NAME=Windows
make UPX_XTARGET=aarch64-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Build clang armv7'
if: success() || failure() # run this step even if the previous step failed
run: |
export CC="armv7-w64-mingw32-clang -static" CXX="armv7-w64-mingw32-clang++ -static"
CC="$CC -D_WIN32_WINNT=0x0400"; CXX="$CXX -D_WIN32_WINNT=0x0400"
export CMAKE_SYSTEM_NAME=Windows
make UPX_XTARGET=armv7-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Build clang i686'
if: success() || failure() # run this step even if the previous step failed
run: |
export CC="i686-w64-mingw32-clang -static" CXX="i686-w64-mingw32-clang++ -static"
CC="$CC -D_WIN32_WINNT=0x0400"; CXX="$CXX -D_WIN32_WINNT=0x0400"
export CMAKE_SYSTEM_NAME=Windows # CMAKE_CROSSCOMPILING_EMULATOR=wine
make UPX_XTARGET=i686-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Build clang x86_64'
if: success() || failure() # run this step even if the previous step failed
run: |
export CC="x86_64-w64-mingw32-clang -static" CXX="x86_64-w64-mingw32-clang++ -static"
CC="$CC -D_WIN32_WINNT=0x0400"; CXX="$CXX -D_WIN32_WINNT=0x0400"
export CMAKE_SYSTEM_NAME=Windows # CMAKE_CROSSCOMPILING_EMULATOR=wine64
make UPX_XTARGET=x86_64-w64-mingw32-clang xtarget/debug xtarget/release
- name: 'Make artifact'
run: |

View File

@ -76,12 +76,12 @@ jobs:
name: ${{ env.artifact_name }}
path: tmp/artifact
- name: 'Run basic tests clang-static'
- name: 'Run ctest tests clang-static'
run: 'make -C build/xtarget/clang-static/$release test'
- name: 'Run basic tests clang-asan'
- name: 'Run ctest tests clang-asan'
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: ASAN not supported
run: 'make -C build/xtarget/clang-asan/$release test'
- name: 'Run basic tests clang-msan'
- name: 'Run ctest tests clang-msan'
if: ${{ !startsWith(matrix.container, 'i386/') }} # i386: MSAN not supported
run: 'make -C build/xtarget/clang-msan/$release test'

View File

@ -119,15 +119,12 @@ upx_cache_bool_vars(ON
CMAKE_C_STANDARD_REQUIRED CMAKE_CXX_STANDARD_REQUIRED
CMAKE_EXPORT_COMPILE_COMMANDS CMAKE_REQUIRED_QUIET
)
# global CMake settings that default to OFF
upx_cache_bool_vars(OFF
CMAKE_VERBOSE_MAKEFILE
)
# internal UPX settings that default to OFF
upx_cache_bool_vars(OFF
UPX_CONFIG_CMAKE_DISABLE_TEST UPX_CONFIG_CMAKE_DISABLE_INSTALL
UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO UPX_CONFIG_CMAKE_DISABLE_PLATFORM_CHECK
UPX_CONFIG_DISABLE_C_STANDARD UPX_CONFIG_DISABLE_CXX_STANDARD
UPX_CONFIG_EXPECT_THREADS UPX_CONFIG_REQUIRE_THREADS
)
# determine Git revision
@ -673,6 +670,10 @@ endif() # UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO
print_var(CMAKE_INSTALL_PREFIX CMAKE_CONFIGURATION_TYPES CMAKE_BUILD_TYPE)
if(Threads_FOUND)
message(STATUS "WITH_THREADS = 1")
elseif(UPX_CONFIG_REQUIRE_THREADS)
message(FATAL_ERROR "ERROR: WITH_THREADS required")
elseif(UPX_CONFIG_EXPECT_THREADS AND NOT UPX_CONFIG_DISABLE_THREADS)
message(FATAL_ERROR "ERROR: WITH_THREADS expected")
endif()
if(CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|None|Release)$")
message(WARNING "WARNING: unsupported CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}; please use \"Debug\" or \"Release\"")

View File

@ -63,8 +63,9 @@ include ./misc/make/Makefile-extra.mk
endif
# developer convenience
CTEST = ctest
test: $(.DEFAULT_GOAL)
cd $(.DEFAULT_GOAL) && ctest
cd $(.DEFAULT_GOAL) && $(CTEST)
ifneq ($(wildcard /usr/bin/env),) # needs bash, perl, xargs, etc.
check-whitespace clang-format run-testsuite run-testsuite-debug run-testsuite-release: PHONY src/Makefile
$(MAKE) -C src $@

View File

@ -124,46 +124,46 @@ build/extra/cross-linux-gnu-aarch64/debug: PHONY; $(call run_config_and_build,
build/extra/cross-linux-gnu-aarch64/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-linux-gnu-aarch64/%: export CC = aarch64-linux-gnu-gcc
build/extra/cross-linux-gnu-aarch64/%: export CXX = aarch64-linux-gnu-g++
build/extra/cross-linux-gnu-aarch64/%: CMAKE_SYSTEM_NAME = Linux
build/extra/cross-linux-gnu-aarch64/%: CMAKE_CROSSCOMPILING_EMULATOR = qemu-aarch64
build/extra/cross-linux-gnu-aarch64/%: CMAKE_SYSTEM_NAME ?= Linux
build/extra/cross-linux-gnu-aarch64/%: CMAKE_CROSSCOMPILING_EMULATOR ?= qemu-aarch64
# cross compiler: Linux glibc arm-linux-gnueabihf
build/extra/cross-linux-gnu-arm-eabihf/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-linux-gnu-arm-eabihf/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-linux-gnu-arm-eabihf/%: export CC = arm-linux-gnueabihf-gcc
build/extra/cross-linux-gnu-arm-eabihf/%: export CXX = arm-linux-gnueabihf-g++ -Wno-psabi
build/extra/cross-linux-gnu-arm-eabihf/%: CMAKE_SYSTEM_NAME = Linux
build/extra/cross-linux-gnu-arm-eabihf/%: CMAKE_CROSSCOMPILING_EMULATOR = qemu-arm
build/extra/cross-linux-gnu-arm-eabihf/%: CMAKE_SYSTEM_NAME ?= Linux
build/extra/cross-linux-gnu-arm-eabihf/%: CMAKE_CROSSCOMPILING_EMULATOR ?= qemu-arm
# cross compiler: Windows x86 win32 MinGW (i386)
build/extra/cross-windows-mingw32/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-windows-mingw32/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-windows-mingw32/%: export CC = i686-w64-mingw32-gcc -static -D_WIN32_WINNT=0x0400
build/extra/cross-windows-mingw32/%: export CXX = i686-w64-mingw32-g++ -static -D_WIN32_WINNT=0x0400
build/extra/cross-windows-mingw32/%: CMAKE_SYSTEM_NAME = Windows
build/extra/cross-windows-mingw32/%: CMAKE_CROSSCOMPILING_EMULATOR = wine
build/extra/cross-windows-mingw32/%: CMAKE_SYSTEM_NAME ?= Windows
build/extra/cross-windows-mingw32/%: CMAKE_CROSSCOMPILING_EMULATOR ?= wine
# cross compiler: Windows x64 win64 MinGW (amd64)
build/extra/cross-windows-mingw64/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-windows-mingw64/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-windows-mingw64/%: export CC = x86_64-w64-mingw32-gcc -static -D_WIN32_WINNT=0x0400
build/extra/cross-windows-mingw64/%: export CXX = x86_64-w64-mingw32-g++ -static -D_WIN32_WINNT=0x0400
build/extra/cross-windows-mingw64/%: CMAKE_SYSTEM_NAME = Windows
build/extra/cross-windows-mingw64/%: CMAKE_CROSSCOMPILING_EMULATOR = wine
build/extra/cross-windows-mingw64/%: CMAKE_SYSTEM_NAME ?= Windows
build/extra/cross-windows-mingw64/%: CMAKE_CROSSCOMPILING_EMULATOR ?= wine64
# cross compiler: macOS arm64 (aarch64)
build/extra/cross-darwin-arm64/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-darwin-arm64/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-darwin-arm64/%: export CC = clang -target arm64-apple-darwin
build/extra/cross-darwin-arm64/%: export CXX = clang++ -target arm64-apple-darwin
build/extra/cross-darwin-arm64/%: CMAKE_SYSTEM_NAME = Darwin
build/extra/cross-darwin-arm64/%: CMAKE_SYSTEM_NAME ?= Darwin
# cross compiler: macOS x86_64 (amd64)
build/extra/cross-darwin-x86_64/debug: PHONY; $(call run_config_and_build,$@,Debug)
build/extra/cross-darwin-x86_64/release: PHONY; $(call run_config_and_build,$@,Release)
build/extra/cross-darwin-x86_64/%: export CC = clang -target x86_64-apple-darwin
build/extra/cross-darwin-x86_64/%: export CXX = clang++ -target x86_64-apple-darwin
build/extra/cross-darwin-x86_64/%: CMAKE_SYSTEM_NAME = Darwin
build/extra/cross-darwin-x86_64/%: CMAKE_SYSTEM_NAME ?= Darwin
#***********************************************************************
# C/C++ static analyzers
@ -239,6 +239,8 @@ ifneq ($(origin UPX_CMAKE_CONFIG_FLAGS),command line) # needed to work around a
# it easy to set other variables like CMAKE_AR or CMAKE_RANLIB
__add_cmake_config = $(and $($1),-D$1="$($1)")
# pass common CMake settings from environment/make to cmake
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_VERBOSE_MAKEFILE)
# pass common CMake toolchain settings from environment/make to cmake
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_AR)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_NM)
build/%: UPX_CMAKE_CONFIG_FLAGS += $(call __add_cmake_config,CMAKE_RANLIB)

View File

@ -3,9 +3,8 @@
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
#
# NOTE: this Makefile is deprecated - please directly use the CMake build
# instead. And see the top-level Makefile for some pre-defined CMake
# build configurations.
# NOTE: this Makefile is deprecated - please directly use
# the top-level CMake build instead.
ifndef srcdir
srcdir := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))