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
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ jobs:
- run: opam install -y --deps-only .
- run: opam exec -- dune build -p luv
if: ${{ !matrix.static }}
- run: opam exec -- dune runtest --profile release test/rewatch test/unit/pure test/unit/file
if: ${{ !matrix.static }}
- name: Link and run a static executable
if: matrix.static
run: |
opam pin add --yes --no-action --kind=path luv.0.5.14 .
opam install --yes luv ocamlfind
opam exec -- ocamlfind ocamlopt -thread -package luv -linkpkg \
-ccopt -static -o hello_world example/hello_world.ml
file hello_world | grep 'statically linked'
./hello_world
opam exec -- ocamlfind ocamlopt -thread -package luv,unix -linkpkg \
-ccopt -static -o watcher test/rewatch/watcher.ml
file watcher | grep 'statically linked'
./watcher

old-libuv:
strategy:
Expand Down
1 change: 1 addition & 0 deletions luv.opam
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dev-repo: "git+https://github.com/aantron/luv.git"

depends: [
"base-unix" {build}
"conf-linux-libc-dev" {build & os = "linux"}
"ctypes" {>= "0.14.0"}
"dune" {>= "2.7.0"}
"integers" {>= "0.3.0"}
Expand Down
16 changes: 12 additions & 4 deletions src/c/dune
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,19 @@ let () = Jbuild_plugin.V1.send @@ {|
case \"$architecture:$c_compiler\" in
arm64:*musl*) extra_cflags=-mno-outline-atomics ;;
esac
case \"$c_compiler\" in
*musl*)
# Debian's musl-gcc omits the system Linux kernel headers.
multiarch=`$c_compiler -print-multiarch`
extra_cflags=\"$extra_cflags -idirafter /usr/include -idirafter /usr/include/$multiarch\" ;;
esac
sh configure --host `ocamlc -config | awk '/^host:/ {print $NF}'` \
'CC=%{cc}' CFLAGS=\"-DNDEBUG $extra_cflags\" --silent --enable-silent-rules")
(ignore-outputs (bash
(bash
"$([ '%{os_type}' = Unix ] && echo %{make} || echo make) V=0 -j 4 \
-o aclocal.m4 -o Makefile.in -o configure \
-o configure.status -o Makefile libuv.la"))
-o configure.status -o Makefile libuv.la > build.log 2>&1 || { \
cat build.log >&2; exit 1; }")
(ignore-outputs (bash
"sh libtool --silent --no-warnings --mode install cp libuv.la `pwd`"))))
(bash "cp vendor/libuv/libuv.a .")
Expand All @@ -106,7 +113,7 @@ let () = Jbuild_plugin.V1.send @@ {|
(targets extra_libs.sexp)
(action (ignore-outputs (bash "\
if ocamlc -config | grep mingw; then \
echo '(-ldbghelp -liphlpapi -lole32 -lpsapi -luserenv)' > extra_libs.sexp; \
echo '(-ldbghelp -liphlpapi -lole32 -lpsapi -lsynchronization -luserenv)' > extra_libs.sexp; \
else \
echo '()' > extra_libs.sexp; \
fi"))))
Expand Down Expand Up @@ -136,7 +143,8 @@ let () = Jbuild_plugin.V1.send @@ {|
; https://github.com/avsm/ocaml-yaml/blob/master/types/stubgen/jbuild#L20
(rule
(targets generate_types_step_2.exe)
(deps (:c generate_types_step_2.c) helpers.h shims.h)
(deps (:c generate_types_step_2.c) helpers.h shims.h
|}^ (if install_h then "uv.h (glob_files uv/*.h)" else "") ^{|)
(action (bash "\
if [ '%{ocaml-config:ccomp_type}' = 'msvc' ]; then \
%{cc} %{c} \
Expand Down
1 change: 0 additions & 1 deletion src/c/luv_c_type_descriptions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ struct
let f_bavail = field t "f_bavail" uint64_t
let f_files = field t "f_files" uint64_t
let f_ffree = field t "f_ffree" uint64_t
let f_spare = field t "f_spare" (array 4 uint64_t)
let () = seal t
end

Expand Down
600 changes: 457 additions & 143 deletions src/c/vendor/configure/Makefile.in

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/c/vendor/configure/commit-hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e9f29cb984231524e3931aa0ae2c5dae1a32884e
840404ce8ba7cc0204be52389a6cfff9f2c90fb6
Loading
Loading