-
Notifications
You must be signed in to change notification settings - Fork 589
/
windows_do
executable file
·34 lines (27 loc) · 953 Bytes
/
windows_do
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# OSX
# brew install mingw-w64
build() {
ARCH=$1
# libuv
export CC="$ARCH-w64-mingw32-gcc"
if ! command -v "$CC" > /dev/null; then
echo "Skipping build for $ARCH because $CC is not installed"
return
fi
if ! [ -d "$(rustc --target "$ARCH-pc-windows-gnu" --print target-libdir)" ]; then
echo "Skipping build for $ARCH because rust target $ARCH-pc-windows-gnu is not installed"
echo "You can install it with rustup using: \`rustup target add $ARCH-pc-windows-gnu\`"
return
fi
# Used by cjdns libuv build
export AR="$ARCH-w64-mingw32-ar"
export RANLIB="$ARCH-w64-mingw32-gcc-ranlib"
export TARGET="$ARCH-w64-mingw32"
# Used by cjdns nodejs build
export CROSS=1
export SYSTEM=win32
cargo build --release -vv --target="$ARCH-pc-windows-gnu"
}
# build i686 - impossible because rust: https://github.com/rust-lang/rust/issues/12859
build x86_64