Skip to content

Commit 5049d32

Browse files
committed
ci: improve g++ warmup to include iostream/vector/cstring headers
A trivial warmup program only loads the basic toolchain (cc1plus/as/ld). The actual test programs use <iostream>, <vector>, <cstring> which require additional header search paths and libstdc++ linking. Including these headers in the warmup ensures those paths are also in the OS file cache.
1 parent 8cdbc22 commit 5049d32

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/windows-qt6.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ jobs:
8585
run: |
8686
gpp=$(which g++ 2>/dev/null || true)
8787
if [ -n "$gpp" ]; then
88-
echo "int main(){return 0;}" | g++ -x c++ -O2 -o "$TEMP/_warmup.exe" -
88+
cat <<'EOF' | g++ -x c++ -O2 -o "$TEMP/_warmup.exe" -
89+
#include <cstring>
90+
#include <iostream>
91+
#include <vector>
92+
int main() { std::vector<int> v; std::cout << v.size(); return 0; }
93+
EOF
8994
echo "g++ warmup done: $gpp"
9095
else
9196
echo "g++ not found, skipping warmup"

0 commit comments

Comments
 (0)