[cfe-dev] Fwd: Hello CLang World!

Russell Haley via cfe-dev cfe-dev at lists.llvm.org
Sat Jan 11 13:31:15 PST 2020


Hi,

As I said to  Zachary, the lua mailing list automagically replies to the
mailing list and I forget to reply all sometimes. This is the messages
forwarded on to the list.

---------- Forwarded message ---------
From: Russell Haley <russ.haley at gmail.com>
Date: Sat, Jan 11, 2020 at 11:06 AM
Subject: Re: [cfe-dev] Hello CLang World!
To: Zachary Turner <zturner at roblox.com>




On Sat, Jan 11, 2020 at 7:45 AM Zachary Turner <zturner at roblox.com> wrote:

> Well, a kid would just install VS and call it a day :)
>

Yes, touche. Remember I'm full on triggered! None of what I'm doing makes
much sense (ha ha). I guess this is a haphazard attempt to figure out *why*
nobody else has created a C compiler for Windows.


> If you’re feeling motivated, you could install everything you need
> (including VS), then manually extract out the necessary components, and
> package them up, then put that in some (private) github somewhere so
> whenever you need it, you just clone it and you’re good to go.
>

I looked at that briefly the other day. I need to check about the
licensing. The thought was distribute the clang compiler with header and
lib files from the VS toolchain and just point them at the redistributable.
As to your point below: that means no debug symbols or debug version to
link to, no debugger and likely a bunch of other problems.


> That said, MinGW is — imho — trying to fit a square peg in a round hole.
> If you want to have a good experience on Windows, you need to embrace the
> Windows way.  For example, if you build with MinGW, you won’t even be able
> to step through your program in a debugger.
>

Yes, I agree. As we discuss this my envisioned toolset keeps getting less
and less useful.  My primary use case for all this is alongside LuaRocks to
compile existing modules, but a debugger would  be nice... hello 20GB
Visual Studio. Drat.


> On Fri, Jan 10, 2020 at 11:49 PM Russell Haley <russ.haley at gmail.com>
> wrote:
>
>>
>>
>> On Fri, Jan 10, 2020 at 10:41 PM Zachary Turner <zturner at roblox.com>
>> wrote:
>>
>>> Libc++ can get you a c++ standard library, but you’ll need a libc as
>>> well, and you have two options - Microsoft’s or MinGW.  using clang on
>>> Windows with MinGW is not a common combination so I don’t know what kind of
>>> issues you’ll run into.
>>>
>> D'oh! I had assumed Libc++ included a C library. That's actually all I
>> was interested in.
>>
>>
>>>
>>> If you just want to avoid paying money, then you don’t need to worry
>>> about that because VS Community Edition is free.  If it’s a principle thing
>>> a d you just want to use OSS for the whole stack, you might need to go with
>>> MinGW.
>>>
>>
>> Don't get me wrong, I've used VS for almost 2 decades now for C# (and
>> enjoy it). Yes, the community edition is free and 20 GB. Even the the free
>> VC++ Build Tools - which I've used effectively to run Luarocks - is 4GB. I
>> just can't believe that's necessary. My experience with setting up mingw
>> has been horrible and I'm *nix fluent . How is some kid supposed to deal
>> with that? Maybe I just botched it, I don't know. I also still don't know
>> if I need a runtime distributable with mingw.
>>
>> The thing that triggered me this time (and I'm full on SJW triggered) was
>> when I tried the Embarcadero package. The clang based compiler and runtime
>> are small - 194 MB. It only does Win32 and requires a runtime but I'm good
>> with that! Dammit, I want to do that! I just want a C compiler on Windows.
>>
>> I wonder if I can hack bsd libc...
>>
>> Cheers,
>> Russ
>>
>>
>>> On Fri, Jan 10, 2020 at 10:37 PM Russell Haley <russ.haley at gmail.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Thu, Jan 9, 2020 at 11:27 PM Zachary Turner <zturner at roblox.com>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Thu, Jan 9, 2020 at 11:17 PM Russell Haley <russ.haley at gmail.com>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> On Thu, Jan 9, 2020 at 10:42 PM Zachary Turner <zturner at roblox.com>
>>>>>> wrote:
>>>>>>
>>>>>>> On Windows lib files are typically made with a tool called lib which
>>>>>>> ships with Visual Studio.  Unlike ar, which outputs .a files, lib outputs
>>>>>>> .lib files.
>>>>>>>
>>>>>>
>>>>>> Thank you! I'll start with that and change the make file. Is there an
>>>>>> open source equivalent to lib? One that could be shipped by me and minus
>>>>>> the few gigabytes of VS? I'll obviously google it after this, but I'll ask
>>>>>> in case you or someone has a preference (or project?)
>>>>>>
>>>>> llvm includes a tool called llvm-lib which is command-line compatible
>>>>> with Microsoft’s lib.exe
>>>>>
>>>>> You can’t get by without installing visual studio at all though,
>>>>> because even if you use clang on Windows it still needs the MS headers and
>>>>> libraries which are installed via Visual Studio and the Windows SDK.
>>>>>
>>>>
>>>> I'm hoping libc++ can help out there? I see there is Visual
>>>> Studio/Cmake build instructions. Lua modules are primarily written in C
>>>> though so I think even that might be overkill (if viable). I read some of
>>>> the documentation about turning off vcruntime compatability as well (of
>>>> dubious relevance).
>>>>
>>>>
>>>>>
>>>>>> By the way my boys and I love roblox and your studio is a *great* Lua
>>>>>> environment.
>>>>>>
>>>>> and more to come here soon :)
>>>>>
>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200111/ecf60670/attachment.html>


More information about the cfe-dev mailing list