[all-commits] [llvm/llvm-project] 312ec6: [gn build] Use lld-link's new /winsysroot: flag

Nico Weber via All-commits all-commits at lists.llvm.org
Mon Mar 21 10:43:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 312ec6f1569e04d16bb474a78a5f61b0ca5ffb22
      https://github.com/llvm/llvm-project/commit/312ec6f1569e04d16bb474a78a5f61b0ca5ffb22
  Author: Nico Weber <thakis at chromium.org>
  Date:   2022-03-21 (Mon, 21 Mar 2022)

  Changed paths:
    M llvm/utils/gn/build/BUILD.gn

  Log Message:
  -----------
  [gn build] Use lld-link's new /winsysroot: flag

If `clang_base_path` is set, it must now point to a directory that contains
an lld-link built with D118070.

(If this is a problem for anyone, we can guard this behind a
lld_link_understands_winsysroot gn arg, but let's see if we can get away
without that for now.)

With this, it's possible to build everything in a normal cmd.exe Window,
an MSVC shell isn't needed \o/

(Assuming you set `clang_base_path`, and you set `sysroot` to a directory
that contains a win sysroot. If you have MSVC installed,
`python3 llvm\utils\sysroot.py make-fake --out-dir=my-sysroot` and
setting `sysroot = "//my-sysroot"` in args.gn works, for example.)

Differential Revision: https://reviews.llvm.org/D121871




More information about the All-commits mailing list