merge #21793: use -isysroot over --sysroot on macOS

This commit is contained in:
Kittywhiskers Van Gogh 2021-08-26 13:18:33 +05:30
parent 7a8ceb7e67
commit 96f968c250
3 changed files with 7 additions and 7 deletions

View File

@ -60,7 +60,7 @@ Working macOS DMGs are created in Linux by combining a recent `clang`, the Apple
Apple uses `clang` extensively for development and has upstreamed the necessary Apple uses `clang` extensively for development and has upstreamed the necessary
functionality so that a vanilla clang can take advantage. It supports the use of `-F`, functionality so that a vanilla clang can take advantage. It supports the use of `-F`,
`-target`, `-mmacosx-version-min`, and `--sysroot`, which are all necessary when `-target`, `-mmacosx-version-min`, and `-isysroot`, which are all necessary when
building for macOS. building for macOS.
Apple's version of `binutils` (called `cctools`) contains lots of functionality missing in the Apple's version of `binutils` (called `cctools`) contains lots of functionality missing in the

View File

@ -1,5 +1,5 @@
build_darwin_CC:=$(shell xcrun -f clang) --sysroot $(shell xcrun --show-sdk-path) build_darwin_CC:=$(shell xcrun -f clang) -isysroot$(shell xcrun --show-sdk-path)
build_darwin_CXX:=$(shell xcrun -f clang++) --sysroot $(shell xcrun --show-sdk-path) build_darwin_CXX:=$(shell xcrun -f clang++) -isysroot$(shell xcrun --show-sdk-path)
build_darwin_AR:=$(shell xcrun -f ar) build_darwin_AR:=$(shell xcrun -f ar)
build_darwin_RANLIB:=$(shell xcrun -f ranlib) build_darwin_RANLIB:=$(shell xcrun -f ranlib)
build_darwin_STRIP:=$(shell xcrun -f strip) build_darwin_STRIP:=$(shell xcrun -f strip)
@ -10,8 +10,8 @@ build_darwin_SHA256SUM=shasum -a 256
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) -o build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) -o
#darwin host on darwin builder. overrides darwin host preferences. #darwin host on darwin builder. overrides darwin host preferences.
darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(shell xcrun --show-sdk-path) darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) -isysroot$(shell xcrun --show-sdk-path)
darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ -fvisibility=hidden --sysroot $(shell xcrun --show-sdk-path) darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ -fvisibility=hidden -isysroot$(shell xcrun --show-sdk-path)
darwin_AR:=$(shell xcrun -f ar) darwin_AR:=$(shell xcrun -f ar)
darwin_RANLIB:=$(shell xcrun -f ranlib) darwin_RANLIB:=$(shell xcrun -f ranlib)
darwin_STRIP:=$(shell xcrun -f strip) darwin_STRIP:=$(shell xcrun -f strip)

View File

@ -101,7 +101,7 @@ darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-u LIBRARY_PATH \ -u LIBRARY_PATH \
$(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ $(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
--sysroot=$(OSX_SDK) \ -isysroot$(OSX_SDK) \
-Xclang -internal-externc-isystem$(clang_resource_dir)/include \ -Xclang -internal-externc-isystem$(clang_resource_dir)/include \
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include -Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
@ -109,7 +109,7 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-u LIBRARY_PATH \ -u LIBRARY_PATH \
$(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \ $(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \ -B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
--sysroot=$(OSX_SDK) \ -isysroot$(OSX_SDK) \
-stdlib=libc++ -nostdinc++ \ -stdlib=libc++ -nostdinc++ \
-Xclang -cxx-isystem$(OSX_SDK)/usr/include/c++/v1 \ -Xclang -cxx-isystem$(OSX_SDK)/usr/include/c++/v1 \
-Xclang -internal-externc-isystem$(clang_resource_dir)/include \ -Xclang -internal-externc-isystem$(clang_resource_dir)/include \