Skip to content

Commit

Permalink
Improve the link.sh script and upgrade com to use the last version of…
Browse files Browse the repository at this point in the history
… esperanto
  • Loading branch information
dinosaure committed Dec 19, 2023
1 parent bc131e0 commit 82b5d94
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
17 changes: 11 additions & 6 deletions com.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ doc: "https://dinosaure.github.io/bob/"
license: "MIT"
synopsis: "A peer-to-peer file-transfer tool"

build: [ "dune" "build" "-x" "esperanto" "-p" name "bin/bob.exe" "-j" jobs ]
install: [
[ "objcopy" "-S" "-O" "binary" "_build/default.esperanto/bin/bob.exe" "%{bin}%/bob.com" ]
build: [
[ "dune" "build" "-x" "x86_64-esperanto" "-p" name "bin/bob.exe" "-j" jobs ]
[ "dune" "build" "-x" "aarch64-esperanto" "-p" name "bin/bob.exe" "-j" jobs ]
[ "sh" "link.sh" ]
]
run-test: [ "dune" "runtest" "-p" name "-j" jobs ]

Expand All @@ -26,7 +27,8 @@ depends: [
"decompress" { >= "1.5.1" }
"digestif" { >= "1.1.3" }
"opam-monorepo" { build }
"esperanto" { build }
"x86_64-esperanto" { build }
"aarch64-esperanto" { build }
"ocamlfind" { build }
"bigstringaf"
"cmdliner"
Expand Down Expand Up @@ -54,6 +56,9 @@ pin-depends: [
[ "mirage-crypto-rng.dev" "git+https://github.com/dinosaure/mirage-crypto.git#83b160823cc601ffb19f8be2e32d643ffcbea60d" ]
[ "mtime.dev" "git+https://github.com/dinosaure/mtime.git#d5d70f38c40da90e3e173eb60346df55b64a4a0a" ]
[ "gmp.dev" "git+https://github.com/mirage/ocaml-gmp.git#dfc83c74a327d848074ecf0d33b009eaf5625250" ]
[ "esperanto-toolchain.dev" "git+https://github.com/dinosaure/esperanto.git#621b451bde0dd333cfb12ac23a54a27623dddc25" ]
[ "x86_64-esperanto.dev" "git+https://github.com/dinosaure/esperanto.git#621b451bde0dd333cfb12ac23a54a27623dddc25" ]
[ "aarch64-esperanto.dev" "git+https://github.com/dinosaure/esperanto.git#621b451bde0dd333cfb12ac23a54a27623dddc25" ]
]

x-mirage-opam-lock-location: "com.opam.locked"
Expand All @@ -66,6 +71,6 @@ x-mirage-extra-repo: [
[ "opam-overlays" "https://github.com/dune-universe/opam-overlays.git" ]
[ "mirage-overlays" "https://github.com/dune-universe/mirage-opam-overlays.git" ]
]
x-opam-monorepo-opam-provided: ["ocaml" "ocamlfind" "opam-monorepo" "esperanto"]
x-opam-monorepo-opam-provided: ["ocaml" "ocamlfind" "opam-monorepo" "x86_64-esperanto" "aarch64-esperanto"]

url { src: "git+https://github.com/dinosaure/bob.git#reproducible-build" }
url { src: "git+https://github.com/dinosaure/bob.git" }
9 changes: 7 additions & 2 deletions link.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/sh

apelink \
-V "0b1111101" \
opam exec -- apelink \
-o bob.com \
-l $(opam var bin)/ape-x86_64.elf \
-l $(opam var bin)/ape-aarch64.elf \
-M $(opam var bin)/ape-m1.c \
_build/default.x86_64_esperanto/bin/bob.exe.dbg \
_build/default.aarch64_esperanto/bin/bob.exe.dbg

cat >com.install <<EOF
bin: [
"bob.com"
]
EOF

0 comments on commit 82b5d94

Please sign in to comment.