hanchenye-llvm-project/compiler-rt
Dan Liew 8a5bfbe6db [CMake] Disable building all Darwin libraries (except builtins) for macOS i386 when the SDK is >= 10.15.
Summary:
In the macOS 10.15 SDK the ability to link i386 binaries was removed and
in the corresponding OS it is not possible to run macOS i386 binaries.

The consequence of these changes meant that targets like `check-asan`
would fail because:

* Unit tests could not be linked for i386
* Lit tests for i386 would fail due to not being able to execute
  compiled binaries.

The simplest fix to this is to simply disable building for i386 for
macOS when using the 10.15 SDK (or newer). This disables building the
i386 slice for most compiler-rt libraries and consequently disables the
unit and lit tests for macOS i386.

Note that because the `DARWIN_osx_ARCHS` CMake variable is a cache
variable this patch will have no affect on existing builds unless
the existing cache variable is deleted. The simplest way to deal with
this is delete existing builds and just do a fresh configure.

Note this should not affect the builtins which are managed with
the `DARWIN_osx_BUILTIN_ARCHS` CMake cache variable.

For those who wish to force using a particular set of architectures when
using newer SDKs passing `-DDARWIN_osx_ARCHS=i386;x86_64;x86_64h` to
CMake should provide a usable (but completely unsupported) workaround.

rdar://problem/55668535
rdar://problem/47939978

Reviewers: kubamracek, yln, azhar, kcc, dvyukov, vitalybuka, cryptoad, eugenis, thakis, phosek

Subscribers: mgorny, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 374977
2019-10-16 05:48:39 +00:00
..
cmake [CMake] Disable building all Darwin libraries (except builtins) for macOS i386 when the SDK is >= 10.15. 2019-10-16 05:48:39 +00:00
docs
include [compiler-rt] Add ubsan interface header. 2019-09-13 08:22:58 +00:00
lib Revert "[ASan] Refine diagnoses messages" 2019-10-16 02:13:16 +00:00
test CFI: wrong type passed to llvm.type.test with multiple inheritance devirtualization. 2019-10-15 16:32:50 +00:00
tools Add GWP-ASan fuzz target to compiler-rt/tools. 2019-08-27 18:28:07 +00:00
unittests
utils Update generate_netbsd_ioctls.awk for NetBSD 9.99.3 2019-08-08 02:08:23 +00:00
www
.arcconfig
.gitignore
CMakeLists.txt [compiler-rt] Don't use libcxx if it's not enabled by LLVM_ENABLE_PROJECTS 2019-08-28 02:41:14 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================