Skip to content

Commit 16aab4e

Browse files
Merge pull request #1074 from ocsigen/fix-32bit
Fix 32bit build
2 parents 8290849 + 5240127 commit 16aab4e

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

.github/workflows/workflow.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,14 @@ jobs:
3939
- os: windows-latest
4040
ocaml-compiler: "5.3"
4141
libev: false
42+
- os: ubuntu-latest
43+
ocaml-compiler: "ocaml-variants.5.3.0+options,ocaml-option-32bit"
44+
libev: false
45+
4246

4347
runs-on: ${{ matrix.os }}
4448

4549
steps:
46-
- name: set ppx-related variables
47-
id: configppx
48-
shell: bash
49-
run: |
50-
case ${{ matrix.ocaml-compiler }} in
51-
"4.08"|"4.09"|"4.10"|"4.11"|"4.12"|"4.13"|"4.14"|"5.0")
52-
echo "letppx=false"
53-
echo "letppx=false" >> "$GITHUB_OUTPUT"
54-
;;
55-
"5.1"|"5.2"|"5.3")
56-
echo "letppx=true"
57-
echo "letppx=true" >> "$GITHUB_OUTPUT"
58-
;;
59-
*)
60-
printf "unrecognised version %s\n" "${{ matrix.ocaml-compiler }}";
61-
exit 1
62-
;;
63-
esac
6450

6551
- name: Checkout tree
6652
uses: actions/checkout@v5
@@ -70,6 +56,13 @@ jobs:
7056
with:
7157
ocaml-compiler: ${{ matrix.ocaml-compiler }}
7258

59+
- name: set ppx-related variables
60+
id: configppx
61+
shell: bash
62+
run: |
63+
opam exec -- ocaml src/util/letppx.ml
64+
opam exec -- ocaml src/util/letppx.ml >> "$GITHUB_OUTPUT"
65+
7366
- run: opam install conf-libev
7467
if: ${{ matrix.libev == true }}
7568

src/unix/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
windows_somaxconn
190190
unix_accept4)
191191
(flags
192+
(:standard)
192193
(:include unix_c_flags.sexp)))
193194
(c_library_flags
194195
(:include unix_c_library_flags.sexp))

src/util/dune

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
(executable
2+
(name letppx))

src/util/letppx.ml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
let () =
2+
match String.split_on_char '.' Sys.ocaml_version with
3+
| "4" :: _ | "5" :: "0" :: _ -> print_endline "letppx=false"
4+
| "5" :: _ -> print_endline "letppx=true"
5+
| _ ->
6+
print_endline ("unrecognised version " ^ Sys.ocaml_version);
7+
exit 1

0 commit comments

Comments
 (0)