Skip to content

Commit afb1f0d

Browse files
authored
Merge pull request #24358 from OlivierNicole/tsan_backport_5.1_switch
Add a TSan backport switch on top of 5.1.0~rc3
2 parents 1133515 + 98f7a5a commit afb1f0d

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
share_root: ["config.cache" {"ocaml/config.cache"}]
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
opam-version: "2.0"
2+
license: "LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
3+
synopsis: "OCaml 5.1.0 release candidate 3, with ThreadSanitizer support"
4+
maintainer: "[email protected]"
5+
authors: ["Xavier Leroy" "Damien Doligez" "Alain Frisch" "Jacques Garrigue" "Didier Rémy" "Jérôme Vouillon"]
6+
homepage: "https://github.com/ocaml/ocaml"
7+
bug-reports: "https://github.com/ocaml/ocaml"
8+
dev-repo: "git+https://github.com/ocaml-multicore/ocaml-tsan.git#5.1.0-rc3+tsan"
9+
depends: [
10+
"ocaml" {= "5.1.0" & post}
11+
"base-unix" {post}
12+
"base-bigarray" {post}
13+
"base-threads" {post}
14+
"base-domains" {post}
15+
"base-nnp" {post}
16+
"ocaml-beta" {opam-version < "2.1.0"}
17+
"conf-unwind"
18+
]
19+
conflict-class: "ocaml-core-compiler"
20+
flags: [ compiler avoid-version ]
21+
setenv: CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"
22+
build-env: [
23+
[LSAN_OPTIONS = "detect_leaks=0,exitcode=0"]
24+
[ASAN_OPTIONS = "detect_leaks=0,exitcode=0"]
25+
]
26+
build: [
27+
[
28+
"./configure"
29+
"--prefix=%{prefix}%"
30+
"--docdir=%{doc}%/ocaml"
31+
"-C"
32+
"--disable-flat-float-array" {ocaml-option-no-flat-float-array:installed}
33+
"--enable-flambda" {ocaml-option-flambda:installed}
34+
"--enable-frame-pointers" {ocaml-option-fp:installed}
35+
"CC=cc" {!ocaml-option-32bit:installed & !ocaml-option-musl:installed & (os="openbsd"|os="macos")}
36+
"CC=musl-gcc" {ocaml-option-musl:installed & os-distribution!="alpine"}
37+
"CFLAGS=-Os" {ocaml-option-musl:installed}
38+
"--enable-tsan"
39+
"ASPP=musl-gcc -c" {ocaml-option-musl:installed & os-distribution!="alpine"}
40+
"LIBS=-static" {ocaml-option-static:installed}
41+
"--disable-warn-error"
42+
]
43+
[make "-j%{jobs}%"]
44+
]
45+
install: [make "install"]
46+
url {
47+
src: "https://github.com/ocaml-multicore/ocaml-tsan/archive/5.1.0-rc3+tsan.tar.gz"
48+
checksum: "sha256=d5b80d65ace8912f060b14d552b06ea1df9ef28f0cd0e70a951bb5398fb0d491"
49+
}
50+
extra-files: ["ocaml-variants.install" "md5=3e969b841df1f51ca448e6e6295cb451"]
51+
post-messages: [
52+
"A failure in the middle of the build may be caused by build parallelism
53+
(enabled by default).
54+
Please file a bug report at https://github.com/ocaml/opam-repository/issues"
55+
{failure & jobs > 1}
56+
"You can try installing again including --jobs=1
57+
to force a sequential build instead."
58+
{failure & jobs > 1 & opam-version >= "2.0.5"}
59+
]
60+
conflicts: [
61+
"ocaml-option-afl"
62+
"ocaml-option-bytecode-only"
63+
"ocaml-option-32bit"
64+
"ocaml-option-leak-sanitizer"
65+
"ocaml-option-address-sanitizer"
66+
]
67+
depopts: [
68+
"ocaml-option-32bit"
69+
"ocaml-option-afl"
70+
"ocaml-option-bytecode-only"
71+
"ocaml-option-no-flat-float-array"
72+
"ocaml-option-flambda"
73+
"ocaml-option-musl"
74+
"ocaml-option-leak-sanitizer"
75+
"ocaml-option-address-sanitizer"
76+
"ocaml-option-static"
77+
]

0 commit comments

Comments
 (0)