Add Windows support and clean up toolchain #10
							
								
								
									
										17
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								build.sh
									
									
									
									
									
								
							| @@ -376,6 +376,7 @@ xtchain_build() | ||||
| xtchain_tarball() | ||||
| { | ||||
|     local EXTENSION="" | ||||
|     local LIBDIR="" | ||||
|  | ||||
|     # Additional, target-specific configuration options | ||||
|     case "${SYSTEM_NAME}" in | ||||
| @@ -398,6 +399,22 @@ xtchain_tarball() | ||||
|     [ ${BUILD_MINIMAL} -eq 1 ] && XTCVER="${XTCVER}-min" | ||||
|     echo "${XTCVER}" > ${BINDIR}/Version | ||||
|  | ||||
|     # Windows target specific actions | ||||
|     if [ "${SYSTEM_NAME}" == "Windows" ]; then | ||||
|         # Replace symlinks with original files | ||||
|         for LINK in $(find ${BINDIR}/bin -maxdepth 1 -type l); do | ||||
|             cp -f --remove-destination $(readlink -e ${LINK}) ${LINK} | ||||
|         done | ||||
|  | ||||
|         # Copy dynamic libraries | ||||
|         if [ ${BUILD_MINIMAL} -eq 0 ]; then | ||||
|             LIBDIR="$(dirname $(readlink -f $(command -v ${SYSTEM_HOST}-windres)))/../${SYSTEM_HOST}" | ||||
|             for DLL in $(${SYSTEM_HOST}-objdump --private-headers ${BINDIR}/bin/cmake.exe | grep "DLL Name:" | cut -d' ' -f3 | grep "lib.*.dll"); do | ||||
|                 find ${LIBDIR} -type f -name ${DLL} -exec cp {} ${BINDIR}/bin \; | ||||
|             done | ||||
|         fi | ||||
|     fi | ||||
|  | ||||
|     # Build tarball | ||||
|     echo ">>> Creating toolchain archive ..." | ||||
|     tar -I 'zstd -19' -cpf xtchain-${XTCVER}-${TARGET_SYSTEM}.tar.zst -C ${BINDIR} . | ||||
|   | ||||
		Referens i nytt ärende
	
	Block a user