Skip to content

Commit

Permalink
Switch to statically linked Z3
Browse files Browse the repository at this point in the history
This avoids a run-time dependency on libz3.so, which tends to require
fiddling with LD_LIBRARY_PATH.

Need to pass the flags "-cclib -lstdc++" at compile time, though, as
dune for some reason doesn't pick those up from the z3 package manifest
(see https://stackoverflow.com/a/56853556).
  • Loading branch information
bauereiss committed May 17, 2020
1 parent 6ec1adc commit c0c0d11
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
(public_name asli)
(modes exe)
(modules asli)
(flags (-cclib -lstdc++))
(libraries libASL linenoise pprint))

(executable
(name testlexer)
(modes exe)
; (public_name test_asl_lexer)
(modules testlexer)
(flags (-cclib -lstdc++))
(libraries libASL))
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"linenoise"
"pprint"
"zarith"
("z3" (<= "4.7.1"))
("z3" (>= "4.8.4"))
("alcotest" :with-test)
)
)
Expand Down
2 changes: 1 addition & 1 deletion libASL/dune
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
(name libASL)
(public_name asli.libASL)
(flags
(:standard -w -27))
(:standard -w -27 -cclib -lstdc++))
(modules asl_ast asl_parser asl_parser_pp asl_utils asl_visitor cpu elf eval
lexer lexersupport loadASL primops tcheck utils value visitor)
(libraries pprint zarith z3))
1 change: 1 addition & 0 deletions tests/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(test (name test_asl)
(modes exe)
(flags (-cclib -lstdc++))
(libraries alcotest libASL))

0 comments on commit c0c0d11

Please sign in to comment.