Commit abf88f9e authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Clang package: build with -DLIBCXX_ENABLE_{SHARED,STATIC}=OFF

After 61e89737, libc++ no longer supports linking against the system libc++abi.
We never cared about linking the library anyway, we just want the headers.
This lets us do that; see bug for discussion.

Bug: 1067216
Change-Id: Ib6265cf9c6c58d25e72f8f43ae994d9ec6da69a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2133967Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756240}
parent 14b1f55b
......@@ -473,6 +473,13 @@ def main():
'-DLLVM_INCLUDE_GO_TESTS=OFF',
]
if sys.platform == 'darwin':
# For libc++, we only want the headers.
base_cmake_args.extend([
'-DLIBCXX_ENABLE_SHARED=OFF', '-DLIBCXX_ENABLE_STATIC=OFF',
'-DLIBCXX_INCLUDE_TESTS=OFF'
])
if args.gcc_toolchain:
# Don't use the custom gcc toolchain when building compiler-rt tests; those
# tests are built with the just-built Clang, and target both i386 and x86_64
......@@ -489,12 +496,6 @@ def main():
cxxflags.append('-I' + zlib_dir)
ldflags.append('-LIBPATH:' + zlib_dir)
if sys.platform == 'darwin':
# Use the system libc++abi.
# TODO(hans): use https://reviews.llvm.org/D62060 instead
base_cmake_args.append('-DLIBCXX_CXX_ABI=libcxxabi')
base_cmake_args.append('-DLIBCXX_CXX_ABI_SYSTEM=1')
if sys.platform != 'win32':
# libxml2 is required by the Win manifest merging tool used in cross-builds.
base_cmake_args.append('-DLLVM_ENABLE_LIBXML2=FORCE_ON')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment