[LLVMdev] building clang when present

Dan Villiom Podlaski Christiansen danchr at gmail.com
Tue Jan 20 06:56:03 PST 2009


On 19 Jan 2009, at 21:53, Mike Stump wrote:

> On Jan 19, 2009, at 12:35 PM, Dan Villiom Podlaski Christiansen wrote:
>> On 19 Jan 2009, at 21:16, Mike Stump wrote:
>>
>>> On Jan 19, 2009, at 11:55 AM, Dan Villiom Podlaski Christiansen
>>> wrote:
>>>> In my humble opinion, using OPTIONAL_DIRS would be better and
>>>> cleaner.
>>>> It may require some changes to ‘Makefile.rules’ to work as
>>>> intended, though. If there's interest in such a change, I can
>>>> prepare
>>>> a patch?
>>>
>>> Are OPTIONAL_DIRS parallel?  For some reason, I was assuming not.
>>
>> Well, from my recollection, PARALLEL_DIRS and the other *_DIRS don't
>> interact terribly well with each other with the current LLVM build
>> system. It may or may not actually be executed parallel with other
>> directories, but I wouldn't consider that a problem, as Clang itself
>> contains quite a lot of source files, libraries and directories.
>> Parallelism within the Clang source should be Good Enough™ ;)
>
> If there are bugs in the parallel aspects of llvm, I've never hit
> them.  I only ever build 8-way, and I expect it to just work; if it
> doesn't, I'd rather just fix it.  Avoiding parallel isn't the way to
> get a build system that just works in parallel.  Lastly, I'm more
> demanding than, good enough.

I don't believe any Makefile currently defines both PARALLEL_DIRS and  
one of the other DIRS variables. So you wouldn't have run into such  
bugs, yet :)

> I'll add OPTIONAL_PARALLEL_DIRS, if people would rather it be done
> that way.  :-)

My point is that the Clang source base is sufficiently large that  
there's little benefit to running it in parallel with other  
directories; parallelism within the Clang sources should more than  
suffice. I haven't tried compiling LLVM on any more than a dual core  
machine, so this is a bit theoretical for me :)

Please try the attached patch and see if it suits your needs; it fixes  
OPTIONAL_DIRS so it works as intended for in-source builds too, and  
ensures that PARALLEL_DIRS are built *after* other targets; mainly for  
the purpose of consistency and reproducability. If ‘llvm-config’ were  
added to OPTIONAL_DIRS or DIRS, it would always be processed before  
the other directories.

--

Dan Villiom Podlaski Christiansen, stud. scient.,
danchr at cs.au.dk, danchr at gmail.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-clang.diff
Type: application/octet-stream
Size: 955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090120/0a0d5f19/attachment.obj>
-------------- next part --------------



More information about the llvm-dev mailing list