Summary: | textproc/ripgrep: expose SIMD options | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Jan Beich <jbeich> | ||||||
Component: | Individual Port(s) | Assignee: | Jan Beich <jbeich> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | jcfyecrayz, petteri.valkonen, tobik | ||||||
Priority: | --- | Keywords: | patch, patch-ready | ||||||
Version: | Latest | Flags: | petteri.valkonen:
maintainer-feedback+
|
||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Bug Depends on: | 223342 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Jan Beich
2017-10-29 22:40:07 UTC
Rust codegen can also be forced to emit SIMD optimizations e.g., # /etc/make.conf CPUTYPE ?= native RUSTFLAGS += -C target-cpu=${CPUTYPE} .export RUSTFLAGS # for www/firefox but this is outside of scope. (In reply to Jan Beich from comment #0) Why is PORT_LLVM=off required? (In reply to John Hein from comment #2) cfg_target_feature is broken if rust 1.21+ is built with any other LLVM version than bundled (see bug 223300) but simd crate relies on it. (In reply to John Hein from comment #2) I think maybe I see why rust needs its own bundled llvm version... something like this patch depends on a rust llvm target-features extension crate that is not part of the devel/llvmXY port? Is this something that could be added to the llvm port, or is it really something rust-specific that makes no sense to add to the llvm port? (In reply to Jan Beich from comment #3) Thanks - understood. I left comment 4 before seeing this, but is this target-feature extension not something that could/should be added to the llvm port? (In reply to John Hein from comment #5) That's up to maintainers (see bug 223342). cfg_target_feature isn't stable yet. It's not even clear whether Rust stabilization implies relying on stable APIs. SIMD=on here relies on RUSTC_BOOTSTRAP=1 hack to unlock unstable features. packages-only users, i386 users, aarch64 users and 12.0-CURRENT users currently don't have a usable rust-nightly. (In reply to Jan Beich from comment #0) > On i386 this implies SSE2 except i686-unknown-freebsd target already forces it, anyway. Per https://github.com/rust-lang/rust/blob/1.21.0/src/librustc_back/target/i686_unknown_freebsd.rs#L16 (In reply to Jan Beich from comment #0) I'm afraid I'm not familiar enough with Rust's internals to offer any meaningful feedback on this patch. It seems you and John have a good discussion going, though. However, what I can comment on is that I'd like to see the RUSTC_BOOTSTRAP=1 hack be better documented in the Makefile itself (i.e. why is it needed?), and not just be mentioned in passing in the PR. Created attachment 187662 [details] v1.1 (In reply to petteri.valkonen from comment #8) > I'm afraid I'm not familiar enough with Rust's internals to offer > any meaningful feedback on this patch. Neither me. I don't use Rust outside of firefox or ripgrep. Are you going to approve or not? The patch here can land before bug 223342. > It seems you and John have a good discussion going, though. The ports framework currently doesn't support depending on specific options in dependencies, so individual ports work around by managing defaults or using slaves. For one, databases/sqlite3 has a number of options changing which will break consumers. textproc/ripgrep depends on PORT_LLVM=off in lang/rust which is already default, so this is mostly FYI. Besides, PORT_LLVM maybe dropped if it proves to be hard to maintain such as more Rust features start to depend on APIs specific to bundled LLVM. > I'd like to see the RUSTC_BOOTSTRAP=1 hack be better documented in > the Makefile itself (i.e. why is it needed?), and not just be > mentioned in passing in the PR. "# cheat Nightly requirement" wasn't good enough? OK, I've made it more verbose. Comment on attachment 187662 [details]
v1.1
LGTM.
A commit references this bug: Author: jbeich Date: Thu Nov 2 21:48:21 UTC 2017 New revision: 453382 URL: https://svnweb.freebsd.org/changeset/ports/453382 Log: textproc/ripgrep: expose SIMD options PR: 223314 Approved by: Petteri Valkonen (maintainer) Changes: head/textproc/ripgrep/Makefile A commit references this bug: Author: tobik Date: Sat Nov 11 19:01:56 UTC 2017 New revision: 453990 URL: https://svnweb.freebsd.org/changeset/ports/453990 Log: textproc/ripgrep: Restore BASH, FISH, ZSH options They were broken by r453382 which introduced new AVX, SIMD options which overwrote the old ones. PR: 223478, 223314 Submitted by: petteri.valkonen@iki.fi (maintainer) Changes: head/textproc/ripgrep/Makefile |