[PATCH] Allow external projects to run tests via llvm-lit

Alp Toker alp at nuanti.com
Tue May 20 17:30:30 PDT 2014


On 21/05/2014 03:11, Greg Fitzgerald wrote:
> so just, "if (LLVM_MAIN_SRC_DIR)"?  Drop the file stat and check to
> see if the variable is set?

Sounds tidier.

So, clang currently has some custom logic for this:

CMakeLists.txt:    if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
CMakeLists.txt:      set(LLVM_LIT ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
CMakeLists.txt-    else()
CMakeLists.txt-      # Seek installed Lit.
CMakeLists.txt:      find_program(LLVM_LIT "lit.py" 
${LLVM_MAIN_SRC_DIR}/utils/lit
CMakeLists.txt-        DOC "Path to lit.py")
CMakeLists.txt-    endif()

It seems the best way to validate your change would be to make use of it 
to simplify the above.

Alp.


>
> -Greg
>
>
> On Tue, May 20, 2014 at 4:15 PM, Alp Toker <alp at nuanti.com> wrote:
>> On 21/05/2014 02:02, Greg Fitzgerald wrote:
>>>> I asked some questions about this change in my previous mail.
>>> Sorry, my last reply intended to answer your question, but I see how it
>>> wasn't too clear.  Take 2:
>>
>> I just saw your reply. Both that and this one look like you're sending the
>> mails to yourself so they appear neither in my inbox nor the review thread.
>>
>>
>>>
>>>> Is the idea here to support lit testing of an external project or to
>>>> enable some unusual build configuration of the standard LLVM modules?
>>> The idea here is to support lit testing of both standard LLVM projects as
>>> well as external ones.  llvm-lit is in the install directory but it is
>>> currently inaccessible via the CMake files in the install directory.
>>
>> OK, sounds reasonable.
>>
>> But the if (EXISTS ${LLVM_MAIN_SRC_DIR}) check is unfortunate and isn't done
>> elsewhere -- isn't there some other way to check whether we're doing an
>> external build?
>>
>> Alp.
>>
>>
>>> http://reviews.llvm.org/D3429
>>>
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>> --
>> http://www.nuanti.com
>> the browser experts
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-- 
http://www.nuanti.com
the browser experts




More information about the llvm-commits mailing list