Skip to content

Commit

Permalink
WIP: Test out a patch for LLVM
Browse files Browse the repository at this point in the history
  • Loading branch information
mstorsjo committed Feb 22, 2024
1 parent 908f88f commit c929389
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/test-llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ jobs:
LLVM_VERSION: ${{needs.prepare.outputs.LLVM_VERSION}}
run: |
git config --global core.autocrlf false
git config --global user.name "LLVM MinGW"
git config --global user.email root@localhost
bash -c "CHECKOUT_ONLY=1 ./build-llvm.sh"
# Not passing -DPython3_EXECUTABLE="$Env:PYTHON_EXE" here. The bundled Python doesn't normally have
# zlib enabled, which some tests require.
Expand Down
3 changes: 2 additions & 1 deletion build-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

set -e

: ${LLVM_VERSION:=llvmorg-18.1.0-rc3}
: ${LLVM_VERSION:=e2f08268304dc972440391c43bf1d47e28fad93e}
ASSERTS=OFF
unset HOST
BUILDDIR="build"
Expand Down Expand Up @@ -117,6 +117,7 @@ if [ -n "$SYNC" ] || [ -n "$CHECKOUT" ]; then
;;
esac
fi
git am -3 ../patches/llvm-project/*.patch
cd ..
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 9600a7709045d796b48a49b5e6477d97a44849e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <[email protected]>
Date: Fri, 23 Feb 2024 00:45:32 +0200
Subject: [PATCH] [llvm-jitlink] [test] Add an XFAIL for a JITLink test on
MinGW

This testcase fails on MinGW targets, because when compiling the
main() function, it gets an implicit call to __main(), which is
missing in this context.
---
llvm/test/ExecutionEngine/JITLink/Generic/sectcreate.test | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/llvm/test/ExecutionEngine/JITLink/Generic/sectcreate.test b/llvm/test/ExecutionEngine/JITLink/Generic/sectcreate.test
index ec71011d545e..50585a2d02e9 100644
--- a/llvm/test/ExecutionEngine/JITLink/Generic/sectcreate.test
+++ b/llvm/test/ExecutionEngine/JITLink/Generic/sectcreate.test
@@ -8,4 +8,9 @@
# Jitlink does not support ARM64 COFF files.
# UNSUPPORTED: target=aarch64-pc-windows-{{.*}}

-# jitlink-check: *{4}foo = 0x2a2a5a5a
\ No newline at end of file
+# On MinGW targets, when compiling the main() function, it gets
+# an implicitly generated call to __main(), which is missing in
+# this context.
+# XFAIL: target={{.*}}-windows-gnu
+
+# jitlink-check: *{4}foo = 0x2a2a5a5a
--
2.25.1

0 comments on commit c929389

Please sign in to comment.