Created attachment 133638 [details]
Mesa3D scons build output with LLVM 5.0 and MSVC
I tried building Mesa using Scons and LLVM 5.0 RC2 on Windows using MSVC.
It appears that LLVM 5.0 changes stuff once again. According to the error message Mesa3D attempts to call a LLVM function with incorrect number of parameters.
Based on the error message, it seems that the HAVE_LLVM does not end up with the correct version (0x0500).
To fix this you want to look at the way llvm_version is handled in scons/llvm.py.
I doubt I'll have time to look at this soon, but you're more than welcome to send patches 
LLVM 5.0 is out:
Created attachment 134221 [details] [review]
Patch that enables LLVM 5.0 support to Mesa3D scons build
Here is the patch that adds support for LLVM 5.0 to Scons build.
Turned out to be very straight-forward.
(In reply to Alex Granni from comment #3)
> Created attachment 134221 [details] [review] [review]
> Patch that enables LLVM 5.0 support to Mesa3D scons build
> Here is the patch that adds support for LLVM 5.0 to Scons build.
> Turned out to be very straight-forward.
Nicely done. Please sent it to the list for review.
Small nit: please keep the hunk alike the 4.0 one, adding any extra entries at the end.
Should be fixed with the following. I'll pick it up for 17.2 series.
Author: Alexandru-Liviu Prodea <firstname.lastname@example.org>
Date: Fri Sep 15 07:26:33 2017 +0000
Scons: Add LLVM 5.0 support