Skip to content

Commit

Permalink
add minimal reproduction of issue
Browse files Browse the repository at this point in the history
Signed-off-by: Masayuki Takeda <mtakeda@oeconomia.jp>
  • Loading branch information
mt-caret committed May 25, 2024
1 parent 298e98b commit 94e28ad
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/blackbox-tests/test-cases/mdx-stanza/shared-libraries.t/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(library
(name public_lib)
(foreign_archives test))

(rule
(deps test.c)
(targets libtest.a dlltest.so)
(action
(progn
(run gcc -c -fPIC test.c -o test.o)
(run gcc test.o -shared -o dlltest.so)
(run ar rcs libtest.a test.o))))

(mdx
(files :standard - *.mli)
(libraries public_lib))
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(lang dune 3.15)

(name dune_mdx_test)

(using mdx 0.4)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
let foo bar = bar + 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
val foo : int -> int
10 changes: 10 additions & 0 deletions test/blackbox-tests/test-cases/mdx-stanza/shared-libraries.t/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
mdx supports dependencies referencing shared libraries.

$ dune runtest
File "dune", lines 14-16, characters 0-56:
14 | (mdx
15 | (files :standard - *.mli)
16 | (libraries public_lib))
Fatal error: cannot load shared library dlltest
Reason: dlltest.so: cannot open shared object file: No such file or directory
[1]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int add(int a, int b) {
return a + b;
}

0 comments on commit 94e28ad

Please sign in to comment.