diff options
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/depends/builders/darwin.mk | 6 | ||||
| -rw-r--r-- | contrib/depends/hosts/darwin.mk | 9 | ||||
| -rw-r--r-- | contrib/depends/packages/native_mrustc.mk | 12 |
3 files changed, 14 insertions, 13 deletions
diff --git a/contrib/depends/builders/darwin.mk b/contrib/depends/builders/darwin.mk index bbc0475..9d56302 100644 --- a/contrib/depends/builders/darwin.mk +++ b/contrib/depends/builders/darwin.mk @@ -11,8 +11,10 @@ build_darwin_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONN #darwin host on darwin builder. overrides darwin host preferences. -darwin_CC=$(shell xcrun -f clang) -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(shell xcrun --sdk macosx --show-sdk-path) -I$(shell xcrun --sdk macosx --show-sdk-path)/usr/include -I$(host_prefix)/include -darwin_CXX:=$(shell xcrun -f clang++) -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) -stdlib=libc++ --sysroot $(shell xcrun --sdk macosx --show-sdk-path) -I$(shell xcrun --sdk macosx --show-sdk-path)/usr/include -I$(host_prefix)/include +darwin_CC=$(shell xcrun -f clang) +darwin_CXX:=$(shell xcrun -f clang++) +darwin_CFLAGS=-target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(shell xcrun --sdk macosx --show-sdk-path) -I$(shell xcrun --sdk macosx --show-sdk-path)/usr/include -I$(host_prefix)/include +darwin_CXXFLAGS=$(darwin_CFLAGS) -stdlib=libc++ darwin_AR:=$(shell xcrun -f ar) darwin_RANLIB:=$(shell xcrun -f ranlib) darwin_STRIP:=$(shell xcrun -f strip) diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk index 45c3e92..0c63a10 100644 --- a/contrib/depends/hosts/darwin.mk +++ b/contrib/depends/hosts/darwin.mk @@ -5,13 +5,12 @@ CC_target=arm64-apple-$(host_os) else CC_target=$(host) endif -darwin_CC=clang -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)- -darwin_CXX=clang++ -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -stdlib=libc++ -B$(host_prefix)/native/bin/$(host)- - +darwin_CC=clang +darwin_CXX=clang++ darwin_RANLIB=$(host_prefix)/native/bin/$(host)-ranlib darwin_AR=$(host_prefix)/native/bin/$(host)-ar -darwin_CFLAGS=-pipe -darwin_CXXFLAGS=$(darwin_CFLAGS) +darwin_CFLAGS=-pipe -target $(CC_target) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(host_prefix)/native/SDK/ -mlinker-version=$(LD64_VERSION) -B$(host_prefix)/native/bin/$(host)- +darwin_CXXFLAGS=$(darwin_CFLAGS) -stdlib=libc++ darwin_ARFLAGS=cr darwin_release_CFLAGS=-O3 diff --git a/contrib/depends/packages/native_mrustc.mk b/contrib/depends/packages/native_mrustc.mk index 6f5703b..96aab3f 100644 --- a/contrib/depends/packages/native_mrustc.mk +++ b/contrib/depends/packages/native_mrustc.mk @@ -7,8 +7,11 @@ $(package)_sha256_hash=d3d3b84a100e71628afecf1125dbaa9bfc54ef9578c4fd81d75dca34c $(package)_dependencies=native_ccache native_python3 $(package)_patches=codegen_c.cpp.patch +define $(package)_set_vars +$(package)_build_env+=PARLEVEL=$(NUM_CORES) +endef + define $(package)_preprocess_cmds - cd $($(package)_extract_dir) && \ patch -p1 < $($(package)_patch_dir)/codegen_c.cpp.patch && \ if [ -f script-overrides/stable-1.54.0-macos/build_std.txt ]; then \ ARCH=`uname -m | sed 's/arm64/aarch64/'` && \ @@ -19,16 +22,13 @@ define $(package)_preprocess_cmds sed -i.bak "s/STD_ENV_ARCH=[a-zA-Z0-9_]*/STD_ENV_ARCH=$$$$ARCH/" script-overrides/stable-1.54.0-linux/build_std.txt; \ fi && \ sed -i.bak 's/^make$$$$/make $$$$@/' build-1.54.0.sh &&\ - if [ `uname -s` = "Darwin" ]; then \ - sed -i '' 's/^[[:space:]]*RUSTC_TARGET ?= x86_64-apple-darwin/RUSTC_TARGET ?= aarch64-apple-darwin/' run_rustc/Makefile; \ - fi && \ + sed -i.bak 's/^[[:space:]]*RUSTC_TARGET ?= x86_64-apple-darwin/RUSTC_TARGET ?= aarch64-apple-darwin/' run_rustc/Makefile && \ echo >> build-1.54.0.sh && \ echo make -C run_rustc >> build-1.54.0.sh endef define $(package)_build_cmds - cd $($(package)_extract_dir) && \ - $($(package)_build_env) PARLEVEL=$(shell nproc) ./build-1.54.0.sh -j$(shell nproc) + $($(package)_build_env) ./build-1.54.0.sh -j$(NUM_CORES) endef # FIXME bad dylib paths embedded in the rustc binary, forcing install_name_tool dark magic |
