This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by thakis on Mar 16 2022, 5:34 PM.

Details

Summary

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.)

Diff Detail

Event Timeline

thakis created this revision.Mar 16 2022, 5:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2022, 5:34 PM
thakis requested review of this revision.Mar 16 2022, 5:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2022, 5:34 PM
aeubanks accepted this revision.Mar 16 2022, 5:43 PM
This revision is now accepted and ready to land.Mar 16 2022, 5:43 PM
This revision was landed with ongoing or failed builds.Mar 21 2022, 10:43 AM
This revision was automatically updated to reflect the committed changes.