Bug 102318 - Mesa3D Scons build - LLVM 5.0 not supported
Summary: Mesa3D Scons build - LLVM 5.0 not supported
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: unspecified
Hardware: All All
: medium major
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-20 09:19 UTC by pal1000
Modified: 2017-09-19 11:21 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Mesa3D scons build output with LLVM 5.0 and MSVC (48.74 KB, text/plain)
2017-08-20 09:19 UTC, pal1000
Details
Patch that enables LLVM 5.0 support to Mesa3D scons build (1.51 KB, patch)
2017-09-14 09:07 UTC, pal1000
Details | Splinter Review

Description pal1000 2017-08-20 09:19:50 UTC
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.
Comment 1 Emil Velikov 2017-08-30 07:55:29 UTC
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 [1]

[1] https://www.mesa3d.org/submittingpatches.html
Comment 3 pal1000 2017-09-14 09:07:55 UTC
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.
Comment 4 Emil Velikov 2017-09-14 13:50:48 UTC
(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.
Comment 5 Emil Velikov 2017-09-19 11:21:47 UTC
Should be fixed with the following. I'll pick it up for 17.2 series.

commit c1b01370486d203a6bccff2161afb288cfda1de3
Author: Alexandru-Liviu Prodea <liviuprodea@yahoo.com>
Date:   Fri Sep 15 07:26:33 2017 +0000

    Scons: Add LLVM 5.0 support


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.