Skip to content

Commit 61fa2c1

Browse files
committed
Define stuff that changes between aarch64 and x64 as variables
1 parent fae2e0a commit 61fa2c1

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

.github/scripts/boost/build_and_test_boost.sh

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ BOOST_TEMPLATE_DIR=$2
55

66
export TOOLCHAIN_PATH=/home/vejby/cross-aarch64-w64-mingw32-msvcrt
77

8+
GCC_VERSION=15
9+
ARCHITECTURE=arm
10+
ABI=aapcs
11+
812
if [[ $# -lt 1 ]]; then
913
echo "Expected at least 1 arguments!" >&2
1014
exit 1
@@ -71,20 +75,25 @@ fi
7175
cd $BOOST_BUILD_DIR
7276

7377
# WSL linux x64 to win x64: x86_64-pc-linux-gnu -> x86_64-w64-mingw32
74-
# echo "using gcc : 10 : x86_64-w64-mingw32-g++ : : <target-os>windows <address-model>64 <architecture>x86 ;" > "user-config.jam"
78+
# GCC_VERSION=10, ARCHITECTURE=x86, ABI=ms
79+
# echo "using gcc : $GCC_VERSION : x86_64-w64-mingw32-g++ : : <target-os>windows <address-model>64 <architecture>$ARCHITECTURE ;" > "user-config.jam"
7580

7681
# WSL linux arm64 -> win arm64: aarch64-pc-linux-gnu -> aarch64-w64-mingw32 or
7782
# WSL linux x64 -> win arm64: x86_64-pc-linux-gnu -> aarch64-w64-mingw32
78-
echo "using gcc : 15 : $TOOLCHAIN_PATH/bin/aarch64-w64-mingw32-g++ : : <target-os>windows <address-model>64 <architecture>arm ;" > "user-config.jam"
83+
# GCC_VERSION=15, ARCHITECTURE=arm, ABI=aapcs
84+
echo "using gcc : $GCC_VERSION : $TOOLCHAIN_PATH/bin/aarch64-w64-mingw32-g++ : : <target-os>windows <address-model>64 <architecture>$ARCHITECTURE ;" > "user-config.jam"
7985

8086
# MSYS x64 -> win x64: x86_64-pc-msys -> x86_64-pc-msys
81-
# echo "using gcc : 13 : /usr/bin/x86_64-pc-msys-g++ : : <target-os>windows <address-model>64 <architecture>x86 ;" > "user-config.jam"
87+
# GCC_VERSION=13, ARCHITECTURE=x86, ABI=ms
88+
# echo "using gcc : $GCC_VERSION : /usr/bin/x86_64-pc-msys-g++ : : <target-os>windows <address-model>64 <architecture>$ARCHITECTURE ;" > "user-config.jam"
8289

8390
# MSYS x64 -> win arm64: x86_64-pc-msys -> aarch64-w64-mingw32
84-
# echo "using gcc : 15 : /opt/bin/aarch64-w64-mingw32-g++ : : <target-os>windows <address-model>64 <architecture>arm ;" > "user-config.jam"
91+
# GCC_VERSION=15, ARCHITECTURE=arm, ABI=aapcs
92+
# echo "using gcc : $GCC_VERSION : /opt/bin/aarch64-w64-mingw32-g++ : : <target-os>windows <address-model>64 <architecture>$ARCHITECTURE ;" > "user-config.jam"
8593

8694
# MSYS arm64 -> win arm64: aarch64-w64-mingw32 -> aarch64-w64-mingw32
87-
# echo "using gcc : 15 : /mingwarm64/bin/aarch64-w64-mingw32-g++ : : <target-os>windows <address-model>64 <architecture>arm ;" > "user-config.jam"
95+
# GCC_VERSION=15, ARCHITECTURE=arm, ABI=aapcs
96+
# echo "using gcc : $GCC_VERSION : /mingwarm64/bin/aarch64-w64-mingw32-g++ : : <target-os>windows <address-model>64 <architecture>$ARCHITECTURE ;" > "user-config.jam"
8897

8998
# Some gcc is needed for running this as well. I'm using MinGW from package manager (e.g. pacman -S gcc)
9099
echo "Running Boost bootstrap.."
@@ -106,8 +115,7 @@ echo "Running Boost b2 build..."
106115

107116
# MinGW defaults to an older version of Windows header files, Process library of Boost needs newer
108117
# one, we default to the newest: define=_WIN32_WINNT=0x0A00
109-
# abi=ms architecture=x86
110-
time ./b2 --user-config=./user-config.jam -d2 --prefix=./build --debug-configuration target-os=windows address-model=64 variant=debug architecture=arm binary-format=pe abi=aapcs toolset=gcc-15 define=_WIN32_WINNT=0x0A00 cxxflags=-Wno-attributes linkflags=-static-libstdc++ linkflags=-static-libgcc link=static install > boost-build.log
118+
time ./b2 --user-config=./user-config.jam -d2 --prefix=./build --debug-configuration target-os=windows address-model=64 variant=debug architecture=$ARCHITECTURE binary-format=pe abi=$ABI toolset=gcc-$GCC_VERSION define=_WIN32_WINNT=0x0A00 cxxflags=-Wno-attributes linkflags=-static-libstdc++ linkflags=-static-libgcc link=static install > boost-build.log
111119

112120
echo "Running Boost quick test.."
113121
cd status
@@ -157,10 +165,10 @@ cd status
157165
# link=static runtime-link=static (link=static is not enough for linking runtime libraries statically, because it appends -static only to compilation, not to linking commands)
158166
# linkflags=-static-libstdc++ linkflags=-static-libgcc (or just pass -static to linker?)
159167
# TODO: More granural usage of -mbig-obj (per modules)
160-
time ../b2 quick -a --user-config=../user-config.jam -d2 --debug-configuration --hash target-os=windows address-model=64 variant=debug architecture=arm binary-format=pe abi=aapcs toolset=gcc-15 define=_WIN32_WINNT=0x0A00 cxxflags=-Wno-error=attributes cxxflags=-Wno-attributes cxxflags=-Wa,-mbig-obj link=static linkflags=-static-libstdc++ linkflags=-static-libgcc > ../boost-test-quick-static.log
168+
time ../b2 quick -a --user-config=../user-config.jam -d2 --debug-configuration --hash target-os=windows address-model=64 variant=debug architecture=$ARCHITECTURE binary-format=pe abi=$ABI toolset=gcc-$GCC_VERSION define=_WIN32_WINNT=0x0A00 cxxflags=-Wno-error=attributes cxxflags=-Wno-attributes cxxflags=-Wa,-mbig-obj link=static linkflags=-static-libstdc++ linkflags=-static-libgcc > ../boost-test-quick-static.log
161169

162170
echo "Running Boost minimal test.."
163-
time ../b2 minimal -a --user-config=../user-config.jam -d2 --debug-configuration --hash target-os=windows address-model=64 variant=debug architecture=arm binary-format=pe abi=aapcs toolset=gcc-15 define=_WIN32_WINNT=0x0A00 cxxflags=-Wno-error=attributes cxxflags=-Wno-attributes cxxflags=-Wa,-mbig-obj link=static linkflags=-static-libstdc++ linkflags=-static-libgcc > ../boost-test-minimal-static.log
171+
time ../b2 minimal -a --user-config=../user-config.jam -d2 --debug-configuration --hash target-os=windows address-model=64 variant=debug architecture=$ARCHITECTURE binary-format=pe abi=$ABI toolset=gcc-$GCC_VERSION define=_WIN32_WINNT=0x0A00 cxxflags=-Wno-error=attributes cxxflags=-Wno-attributes cxxflags=-Wa,-mbig-obj link=static linkflags=-static-libstdc++ linkflags=-static-libgcc > ../boost-test-minimal-static.log
164172

165173
echo "Running Boost full test.."
166174

@@ -169,4 +177,4 @@ echo "Running Boost full test.."
169177
# EXIT STATUS: 126
170178
chmod +x boost_check_library.py
171179

172-
time ../b2 -a --user-config=../user-config.jam -d2 --debug-configuration --hash target-os=windows address-model=64 variant=debug architecture=arm binary-format=pe abi=aapcs toolset=gcc-15 define=_WIN32_WINNT=0x0A00 cxxflags=-Wno-error=attributes cxxflags=-Wno-attributes cxxflags=-Wa,-mbig-obj link=static linkflags=-static-libstdc++ linkflags=-static-libgcc > ../boost-test-full-static.log
180+
time ../b2 -a --user-config=../user-config.jam -d2 --debug-configuration --hash target-os=windows address-model=64 variant=debug architecture=$ARCHITECTURE binary-format=pe abi=$ABI toolset=gcc-$GCC_VERSION define=_WIN32_WINNT=0x0A00 cxxflags=-Wno-error=attributes cxxflags=-Wno-attributes cxxflags=-Wa,-mbig-obj link=static linkflags=-static-libstdc++ linkflags=-static-libgcc > ../boost-test-full-static.log

0 commit comments

Comments
 (0)