File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,28 @@ LD64_VERSION=530
6
6
7
7
OSX_SDK =$(SDK_PATH ) /Xcode-$(XCODE_VERSION ) -$(XCODE_BUILD_ID ) -extracted-SDK-with-libcxx-headers
8
8
9
- # When cross-compiling for Darwin using Clang, -mlinker-version must be passed to
10
- # ensure that modern linker features are enabled.
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
+ #
11
31
darwin_CC =clang -target $(host ) -mmacosx-version-min=$(OSX_MIN_VERSION ) --sysroot $(OSX_SDK ) -mlinker-version=$(LD64_VERSION ) -B$(build_prefix ) /bin
12
32
darwin_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
13
33
You can’t perform that action at this time.
0 commit comments