[go: nahoru, domu]

Control windows lld-link thin archive flag with config("thin_archive")

We're trying to build a self-contained static library of V8, for
inclusion in a Cargo crate. This is part of the broader effort to make
Deno (https://github.com/denoland/deno) available as a crate.

Currently it's not possible to build 'fat' static libraries with
lld-link, because the `/llvmlibthin` flag is hard-coded into the
windows toolchain.

The equivalent on posix platforms, ar's `-T` flag, is managed by the
`thin_archive` config. This config is enabled by default, but it can be
explicitly removed from a target when necessary.

This patch changes places the `/llvmlibthin` flag under control of
config("thin_archive") also.

This causes static_library targets that use the thin_archive machinery
to not be thin archives on Windows either. There aren't many of these
targets, and this looks like a neutral-to-vaguely-good change for these
targets on Windows.

Change-Id: If756650146459c4029d7925592e32dbe74650edf
Reviewed-on: https://chromium-review.googlesource.com/c/1372633
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616162}
3 files changed