Bug 1788870 - Stop shipping libc++ along clang. r=firefox-build-system-reviewers,andi

There are some ABI issues with libc++ headers in clang 15. The main
reason we are shipping libc++ with our clang is that the macos SDK,
up to and including 11.1, only contained the libc++ libraries, but
not the headers. The first SDK that contains the headers is 11.3
(there is no 11.2, at least publicly available), and we're now using
it.

Another problem with libc++ is that the way we currently build it is
deprecated and is going to yields hard errors soon enough on clang
trunk.

The simplest thing to do right now is to just stop shipping libc++.

Eventually, we may want to ship it correctly in a different way, for
all platforms, which was not happening anyways.

Differential Revision: https://phabricator.services.mozilla.com/D156283
This commit is contained in:
Mike Hommey
2022-09-05 21:37:07 +00:00
parent 24f7545296
commit 38e62113d2

View File

@@ -227,15 +227,6 @@ def build_one_stage(
"-DCLANG_REPOSITORY_STRING=taskcluster-%s" % os.environ["TASK_ID"],
]
projects = ["clang"]
# libc++ doesn't build with MSVC because of the use of #include_next.
if is_final_stage and os.path.basename(cc[0]).lower() != "cl.exe":
projects.append("libcxx")
# libc++abi has conflicting definitions between the shared and static
# library on Windows because of the import library for the dll having
# the same name as the static library. libc++abi is not necessary on
# Windows anyways.
if not is_windows():
projects.append("libcxxabi")
if is_final_stage:
projects.extend(("clang-tools-extra", "lld"))
else:
@@ -634,9 +625,9 @@ def main():
if is_darwin():
extra_cflags = []
extra_cxxflags = ["-stdlib=libc++"]
extra_cxxflags = []
extra_cflags2 = []
extra_cxxflags2 = ["-stdlib=libc++"]
extra_cxxflags2 = []
extra_asmflags = []
extra_ldflags = []
elif is_linux():
@@ -681,8 +672,8 @@ def main():
# undo the damage done in the is_linux() block above, and also simulate
# the is_darwin() block above.
extra_cflags = []
extra_cxxflags = ["-stdlib=libc++"]
extra_cxxflags2 = ["-stdlib=libc++"]
extra_cxxflags = []
extra_cxxflags2 = []
extra_flags = [
"-mlinker-version=137",