<div dir="ltr">Hi, <div><br></div><div>I've started investigating the clang source code. I've built LLVM and Clang from source in Windows 10 using Visual Studio (I'll try again with Ninja at some point). I'd like to only build the C tools if possible? I found documentation on cmake options for building clang (e.g. building C++ or building Objective-c) but I've lost track of it if anyone could point me in the right direction?</div><div><br></div><div>Anyway, my objective is to create a very compact C compiler so I want to strip out anything unnecessary for building small dlls from existing code. My use case is this:</div><div><br></div><div>A user downloads and installs my package that contains a pre-compiled Lua interpreter and the Lua package manager called Luarocks, as well as the C toolchain. They can then drop to the command line and build and install a lua module known as a "rock". For example, if I wanted to download, build and install the stopwatch module chronos:</div><div><br></div><div>luarocks install chronos</div><div><br></div><div>The build system is built into Luarocks (and I may also include gmake). The user would never debug or analyze the C code, they would only use compiled the C modules in Lua.</div><div><br></div><div>So, I'm wondering if I can remove the static analyzer and other components? Technically I don't even need debug information. </div><div><br></div><div>During my meandering through the documentation I read that I can compile clang using dlls to conserve space at the cost of efficiency, which may be a trade off I'm willing to make. I'm wondering if the performance is *terrible* or just not as efficient as one would like? If we are talking about a few seconds difference to build a small library then I think that's worth while.<br></div><div><br></div><div>I also read in the documentation something along the lines of "Use the Visual Studio solution generated from CMake to read the Clang source code". I tried that but the solution files created by CMake don't seem to link to the source code? In fact, I've never had CMake generated VS solutions link to source code so I'm not sure what was actually being expressed? Can VS be used to browse the project or should I try to import it into Eclipse or CLion? I typically use Geany but most of my C work in Windows is limited in scope.</div><div><br></div><div>Any and all input is welcome. </div><div><br></div><div>Regards, </div><div>Russ</div></div>