mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-05 11:49:31 +00:00
a2ddfb0ee9
llvm latest svn commit is broken as of 2019/01/12. This patch pins the llvm+lld versions used for arm compiles. It also tweaks the architecture detection to be more reliable in multi-lib/multi-arch situations where the CPU is 64bit but the runtime is 32bit.
27 lines
713 B
Bash
27 lines
713 B
Bash
#!/bin/bash
|
|
|
|
ARCH=$(python <<EOF
|
|
from __future__ import print_function
|
|
import platform
|
|
processor = platform.machine()
|
|
architecture = platform.architecture()
|
|
if processor == 'aarch64':
|
|
# Mutli arch arm support is why this 32bit check is present
|
|
if '32bit' in architecture:
|
|
print('armv71', end='')
|
|
else:
|
|
print('aarch64', end='')
|
|
elif processor == 'x86 64' or processor == 'x86_64':
|
|
print('amd64', end='')
|
|
elif processor == 'armv7l':
|
|
print('armhf', end='')
|
|
EOF
|
|
)
|
|
|
|
if [ $ARCH == "aarch64" -o $ARCH == "armv71" ] ; then
|
|
export PATH=/opt/local/llvm/bin:${PATH}
|
|
cd /app
|
|
RUSTFLAGS="-C linker=lld" cargo web deploy -p plume-front
|
|
else
|
|
cargo web deploy -p plume-front
|
|
fi
|