Add Windows support and clean up toolchain #10
							
								
								
									
										29
									
								
								build.sh
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								build.sh
									
									
									
									
									
								
							| @@ -372,14 +372,35 @@ xtchain_build() | ||||
|     cp ${WRKDIR}/scripts/xtchain${EXTENSION} ${BINDIR}/ | ||||
| } | ||||
|  | ||||
| # This function generates XTCHAIN version file | ||||
| xtchain_vergen() | ||||
| # This function generates XTCHAIN version file and produces tarball archive | ||||
| xtchain_tarball() | ||||
| { | ||||
|     local EXTENSION="" | ||||
|  | ||||
|     # Additional, target-specific configuration options | ||||
|     case "${SYSTEM_NAME}" in | ||||
|         Windows) | ||||
|             EXTENSION=".exe" | ||||
|             ;; | ||||
|     esac | ||||
|  | ||||
|     # Remove unneeded files to save disk space | ||||
|     echo ">>> Removing unneeded files to save disk space ..." | ||||
|     rm -rf ${BINDIR}/{doc,include,share/{bash-completion,emacs,info,locale,man,vim}} | ||||
|     for EXEC in amdgpu-arch clang-check clang-exdef-mapping clang-import-test clang-offload-* clang-rename clang-scan-deps diagtool hmaptool ld64.lld modularize nxptx-arch wasm-ld; do | ||||
|         rm -f ${BINDIR}/bin/${EXEC}${EXTENSION} | ||||
|     done | ||||
|  | ||||
|     # Generate version file | ||||
|     cd ${WRKDIR} | ||||
|     : ${XTCVER:=$(git describe --exact-match --tags 2>/dev/null)} | ||||
|     : ${XTCVER:=DEVEL} | ||||
|     [ ${BUILD_MINIMAL} -eq 1 ] && XTCVER="${XTCVER}-min" | ||||
|     echo "${XTCVER}" > ${BINDIR}/Version | ||||
|  | ||||
|     # Build tarball | ||||
|     echo ">>> Creating toolchain archive ..." | ||||
|     tar -I 'zstd -19' -cpf xtchain-${XTCVER}-${TARGET_SYSTEM}.tar.zst -C ${BINDIR} . | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -457,5 +478,5 @@ if [ ${BUILD_MINIMAL} -eq 0 ]; then | ||||
|     #ninja_build | ||||
| fi | ||||
|  | ||||
| # Generate XTchain version file | ||||
| #xtchain_vergen | ||||
| # Generate tarball archive | ||||
| #xtchain_tarball | ||||
|   | ||||
		Referens i nytt ärende
	
	Block a user