Skip to content

Commit

Permalink
Unpin Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Sep 30, 2022
1 parent 0cb1d97 commit 9b293bc
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 12 deletions.
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ OPTIONS:
--help Show the help and exit
-c, --commit <COMMIT> The commit to build libvips from
-r, --ref <REF> The branch or tag to build libvips from
--tmpdir <DIR> Where intermediate files should be stored (default in /var/tmp/mxe)
--nightly Build libvips from tip-of-tree (alias of -r master)
--with-hevc Build libheif with the HEVC-related dependencies
--with-debug Build binaires with debug symbols
Expand Down Expand Up @@ -51,6 +52,7 @@ EOF
# Default arguments
git_commit=""
git_ref=""
tmpdir="/var/tmp/mxe"
with_hevc=false
with_debug=false
with_llvm=true
Expand All @@ -65,6 +67,7 @@ while [ $# -gt 0 ]; do
-h|--help) usage 0 ;;
-c|--commit) git_commit="$2"; shift ;;
-r|--ref) git_ref="$2"; shift ;;
--tmpdir) tmpdir="$2"; shift ;;
--nightly) git_ref="master" ;;
--with-hevc) with_hevc=true ;;
--with-debug) with_debug=true ;;
Expand Down Expand Up @@ -159,6 +162,9 @@ else
exit 1
fi

# Ensure temporary dir exists
mkdir -p $tmpdir

# Ensure latest Debian stable base image
$oci_runtime pull buildpack-deps:bullseye

Expand All @@ -168,9 +174,11 @@ $oci_runtime build -t libvips-build-win-mxe container
# Run build scripts inside a container with the:
# - current UID and GID inherited
# - build dir mounted at /data
# - temporary dir mounted at /var/tmp
$oci_runtime run --rm -t \
-u $(id -u):$(id -g) \
-v $PWD/build:/data \
-v $tmpdir:/var/tmp:z \
-e "GIT_COMMIT=$git_commit" \
-e "HEVC=$with_hevc" \
-e "DEBUG=$with_debug" \
Expand Down
1 change: 1 addition & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ plugins+=" $work_dir/plugins/proxy-libintl"
# Build pe-util, handy for copying DLL dependencies.
make pe-util \
IGNORE_SETTINGS=yes \
MXE_TMP="/var/tmp" \
MXE_TARGETS=`$mxe_dir/ext/config.guess` \
MXE_USE_CCACHE=

Expand Down
7 changes: 3 additions & 4 deletions build/plugins/llvm-mingw/rust.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ PKG := rust
$(PKG)_WEBSITE := https://www.rust-lang.org/
$(PKG)_DESCR := A systems programming language focused on safety, speed and concurrency.
$(PKG)_IGNORE :=
# Temporarily pin to 2022-09-24 due to https://github.com/rust-lang/rust/pull/98483#issuecomment-1260975364
# https://static.rust-lang.org/dist/2022-09-24/rustc-nightly-src.tar.xz.sha256
# https://static.rust-lang.org/dist/2022-09-30/rustc-nightly-src.tar.xz.sha256
$(PKG)_VERSION := nightly
$(PKG)_CHECKSUM := ccc2c11228b80d6a068846d0b9ee08765a85c8cd67a601d13e743c905b271f52
$(PKG)_CHECKSUM := 5695ee6fa24a04766c3273bcd20f76806e8f2910b0a53817028840fa1ac43131
$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch)))
$(PKG)_SUBDIR := $(PKG)c-$($(PKG)_VERSION)-src
$(PKG)_FILE := $(PKG)c-$($(PKG)_VERSION)-src.tar.xz
$(PKG)_URL := https://static.rust-lang.org/dist/2022-09-24/$($(PKG)_FILE)
$(PKG)_URL := https://static.rust-lang.org/dist/2022-09-30/$($(PKG)_FILE)
$(PKG)_DEPS := $(BUILD)~$(PKG)
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)

Expand Down
9 changes: 7 additions & 2 deletions build/settings/gcc-debug.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# MXE will run as many parallel jobs as there are
# available CPU cores. This variable can limit this.
# MXE will run as many parallel jobs as there are available CPU
# cores. This variable can limit this.
#JOBS := 4

# MXE stores intermediate files in the current directory by
# default. Store them in /var/tmp instead to ensure git commands
# are no-op.
MXE_TMP := /var/tmp

# Turn on debugging
export CFLAGS := -g -Og -fPIC
export CXXFLAGS := -g -Og -fPIC
Expand Down
9 changes: 7 additions & 2 deletions build/settings/gcc-release.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# MXE will run as many parallel jobs as there are
# available CPU cores. This variable can limit this.
# MXE will run as many parallel jobs as there are available CPU
# cores. This variable can limit this.
#JOBS := 4

# MXE stores intermediate files in the current directory by
# default. Store them in /var/tmp instead to ensure git commands
# are no-op.
MXE_TMP := /var/tmp

# Special flags for compiler.
export CFLAGS := -s -O3 -fPIC
export CXXFLAGS := -s -O3 -fPIC
Expand Down
9 changes: 7 additions & 2 deletions build/settings/llvm-debug.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# MXE will run as many parallel jobs as there are
# available CPU cores. This variable can limit this.
# MXE will run as many parallel jobs as there are available CPU
# cores. This variable can limit this.
#JOBS := 4

# MXE stores intermediate files in the current directory by
# default. Store them in /var/tmp instead to ensure git commands
# are no-op.
MXE_TMP := /var/tmp

# Turn on debugging
export CFLAGS := -g -Og -fdata-sections -ffunction-sections
export CXXFLAGS := -g -Og -fdata-sections -ffunction-sections
Expand Down
9 changes: 7 additions & 2 deletions build/settings/llvm-release.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# MXE will run as many parallel jobs as there are
# available CPU cores. This variable can limit this.
# MXE will run as many parallel jobs as there are available CPU
# cores. This variable can limit this.
#JOBS := 4

# MXE stores intermediate files in the current directory by
# default. Store them in /var/tmp instead to ensure git commands
# are no-op.
MXE_TMP := /var/tmp

# Special flags for compiler.
export CFLAGS := -O3 -fdata-sections -ffunction-sections
export CXXFLAGS := -O3 -fdata-sections -ffunction-sections
Expand Down

0 comments on commit 9b293bc

Please sign in to comment.