Skip to content

Commit

Permalink
test: add repro for ocaml#9199 (artifacts and x-comp)
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Millon <[email protected]>
  • Loading branch information
emillon committed Nov 16, 2023
1 parent a876247 commit 4b1ddcf
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions test/blackbox-tests/test-cases/github9199.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
%{lib:.....} forms should expand in the correct context.
See #9199.

$ cat > dune-project << EOF
> (lang dune 1.1)
>
> (package
> (name somelib))
> EOF

$ cat > dune-workspace << EOF
> (lang dune 1.10)
> (context
> (default
> (name host)))
> (context
> (default
> (name cross)
> (host host)))
> EOF

$ cat > dune << EOF
> (rule
> (write-file target %{lib:somelib:somelib.a}))
> EOF

$ mkdir lib
$ cat > lib/dune << EOF
> (library
> (public_name somelib))
> EOF

$ dune build _build/host/target _build/cross/target
$ cat _build/host/target
../install/host/lib/somelib/somelib.a
$ cat _build/cross/target
../install/host/lib/somelib/somelib.a

0 comments on commit 4b1ddcf

Please sign in to comment.