1OSX_MIN_VERSION=10.12 2OSX_SDK_VERSION=10.15.1 3XCODE_VERSION=11.3.1 4XCODE_BUILD_ID=11C505 5LD64_VERSION=530 6 7OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers 8 9# Flag explanations: 10# 11# -mlinker-version 12# 13# Ensures that modern linker features are enabled. See here for more 14# details: https://github.com/bitcoin/bitcoin/pull/19407. 15# 16# -B$(build_prefix)/bin 17# 18# Explicitly point to our binaries (e.g. cctools) so that they are 19# ensured to be found and preferred over other possibilities. 20# 21# -nostdinc++ -isystem $(OSX_SDK)/usr/include/c++/v1 22# 23# Forces clang to use the libc++ headers from our SDK and completely 24# forget about the libc++ headers from the standard directories 25# 26# TODO: Once we start requiring a clang version that has the 27# -stdlib++-isystem<directory> flag first introduced here: 28# https://reviews.llvm.org/D64089, we should use that instead. Read the 29# differential summary there for more details. 30# 31darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin 32darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -stdlib=libc++ -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin -nostdinc++ -isystem $(OSX_SDK)/usr/include/c++/v1 33 34darwin_CFLAGS=-pipe 35darwin_CXXFLAGS=$(darwin_CFLAGS) 36 37darwin_release_CFLAGS=-O2 38darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) 39 40darwin_debug_CFLAGS=-O1 41darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS) 42 43darwin_native_binutils=native_cctools 44ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) 45darwin_native_toolchain=native_cctools 46else 47darwin_native_toolchain= 48endif 49 50darwin_cmake_system=Darwin 51