(Now including the list; sorry for the double emails.)

Yes, because clang-cl does work on non-Windows. I don't think anyone
has used it for actual cross-compilation from e.g. Linux to Windows
yet, but it's a theoretical possibility. It's also useful for testing
and developing clang-cl.

msbuild-bin/cl.exe is special though. It's only used to intercept the
real cl.exe in msbuild builds, so that one really only makes sense on
Windows.

Cheers,
Hans

On Wed, Sep 23, 2015 at 1:30 PM, Chris Bieneman via cfe-commits
<cfe-commits@lists.llvm.org> wrote:
> Random question. Is there any reason to generate clang-cl if you’re not on 
> Windows?
>
> It may make sense to move clang-cl under the if(WIN32).
>
> -Chris
>
>> On Sep 21, 2015, at 3:44 PM, Hans Wennborg via cfe-commits 
>> <cfe-commits@lists.llvm.org> wrote:
>>
>> Author: hans
>> Date: Mon Sep 21 17:44:57 2015
>> New Revision: 248221
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=248221&view=rev
>> Log:
>> Add msbuild-bin/cl to CLANG_LINKS_TO_CREATE
>>
>> This got lost in r248043 which refactored the symlink creation.
>>
>> Modified:
>>    cfe/trunk/tools/driver/CMakeLists.txt
>>
>> Modified: cfe/trunk/tools/driver/CMakeLists.txt
>> URL: 
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=248221&r1=248220&r2=248221&view=diff
>> ==============================================================================
>> --- cfe/trunk/tools/driver/CMakeLists.txt (original)
>> +++ cfe/trunk/tools/driver/CMakeLists.txt Mon Sep 21 17:44:57 2015
>> @@ -62,6 +62,10 @@ add_custom_target(install-clang
>>
>> if(NOT CLANG_LINKS_TO_CREATE)
>>   set(CLANG_LINKS_TO_CREATE clang++ clang-cl)
>> +
>> +  if (WIN32)
>> +    list(APPEND CLANG_LINKS_TO_CREATE ../msbuild-bin/cl)
>> +  endif()
>> endif()
>>
>> foreach(link ${CLANG_LINKS_TO_CREATE})
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to