Skip to content

Commit a39be0e

Browse files
authored
Rename libdash library to avoid name collision in dune (#29)
fix from ocaml/dune#9773
1 parent c805325 commit a39be0e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

dune

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
builtins.h nodes.h syntax.h token.h token_vars.h
77
)
88
(action
9+
(setenv CC "%{cc}"
910
(bash
1011
"\
1112
\n set -e\
@@ -17,7 +18,7 @@
1718
\n cp lib/libdash.a libdash.a\
1819
\n cp lib/dlldash.so dlldash.so\
1920
\n cp src/{builtins,nodes,syntax,token,token_vars}.h .\
20-
\n")))
21+
\n"))))
2122

2223
(subdir src
2324
(rule

ocaml/dune

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
(public_names shell_to_json json_to_shell)
44
(modules shell_to_json json_to_shell ast_json)
55
(modes (native exe))
6-
(foreign_archives ../dash)
76
(libraries libdash yojson atdgen))
87

8+
(rule (copy ../dlldash.so dlldash_native.so))
9+
(rule (copy ../libdash.a libdash_native.a))
10+
911
(library
1012
(name libdash)
1113
(public_name libdash)
1214
(modes native)
1315
(modules (:standard \ json_to_shell shell_to_json ast_json))
1416
(libraries ctypes ctypes.foreign)
17+
(foreign_archives dash_native)
1518
(ctypes
1619
(external_library_name dash)
17-
(build_flags_resolver (vendored (c_flags :standard) (c_library_flags :standard)))
20+
(build_flags_resolver vendored)
1821
(deps (glob_files ../src/*.h) ../src/builtins.h ../src/nodes.h ../src/syntax.h ../src/token.h ../src/token_vars.h)
1922
(headers (preamble
2023
"\

0 commit comments

Comments
 (0)