From owner-svn-ports-all@freebsd.org Sun Feb 16 15:22:07 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B35E1238C26; Sun, 16 Feb 2020 15:22:07 +0000 (UTC) (envelope-from mikael@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48L9p74QDMz3Lbx; Sun, 16 Feb 2020 15:22:07 +0000 (UTC) (envelope-from mikael@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92DE627BFE; Sun, 16 Feb 2020 15:22:07 +0000 (UTC) (envelope-from mikael@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01GFM74w008216; Sun, 16 Feb 2020 15:22:07 GMT (envelope-from mikael@FreeBSD.org) Received: (from mikael@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01GFM7Pp008215; Sun, 16 Feb 2020 15:22:07 GMT (envelope-from mikael@FreeBSD.org) Message-Id: <202002161522.01GFM7Pp008215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mikael set sender to mikael@FreeBSD.org using -f From: Mikael Urankar Date: Sun, 16 Feb 2020 15:22:07 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r526265 - head/lang/rust X-SVN-Group: ports-head X-SVN-Commit-Author: mikael X-SVN-Commit-Paths: head/lang/rust X-SVN-Commit-Revision: 526265 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Feb 2020 15:22:07 -0000 Author: mikael Date: Sun Feb 16 15:22:07 2020 New Revision: 526265 URL: https://svnweb.freebsd.org/changeset/ports/526265 Log: lang/rust: add the WASM option Add the WASM (WebAssembly) option to build the wasm32-unknown-unknown target, off by default. Reviewed by: tobik Approved by: tobik, manu (mentor) Differential Revision: https://reviews.freebsd.org/D23653 Modified: head/lang/rust/Makefile Modified: head/lang/rust/Makefile ============================================================================== --- head/lang/rust/Makefile Sun Feb 16 13:14:17 2020 (r526264) +++ head/lang/rust/Makefile Sun Feb 16 15:22:07 2020 (r526265) @@ -47,13 +47,16 @@ CONFLICTS_INSTALL?= rust-nightly PLIST_FILES= lib/rustlib/components \ lib/rustlib/rust-installer-version -OPTIONS_DEFINE= DOCS GDB SOURCES +OPTIONS_DEFINE= DOCS GDB SOURCES WASM GDB_DESC= Install ports gdb (necessary for debugging rust programs) SOURCES_DESC= Install source files +WASM_DESC= Build the WebAssembly target (wasm32-unknown-unknown) DOCS_VARS_OFF= _RUST_BUILD_DOCS=false DOCS_VARS= _RUST_BUILD_DOCS=true GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb +WASM_VARS_OFF= _RUST_BUILD_WASM=false +WASM_VARS= _RUST_BUILD_WASM=true # See WRKSRC/src/stage0.txt for the date and version values. BOOTSTRAPS_DATE?= 2020-01-11 @@ -148,6 +151,9 @@ do-configure: @${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml +.if ${PORT_OPTIONS:MWASM} + @${ECHO_CMD} 'target=["${_RUST_TARGET}","wasm32-unknown-unknown"]' >> ${WRKSRC}/config.toml +.endif @${ECHO_CMD} '[install]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'prefix="${PREFIX}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'sysconfdir="${PREFIX}/etc"' >> ${WRKSRC}/config.toml @@ -155,6 +161,7 @@ do-configure: @${ECHO_CMD} 'channel="${PKGNAMESUFFIX:Ustable:S/^-//}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'default-linker="${CC}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'verbose-tests=true' >> ${WRKSRC}/config.toml + @${ECHO_CMD} 'lld=${_RUST_BUILD_WASM}' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml .if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE) @${ECHO_CMD} 'ccache="${CCACHE_BIN}"' >> ${WRKSRC}/config.toml