Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some conf packages #27381

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions packages/conf-lld/conf-lld.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
opam-version: "2.0"
maintainer: "Léo Andrès <[email protected]>"
authors: "The LLVM team"
homepage: "http://llvm.org"
bug-reports: "https://llvm.org/bugs/"
license: "MIT"
build: [
["wasm-ld" "-version"] { os-distribution != "homebrew" }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to properly test this in homebrew.

Basically, the executable is installed but not in the PATH. One need to do something like export PATH="$(brew --prefix llvm@15)/bin/:$PATH" but then, it'll only contains lld which is a generic driver. One should rather invoke wasm-ld but I have no idea where it is located and how to find it.

I would say it's good enough in the current state and can be improved later?

]
depends: [
]
depexts: [
["lld"] { os-family = "alpine" }
["lld"] { os-family = "arch" }
["lld"] { os-family = "debian" }
["lld"] { os-family = "opensuse" }
["lld"] { os-family = "suse" }
["lld"] { os-family = "ubuntu" }

["lld"] { os-distribution = "centos" }
["lld"] { os-distribution = "fedora" }
["llvm"] { os-distribution = "homebrew" }
]
x-ci-accept-failures: [
"ubuntu-20.04" # does not have wasm-ld
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it still has older stuff from lld

]
available: os-distribution != "freebsd"
synopsis: "Virtual package relying on lld installation"
flags: conf
27 changes: 27 additions & 0 deletions packages/conf-rust-llvm/conf-rust-llvm.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
opam-version: "2.0"
maintainer: "Léo Andrès <[email protected]>"
authors: "Léo Andrès <[email protected]>"
homepage: "https://github.com/ocaml/opam-repository"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
license: "MIT"
build: [
["which" "rust-lld"] { os-distribution != "homebrew" }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, it's a pain to test on homebrew... but I believe it's good enough as is.

]
depends: [
"conf-which" {build}
"conf-rust"
"conf-llvm"
"conf-lld"
]
depexts: [
["rust-llvm"] { os-family = "alpine" }
["rust-llvm"] { os-family = "arch" }
["rust-llvm"] { os-family = "debian" }
["rust-llvm"] { os-family = "ubuntu" }
["rust-llvm"] { os-family = "opensuse" }
["rust-llvm"] { os-family = "suse" }
["rust-llvm"] { os-distribution = "centos" }
]
available: os-distribution != "freebsd" & os-distribution != "fedora"
synopsis: "Virtual package relying on an installation of the integration of Rust with LLVM tools"
flags: conf
24 changes: 24 additions & 0 deletions packages/conf-rust-wasm/conf-rust-wasm.1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
opam-version: "2.0"
maintainer: "Léo Andrès <[email protected]>"
authors: "Léo Andrès <[email protected]>"
homepage: "https://github.com/ocaml/opam-repository"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
license: "MIT"
build: [
["sh" "-c" "rustc --print target-list | grep -q 'wasm32-unknown-unknown'" ]
]
depends: [
"conf-rust" {build}
]
depexts: [
["rust-wasm"] { os-family = "alpine" }
["rust-wasm"] { os-family = "arch" }
["libstd-rust-dev-wasm32"] { os-family = "debian" }
["libstd-rust-dev-wasm32"] { os-family = "ubuntu" }

["libstd-rust-dev-wasm32"] { os-distribution = "centos" }
["rust-std-static-wasm32-unknown-unknown"] { os-distribution = "fedora" }
]
available: os-family != "opensuse" & os-family != "suse" & os-distribution != "homebrew"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not find how to have it on macOS, it seems weird but maybe it's just really lacking behind...

synopsis: "Virtual package relying on an installation of standard Rust libraries including development files, needed to cross-compile Rust programs to the wasm32-unknown-unknown and wasm32-wasip1/wasm32-wasip2 targets"
flags: conf
Loading