Install only clang and clang++ in llvm - windows

Viewed 290

I'm new to clang in windows and I want to only install clang and clang++ executables.

Since the full installation of llvm and clang requires more than 1GB.

Can anyone tell me how to install only clang or which executables, files, or dlls to exclude in the installation?

1 Answers

If you install LLVM from sources, you can configure build targets using some flags, as explained here.

Probably are looking for a build like (make sure you have CMake installed and in your PATH):

git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build
cd build
cmake -G "Visual Studio" -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=MinSizeRel [...]

Thus you only include clang project being the build type the minimum.

Related