[cfe-dev] Hello CLang World!

Russell Haley via cfe-dev cfe-dev at lists.llvm.org
Thu Jan 9 22:27:40 PST 2020


Hi,

Er. Hello, I don't feel like I have any business being on a compiler
mailing list but I've been driven here by desperation. Not that I don't
want to be here, I just suck at C so it feels weird.

Anywho, I like Lua. It's  a fun little language. The neat part is it's so
small and customizable. On FreeBSD it's *super* easy to build. In fact,
it's so easy a nicompoop like me has become the port maintainer for Lua
(albeit with great heaps of help from someone else).

Alas, on Windows, Lua is not so easy to build. I need to download a 20 GB
Visual Studio or tear my hair out getting mingw set up. I have sometimes
resorted to the Free VC++ Build Tools, but that's still 4GB to build Lua,
which is.. er.. 402 KB. I also still need to do everything in DOS to get
all the environment variables, or go through backflips trying to set up
powershell to work with VC++.

So, many years ago I downloaded LLVM (clang 5.01) and tried to build Lua
only to be stymied and then waylaid by life. I recently became interested
in compilers on Windows again, spurred on by the discovery of the
Embarcadero and Keil compilers, both built on clang. However, both licenses
*explicitly* forbids my use case.

So, here I am. I just want to be able to build Lua easily on Windows, so
I'm going to make my own compiler toolchain using clang and I'm going to
include it in my binary Windows distribution of Lua. PERFECTLY logical.

Anyway, you know how I said I suck at C? Well the thing that stymied me so
many years ago - and has stymied me this very night and driven me insane
enough to swear to almighty God that I'mna learn how to make a compiler -
is that the Lua Makefile uses `ar` and there is no `ar` on Windows. Do I
need ar (an archiver to build lib files) when I'm compiling on Windows with
clang? Could someone help me build Lua on Windows with clang so I can start
my lunatic journey into LLVM?

Thanks, and nice meeting you all.

Russell Haley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200109/d7120936/attachment.html>


More information about the cfe-dev mailing list