aboutsummaryrefslogtreecommitdiff
path: root/depends/hosts
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-01-10 12:16:25 -0500
committerCarl Dong <contact@carldong.me>2020-07-07 16:26:44 -0400
commitc9c572a367f08095a3e2c7c0723da9f6778b9378 (patch)
tree138555e28bca4044aa6d97db90b6a83d1b5d0432 /depends/hosts
parente6e5c8d6caccb4648fc580e5a01448857c2fdf18 (diff)
downloadbitcoin-c9c572a367f08095a3e2c7c0723da9f6778b9378.tar.xz
depends: Allow building with system clang
Diffstat (limited to 'depends/hosts')
-rw-r--r--depends/hosts/darwin.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
index fcd4ef7607..fd32a9a673 100644
--- a/depends/hosts/darwin.mk
+++ b/depends/hosts/darwin.mk
@@ -8,8 +8,8 @@ OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-
# When cross-compiling for Darwin using Clang, -mlinker-version must be passed to
# ensure that modern linker features are enabled.
-darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION)
-darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -stdlib=libc++ -mlinker-version=$(LD64_VERSION)
+darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin
+darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -stdlib=libc++ -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin
darwin_CFLAGS=-pipe
darwin_CXXFLAGS=$(darwin_CFLAGS)
@@ -21,5 +21,10 @@ darwin_debug_CFLAGS=-O1
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
darwin_native_binutils=native_cctools
+ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
darwin_native_toolchain=native_cctools
+else
+darwin_native_toolchain=
+endif
+
darwin_cmake_system=Darwin