Skip to content

Commit 0361351

Browse files
committed
Add tests of Microsoft variadic function call ABI
1 parent 634ad0d commit 0361351

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+119618
-63
lines changed

.github/scripts/config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ BINUTILS_REPO=${BINUTILS_REPO:-Windows-on-ARM-Experiments/binutils-woarm64}
99
BINUTILS_BRANCH=${BINUTILS_BRANCH:-woarm64}
1010

1111
GCC_REPO=${GCC_REPO:-Windows-on-ARM-Experiments/gcc-woarm64}
12-
GCC_BRANCH=${GCC_BRANCH:-woarm64}
12+
GCC_BRANCH=${GCC_BRANCH:-fix-va-list}
1313

1414
MINGW_REPO=${MINGW_REPO:-Windows-on-ARM-Experiments/mingw-woarm64}
1515
MINGW_BRANCH=${MINGW_BRANCH:-woarm64}
@@ -101,7 +101,7 @@ TOOLCHAIN_CCACHE_LIB_DIR=$TOOLCHAIN_PATH/lib/ccache
101101
if [[ -f $SOURCE_PATH/gcc/gcc/BASE-VER ]]; then
102102
GCC_VERSION=$(cat $SOURCE_PATH/gcc/gcc/BASE-VER)
103103
else
104-
GCC_VERSION="15.0.0"
104+
GCC_VERSION="15.0.1"
105105
fi
106106

107107
DEBUG=${DEBUG:-0} # Enable debug build.

.github/scripts/tests/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source `dirname ${BASH_SOURCE[0]}`/../config.sh
44

5-
echo "::group::Build Aarch64 tests"
5+
echo "::group::Build $TARGET tests"
66
cd $ROOT_PATH/tests
77
cmake -S . -B build
88
cmake --build build
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
source `dirname ${BASH_SOURCE[0]}`/../config.sh
4+
5+
echo "::group::Execute $TARGET ABI tests"
6+
$ROOT_PATH/tests/execute-abi-tests.sh $ROOT_PATH/tests/size-of
7+
$ROOT_PATH/tests/execute-abi-tests.sh $ROOT_PATH/tests/varargs-clang-issue
8+
$ROOT_PATH/tests/execute-abi-tests.sh $ROOT_PATH/tests/varargs
9+
echo "::endgroup::"

.github/scripts/tests/execute-tests.ps1

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/scripts/tests/execute-tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
source `dirname ${BASH_SOURCE[0]}`/../config.sh
44

5-
PATH="$TOOLCHAIN_PATH/aarch64-w64-mingw32/bin:$TOOLCHAIN_PATH/lib/gcc/aarch64-w64-mingw32/:$TOOLCHAIN_PATH/lib/gcc/$TARGET/$GCC_VERSION/"
5+
PATH="$TOOLCHAIN_PATH/$TARGET/bin:$TOOLCHAIN_PATH/lib/gcc/$TARGET/:$TOOLCHAIN_PATH/lib/gcc/$TARGET/$GCC_VERSION/"
66

7-
echo "::group::Execute AArch64 tests"
7+
echo "::group::Execute $TARGET tests"
88
pushd $ROOT_PATH/tests
9-
WSLENV=$WSLENV:PATH/p ./build/bin/aarch64-mingw-tests.exe
9+
WSLENV=$WSLENV:PATH/p $TESTS_PATH/$TARGET-tests.exe
1010
popd
1111
echo "::endgroup::"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
source `dirname ${BASH_SOURCE[0]}`/config.sh
4+
5+
echo "::group::Install Dependencies"
6+
sudo apt update
7+
sudo apt install -y \
8+
clang \
9+
cmake \
10+
gcc \
11+
lld \
12+
zstd
13+
echo "::endgroup::"
14+
15+
echo 'Success!'
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %4
2+
3+
@echo on
4+
5+
set "dir=%1"
6+
set "name=%2"
7+
set "suffix=%3"
8+
9+
call set dir=%%dir:\\wsl.localhost\Ubuntu-22.04=W:%%
10+
cd /D "%dir%"
11+
12+
cl /c /Zi /O0 /FAcsu /Fonul %name%.c
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %4
2+
3+
@echo on
4+
5+
set "dir=%1"
6+
set "name=%2"
7+
set "suffix=%3"
8+
9+
call set dir=%%dir:\\wsl.localhost\Ubuntu-22.04=W:%%
10+
cd /D "%dir%"
11+
12+
cl /c /Zi /Od /GS- %name%.c /Fo%name%-%suffix%.obj
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %4
2+
3+
@echo on
4+
5+
set "dir=%1"
6+
set "name=%2"
7+
set "suffix=%3"
8+
9+
call set dir=%%dir:\\wsl.localhost\Ubuntu-22.04=W:%%
10+
cd /D "%dir%"
11+
12+
link /INCREMENTAL:NO /DLL /DEBUG /OUT:%name%-dll-%suffix%.dll /IMPLIB:%name%-dll-%suffix%.lib %name%-dll-%suffix%.obj
13+
if %errorlevel% neq 0 exit /b %errorlevel%
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %5
2+
3+
@echo on
4+
5+
set "dir=%1"
6+
set "name=%2"
7+
set "exe_suffix=%3"
8+
set "dll_suffix=%4"
9+
10+
call set dir=%%dir:\\wsl.localhost\Ubuntu-22.04=W:%%
11+
cd /D "%dir%"
12+
13+
link /INCREMENTAL:NO /DEBUG /OUT:%name%-%exe_suffix%-%dll_suffix%.exe %name%-use-dll-%exe_suffix%.obj %name%-dll-%dll_suffix%.lib
14+
if %errorlevel% neq 0 exit /b %errorlevel%

0 commit comments

Comments
 (0)