forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add repro for ocaml#9199 (artifacts and x-comp)
Signed-off-by: Etienne Millon <[email protected]>
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |