summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-10-09 21:31:04 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-10-09 22:20:06 +0200
commit84bf658e2bedde92f3bd3f2285e6350f8cf60339 (patch)
treea70ef5552ce0db085ceaeb1f079207549c5220a4
parent0ccb3b4f73805d49a266a23f11d640cef8c47553 (diff)
downloadsparse-84bf658e2bedde92f3bd3f2285e6350f8cf60339.tar.gz
llvm: fix sparsec breakage on recent cygwin version
On recent version of cygwin, sparsec fails because, apparently, lcc is using the wrong triple. This is because: 1) sparse-llvm doesn't use an explicit triple for cygwin; 2) by default, llc use triple of the host machine at build-time as the the default for the target machine. Why/how it was working with previous versions is unknown. Fix this by using, on cygwin, the triple given by llvm-config. Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Investigated-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rwxr-xr-xsparsec1
1 files changed, 1 insertions, 0 deletions
diff --git a/sparsec b/sparsec
index bafe2da5..3f9b60c6 100755
--- a/sparsec
+++ b/sparsec
@@ -39,6 +39,7 @@ case "$(uname -s)" in
*CYGWIN*)
# cygwin uses the sjlj (setjmp-longjmp) exception model
LLC_ARCH_OPTS="-exception-model=sjlj"
+ LLC_ARCH_OPTS="$LLC_ARCH_OPTS -mtriple=$(llvm-config --host-target)"
;;
*)
;;