Skip to content

Commit

Permalink
Bump magic numbers for minus-14 (ocaml-flambda#2547)
Browse files Browse the repository at this point in the history
* Stop using upstream build in bump_magic_numbers.sh

* Bump magic numbers for minus-14
  • Loading branch information
mshinwell authored May 7, 2024
1 parent ad876d2 commit 519ca9a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion ocaml/runtime/caml/exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct exec_trailer {

/* Magic number for this release */

#define EXEC_MAGIC "Caml1999X528"
#define EXEC_MAGIC "Caml1999X529"

#endif /* CAML_INTERNALS */

Expand Down
2 changes: 1 addition & 1 deletion ocaml/runtime4/caml/exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct exec_trailer {

/* Magic number for this release */

#define EXEC_MAGIC "Caml1999X528"
#define EXEC_MAGIC "Caml1999X529"

#endif /* CAML_INTERNALS */

Expand Down
26 changes: 13 additions & 13 deletions ocaml/utils/config.common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,28 @@ let standard_library =
(* When artifacts are incompatible with upstream OCaml, ocaml-jst uses
magic numbers ending in 5xx. (The AST remains
compatible, so use upstream numbers) *)
let exec_magic_number = "Caml1999X528"
let exec_magic_number = "Caml1999X529"
(* exec_magic_number is duplicated in runtime/caml/exec.h *)
and cmi_magic_number = "Caml1999I528"
and cmo_magic_number = "Caml1999O528"
and cma_magic_number = "Caml1999A528"
and cmi_magic_number = "Caml1999I529"
and cmo_magic_number = "Caml1999O529"
and cma_magic_number = "Caml1999A529"
and cmx_magic_number =
if flambda || flambda2 then
"Caml2021y529"
"Caml2021y530"
else
"Caml2021Y528"
"Caml2021Y529"
and cmxa_magic_number =
if flambda || flambda2 then
"Caml2021z529"
"Caml2021z530"
else
"Caml2021Z528"
"Caml2021Z529"
and ast_impl_magic_number = "Caml1999M033"
and ast_intf_magic_number = "Caml1999N033"
and cmxs_magic_number = "Caml1999D528"
and cmt_magic_number = "Caml1999T528"
and cms_magic_number = "Caml1999S528"
and linear_magic_number = "Caml1999L528"
and cfg_magic_number = "Caml2021G528"
and cmxs_magic_number = "Caml1999D529"
and cmt_magic_number = "Caml1999T529"
and cms_magic_number = "Caml1999S529"
and linear_magic_number = "Caml1999L529"
and cfg_magic_number = "Caml2021G529"

let safe_string = true
let default_safe_string = true
Expand Down
4 changes: 0 additions & 4 deletions tools/bump_magic_numbers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ if [ "$(git status --porcelain --untracked-files=no)" != "" ]; then
exit 1
fi

git clean -dfX
(cd ocaml && ./configure && make -j8 coldstart && make -j8 coreall)

# Unfortunately the "e" modifier appears not to work except for replacing
# a whole line

Expand All @@ -33,4 +30,3 @@ $sed -i \
-e 's/^ "Caml\([0-9][0-9][0-9][0-9]\)\([a-zA-Z]\)\(5[0-9][0-9]\)"/echo " \\"Caml\1\2$((\3 + 1))\\""/ge' \
ocaml/utils/config.common.ml

(cd ocaml && make -j8 coreall && make -j8 bootstrap)

0 comments on commit 519ca9a

Please sign in to comment.