Browse Source

Optimize the building process a bit and facilitate adding new tools.

llvm_toolchain
Rafal Kupiec 1 year ago
parent
commit
17fb057dce
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
  1. 14
      build-linux.sh

14
build-linux.sh

@ -560,21 +560,21 @@ xtchain_build()
mkdir -p ${BINDIR}/lib/xtchain
mkdir -p ${BINDIR}/${GENERIC}/bin
cp ${WRKDIR}/scripts/*-wrapper ${BINDIR}/${GENERIC}/bin
gcc ${WRKDIR}/tools/windres.c -o ${BINDIR}/bin/windres
gcc ${WRKDIR}/tools/xtcspecc.c -o ${BINDIR}/bin/xtcspecc
cd ${BINDIR}/bin
for ARCH in ${ARCHS}; do
for EXEC in c++ c11 c99 cc clang clang++ g++ gcc; do
ln -sf ../${GENERIC}/bin/clang-target-wrapper ${ARCH}-w64-mingw32-${EXEC}
ln -sf ../${GENERIC}/bin/clang-target-wrapper ${BINDIR}/bin/${ARCH}-w64-mingw32-${EXEC}
done
for EXEC in addr2line ar as nm objcopy pdbutil ranlib rc strings strip; do
ln -sf llvm-${EXEC} ${ARCH}-w64-mingw32-${EXEC}
ln -sf llvm-${EXEC} ${BINDIR}/bin/${ARCH}-w64-mingw32-${EXEC}
done
for EXEC in dlltool ld objdump; do
ln -sf ../${GENERIC}/bin/${EXEC}-wrapper ${ARCH}-w64-mingw32-${EXEC}
ln -sf ../${GENERIC}/bin/${EXEC}-wrapper ${BINDIR}/bin/${ARCH}-w64-mingw32-${EXEC}
done
for EXEC in windres xtcspecc; do
ln -sf ${EXEC} ${ARCH}-w64-mingw32-${EXEC}
if [ ! -e ${BINDIR}/bin/${EXEC} ]; then
gcc ${WRKDIR}/tools/${EXEC}.c -o ${BINDIR}/bin/${EXEC}
fi
ln -sf ${EXEC} ${BINDIR}/bin/${ARCH}-w64-mingw32-${EXEC}
done
done
cp ${WRKDIR}/scripts/xtclib ${BINDIR}/lib/xtchain/

Loading…
Cancel
Save