sysroot.py: add support for darwin
authorNico Weber <thakis@chromium.org>
Thu, 18 Feb 2021 14:30:47 +0000 (09:30 -0500)
committerNico Weber <thakis@chromium.org>
Thu, 18 Feb 2021 15:48:18 +0000 (10:48 -0500)
commit0ec448194e2928a3d1dc2eceeb764c6e19bcec3e
tree72ac0ee9e033b016dc1af68a663d78ed86bfcf82
parent5f7715d8780a1d16ad023995d282a7d94cb923a9
sysroot.py: add support for darwin

This is a tiny bit messy because compiler-rt needs different sysroots for
macOS, iOS, etc. We want sysroot.py to create something that is a hermetic
representation of all build deps, so it needs to create a directory that
contains all needed SDKs, and these subdirectories are then passed to
cmake which passes each of these _subdirectories_ as different -isysroot
flags while building the runtime libraries.

Differential Revision: https://reviews.llvm.org/D96958
llvm/utils/gn/build/BUILD.gn
llvm/utils/gn/build/mac_sdk.gni
llvm/utils/gn/secondary/compiler-rt/BUILD.gn
llvm/utils/sysroot.py