[llvm-dev] Cannot build Clang/LLVM on Windows with LLVM_BUILD_LLVM_DYLIB

biologi spm via llvm-dev llvm-dev at lists.llvm.org
Sun Jun 11 22:07:06 PDT 2017


In the end I just deleted clang-cl.exe etc and create real Windows
symlink with "mklink clang-cl.exe clang.exe" (required administrator
permission). Works perfectly. Apparently these drivers inspect their
own name argv[0] before deciding what mode to run.

With this hack and ninja -C build install-clang install-clang-headers,
the resulting toolset is only 44MB, which is a great improvement when
compared with the default installation (380+MB).

Thanks for pointing out that these drivers are just symlinks!

On Sun, Jun 11, 2017 at 10:29 PM, Tim Northover <t.p.northover at gmail.com> wrote:
> On 10 June 2017 at 21:04, biologi spm via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> clang.exe, clang++.exe, clang-cl.exe, clang-cl.exe and
>> msbuild-bin/cl.exe are each 37MB, but they serve almost the same
>> purpose, just receive different flavours of command flags.
>
> On Unix systems these are all symlinks and so essentially free. I hear
> Windows doesn't cope well with that though so it looks like we just
> copy the files there.
>
>> Can Clang/LLVM add a configuration similar to GCC?
>
> That's probably best discussed on the cfe-dev mailing list. Doing it
> optimally would involve substantial refactoring (essentially splitting
> lib/Driver out into its own tool). I think you'd be lucky to get
> anyone to sign up to work on that, but you might be able to convince
> them patches are welcome.
>
> Cheers.
>
> Tim.


More information about the llvm-dev mailing list