Skip to content
Merged
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
28 changes: 28 additions & 0 deletions packages/compiler-cloning/compiler-cloning.disabled/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
opam-version: "2.0"
synopsis: "Relocatable OCaml"
description: """
This virtual package controls whether Relocatable OCaml is used for supported
OCaml compilers in opam switches.

When the "enabled" version is installed, compatible OCaml compilers will clone
their artefacts from existing switches when available, greatly increasing switch
creation speed.

Explicitly installing the "disabled" version causes the compiler to be built
from sources, even if the required compiler exists in another switch.

This virtual package is used to specify switch and package requirements for
Relocatable packages. A package is Relocatable if its binaries may be copied to
another switch, rather than rebuilding the package for that different switch.

A package which is not Relocatable should include "relocatable" in its conflicts
field.

A switch which should consist only of relocatable packages should include the
"relocatable" package in its switch invariant."""
maintainer: "David Allsopp <dra27@dra27.uk>"
authors: "David Allsopp"
license: "CC0-1.0+"
homepage: "https://opam.ocaml.org"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
flags: avoid-version
Copy link
Contributor

Choose a reason for hiding this comment

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

that's to make enabled the default, right?

Copy link
Member

Choose a reason for hiding this comment

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

That’s right, yes

Copy link
Member

Choose a reason for hiding this comment

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

enabled would normally be default anyway (since enabled > disabled) but the flag means it’s also selected if doing lowerbounds solving

27 changes: 27 additions & 0 deletions packages/compiler-cloning/compiler-cloning.enabled/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
opam-version: "2.0"
synopsis: "Relocatable OCaml"
description: """
This virtual package controls whether Relocatable OCaml is used for supported
OCaml compilers in opam switches.

When the "enabled" version is installed, compatible OCaml compilers will clone
their artefacts from existing switches when available, greatly increasing switch
creation speed.

Explicitly installing the "disabled" version causes the compiler to be built
from sources, even if the required compiler exists in another switch.

This virtual package is used to specify switch and package requirements for
Relocatable packages. A package is Relocatable if its binaries may be copied to
another switch, rather than rebuilding the package for that different switch.

A package which is not Relocatable should include "relocatable" in its conflicts
field.

A switch which should consist only of relocatable packages should include the
"relocatable" package in its switch invariant."""
maintainer: "David Allsopp <dra27@dra27.uk>"
authors: "David Allsopp"
license: "CC0-1.0+"
homepage: "https://opam.ocaml.org"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
29 changes: 29 additions & 0 deletions packages/ocaml-base-compiler/ocaml-base-compiler.5.5.0~alpha1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
opam-version: "2.0"
synopsis: "First alpha release of OCaml 5.5.0"
maintainer: [
"David Allsopp <dra27@dra27.uk>"
"Florian Angeletti <florian.angeletti@inria.fr>"
]
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
authors: [
"Xavier Leroy"
"Damien Doligez"
"Alain Frisch"
"Jacques Garrigue"
"Didier Rémy"
"KC Sivaramakrishnan"
"Jérôme Vouillon"
]
homepage: "https://ocaml.org"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
dev-repo: "git+https://github.com/ocaml/ocaml.git#5.5"
depends: [
"ocaml-compiler" {= "5.5.0~alpha1"}

"ocaml-beta" {opam-version < "2.1.0"}

# OCaml with default configuration (no flambda, TSAN, etc.)
"ocaml-options-vanilla" {post}
]
conflict-class: "ocaml-core-compiler"
flags: [ compiler avoid-version ]
123 changes: 123 additions & 0 deletions packages/ocaml-compiler/ocaml-compiler.5.5.0~alpha1/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
opam-version: "2.0"
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
synopsis: "First alpha release of OCaml 5.5.0"
maintainer: [
"David Allsopp <dra27@dra27.uk>"
"Florian Angeletti <florian.angeletti@inria.fr>"
]
authors: [
"Xavier Leroy"
"Damien Doligez"
"Alain Frisch"
"Jacques Garrigue"
"Didier Rémy"
"KC Sivaramakrishnan"
"Jérôme Vouillon"
]
homepage: "https://ocaml.org"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
dev-repo: "git+https://github.com/ocaml/ocaml.git#5.5"
depends: [
# This is OCaml 5.5.0
"ocaml" {= "5.5.0" & post}
"compiler-cloning" {build}

# General base- packages
"base-unix" {post}
"base-bigarray" {post}
"base-threads" {post}
"base-domains" {post}
"base-nnp" {post}
"base-effects" {post}

"ocaml-beta" {opam-version < "2.1.0"}

# Port selection (Windows)
# amd64 mingw-w64 / MSVC
(("arch-x86_64" {os = "win32" & arch = "x86_64"} &
(("system-mingw" & "mingw-w64-shims" {os-distribution = "cygwin" & build}) |
("system-msvc" & "ocaml-option-no-compression" {os = "win32"}))) |
# i686 mingw-w64 / MSVC
("arch-x86_32" {os = "win32"} & "ocaml-option-bytecode-only" {os = "win32"} &
(("system-mingw" & "mingw-w64-shims" {os-distribution = "cygwin" & build}) |
("system-msvc" & "ocaml-option-no-compression" {os = "win32"}))) |
# Non-Windows systems need to install something to satisfy this formula, so
# repeat the base-unix dependency
"base-unix" {os != "win32" & post})

# All the 32-bit architectures are bytecode-only
"ocaml-option-bytecode-only" {arch != "arm64" & arch != "x86_64" & arch != "s390x" & arch != "riscv64" & arch != "ppc64"}

# Support Packages
"flexdll" {>= "0.44" & os = "win32"}
]
flags: [ avoid-version ]
build-env: [
[MSYS2_ARG_CONV_EXCL = "*"]
[LSAN_OPTIONS = "detect_leaks=0,exitcode=0"]
[ASAN_OPTIONS = "detect_leaks=0,exitcode=0"]
]
build: [
[
"sh" "tools/opam/process.sh" make "-j%{jobs}%" _:build-id _:name compiler-cloning:version
"--host=x86_64-pc-windows" {system-msvc:installed & arch-x86_64:installed}
"--host=x86_64-w64-mingw32" {os-distribution = "cygwin" & system-mingw:installed & arch-x86_64:installed}
"--host=i686-pc-windows" {system-msvc:installed & arch-x86_32:installed}
"--host=i686-w64-mingw32" {os-distribution = "cygwin" & system-mingw:installed & arch-x86_32:installed}
"--prefix=%{prefix}%"
"--docdir=%{doc}%/ocaml"
"--with-additional-stublibsdir"
"--with-relative-libdir"
"--enable-runtime-search"
"--enable-runtime-search-target=fallback"
"--with-flexdll=%{flexdll:share}%" {os = "win32" & flexdll:installed}
"--with-afl" {ocaml-option-afl:installed}
"--disable-native-compiler" {ocaml-option-bytecode-only:installed}
"--disable-flat-float-array" {ocaml-option-no-flat-float-array:installed}
"--enable-flambda" {ocaml-option-flambda:installed}
"--enable-frame-pointers" {ocaml-option-fp:installed}
"--without-zstd" {ocaml-option-no-compression:installed}
"--enable-tsan" {ocaml-option-tsan:installed}
"CC=cc" {!ocaml-option-32bit:installed & !ocaml-option-musl:installed & (os = "openbsd" | os = "macos")}
"CC=clang" {ocaml-option-tsan:installed & (os="macos")}
"CC=musl-gcc" {ocaml-option-musl:installed & os-distribution!="alpine"}
"CFLAGS=-Os" {ocaml-option-musl:installed & arch != "arm64"}
"CFLAGS=-Os -mno-outline-atomics" {ocaml-option-musl:installed & arch = "arm64"}
"LDFLAGS=-Wl,--no-as-needed,-ldl" {ocaml-option-leak-sanitizer:installed | (ocaml-option-address-sanitizer:installed & os!="macos")}
"CC=gcc -ldl -fsanitize=leak -fno-omit-frame-pointer -O1 -g" {ocaml-option-leak-sanitizer:installed}
"CC=gcc -ldl -fsanitize=address -fno-omit-frame-pointer -O1 -g" {ocaml-option-address-sanitizer:installed & os!="macos"}
"CC=clang -fsanitize=address -fno-omit-frame-pointer -O1 -g" {ocaml-option-address-sanitizer:installed & os="macos"}
"CC=gcc -m32" {ocaml-option-32bit:installed & os="linux"}
"CC=gcc -Wl,-read_only_relocs,suppress -arch i386 -m32" {ocaml-option-32bit:installed & os="macos"}
"ASPP=musl-gcc -c" {ocaml-option-musl:installed & os-distribution!="alpine"}
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
"LIBS=-static" {ocaml-option-static:installed}
"--disable-warn-error"
]
]
install: ["sh" "tools/opam/process.sh" make "install" _:build-id _:name prefix]
url {
src: "https://github.com/ocaml/ocaml/archive/5.5.0-alpha1.tar.gz"
checksum: "sha256=9b78c8734c4e1c2efa852326e0dce8b24f8c8d0fbd01645b6165c9a9b15898df"
}
depopts: [
"ocaml-option-32bit"
"ocaml-option-afl"
"ocaml-option-bytecode-only"
"ocaml-option-no-flat-float-array"
"ocaml-option-flambda"
"ocaml-option-fp"
"ocaml-option-no-compression"
"ocaml-option-musl"
"ocaml-option-leak-sanitizer"
"ocaml-option-address-sanitizer"
"ocaml-option-static"
"ocaml-option-tsan"
]
post-messages: [
"This switch had to be compiled from sources, but future switches with the 🐌
same compiler version and configuration should assemble instantly." {!failure & !_:cloned & compiler-cloning:version != "disabled"}
"As requested, this switch was compiled from sources 😴" {!failure & compiler-cloning:version = "disabled"}
"Switch cloned by %{_:clone-mechanism}% from %{_:clone-source}% 💨" {!failure & _:cloned}
]
1 change: 1 addition & 0 deletions packages/ocaml-compiler/ocaml-compiler.5.5/opam
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dev-repo: "git+https://github.com/ocaml/ocaml.git#5.5"
depends: [
# This is OCaml 5.5.0
"ocaml" {= "5.5.0" & post}
"compiler-cloning" {= "disabled"}
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the reason for this?

not blocking, just want to know for understanding this and future PRs

Copy link
Member

Choose a reason for hiding this comment

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

The trunk compiler doesn’t support being relocated because it’s pinned (the build-id rules it out as there’s no checksum in the url), and this just makes it explicit.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah right 5.5 is for the 5.5 branch…

thanks


# General base- packages
"base-unix" {post}
Expand Down
26 changes: 26 additions & 0 deletions packages/ocaml-variants/ocaml-variants.5.5.0~alpha1+options/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
opam-version: "2.0"
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
synopsis: "First alpha release of OCaml 5.5.0"
maintainer: [
"David Allsopp <dra27@dra27.uk>"
"Florian Angeletti <florian.angeletti@inria.fr>"
]
authors: [
"Xavier Leroy"
"Damien Doligez"
"Alain Frisch"
"Jacques Garrigue"
"Didier Rémy"
"KC Sivaramakrishnan"
"Jérôme Vouillon"
]
homepage: "https://ocaml.org"
bug-reports: "https://github.com/ocaml/opam-repository/issues"
dev-repo: "git+https://github.com/ocaml/ocaml.git#5.4"
depends: [
"ocaml-compiler" {= "5.5.0~alpha1"}

"ocaml-beta" {opam-version < "2.1.0"}
]
conflict-class: "ocaml-core-compiler"
flags: [ compiler avoid-version ]
3 changes: 1 addition & 2 deletions packages/ocaml/ocaml.5.5.0/opam
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ synopsis: "The OCaml compiler (virtual package)"
description: """
This package requires a matching implementation of OCaml,
and polls it to initialise specific variables like `ocaml:native-dynlink`"""
maintainer: "David Allsopp <david@tarides.com>"
maintainer: "David Allsopp <dra27@dra27.uk>"
authors: [
"Xavier Leroy"
"Damien Doligez"
Expand All @@ -22,7 +22,6 @@ depends: [
"ocaml-system" {>= "5.5.0~" & < "5.5.1~"} |
"dkml-base-compiler" {>= "5.5.0~" & < "5.5.1~"}
]
flags: avoid-version
setenv: [
[OCAMLTOP_INCLUDE_PATH += "%{toplevel}%"]
# Legacy opam variable
Expand Down