Thompson, David <dthomps...@worcester.edu> writes:
> On Wed, Sep 14, 2016 at 5:38 AM, Ricardo Wurmus <rek...@elephly.net> wrote:
>> * gnu/packages/llvm.scm (llvm-for-extempore): New variable.
>> gnu/packages/llvm.scm | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>> diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
>> index a9eba79..b55a200 100644
>> --- a/gnu/packages/llvm.scm
>> +++ b/gnu/packages/llvm.scm
>> @@ -3,6 +3,7 @@
>> ;;; Copyright © 2015 Mark H Weaver <m...@netris.org>
>> ;;; Copyright © 2015 Ludovic Courtès <l...@gnu.org>
>> ;;; Copyright © 2016 Dennis Mungai <dmng...@gmail.com>
>> +;;; Copyright © 2016 Ricardo Wurmus <rek...@elephly.net>
>> ;;; This file is part of GNU Guix.
>> @@ -267,3 +268,10 @@ code analysis tools.")
>> (define-public clang-3.5
>> (clang-from-llvm llvm-3.5 clang-runtime-3.5
>> +(define-public llvm-for-extempore
>> + (package (inherit llvm-3.7)
>> + (source
>> + (origin
>> + (inherit (package-source llvm-3.7))
>> + (patches (list (search-patch "llvm-for-extempore.patch")))))))
> This could use a comment explaining the rationale. Also, you forgot
> to include the patch file in this commit.
Oh, I did indeed forget it. I’ve added it and put a long comment to the
top, which I’ll quote here:
This patch to LLVM is required by the developers of the Extempore language.
The following explanation was posted to the extemporel...@googlegroups.com
"There is an assumption in the parser that all definitions occur within the
same compilation unit - i.e. the parser has local state about what has been
parsed in this unit of work. Extempore obviously does lots of little units
rather than one big unit and this causes problems for named types that were
defined in another unit - which they always are. The patch simply checks the
current module to see if the type has been previously defined, and intervenes
appropriately if it has."
Thanks for the review!