@@ -15,7 +15,8 @@ SPDX-License-Identifier: Apache-2.0
15
15
16
16
<import file =" macros.xml" />
17
17
18
- <target name =" package-bitwuzla" depends =" " >
18
+ <!-- Determine version and build the Bitwuzla binaries -->
19
+ <target name =" build-bitwuzla" >
19
20
<fail unless =" bitwuzla.path" >
20
21
Please specify the path to Bitwuzla with the flag -Dbitwuzla.path=/path/to/bitwuzla.
21
22
The path has to point to the root Bitwuzla folder, i.e.,
@@ -60,6 +61,14 @@ SPDX-License-Identifier: Apache-2.0
60
61
<arg value =" install" />
61
62
</exec >
62
63
64
+ <!-- check if -Dbitwuzla.rebuildWrapper=on was used-->
65
+ <condition property =" rebuild" >
66
+ <istrue value =" ${bitwuzla.rebuildWrapper}" />
67
+ </condition >
68
+ </target >
69
+
70
+ <!-- Run swig to generate a new wrapper. Only executed if rebuildWrapper was specified. -->
71
+ <target name =" build-wrapper" if =" rebuild" depends =" build-bitwuzla" >
63
72
<!-- copy bitwuzla include files to the source tree -->
64
73
<delete dir =" ${source.path}/include" quiet =" true" />
65
74
<copy todir =" ${source.path}" >
@@ -90,7 +99,17 @@ SPDX-License-Identifier: Apache-2.0
90
99
<arg value =" -i" />
91
100
<arg value =" lib/native/source/libbitwuzla/phantomReferences.patch" />
92
101
</exec >
102
+ </target >
93
103
104
+ <!-- Skip rebuilding the swig header if rebuildWrapper was not specified -->
105
+ <target name =" skip-wrapper" unless =" rebuild" depends =" build-bitwuzla" >
106
+ <echo >WARNING: Skipping the build step for the SWIG wrapper.
107
+ If the Bitwuzla API has changed since the last release the wrapper should be updated. Use
108
+ option -Dbitwuzla.rebuildWrapper to run SWIG and automatically generate a new wrapper.</echo >
109
+ </target >
110
+
111
+ <!-- Continue with the build and package everything -->
112
+ <target name =" package-bitwuzla" depends =" build-wrapper, skip-wrapper" >
94
113
<!-- compile java proxies and create jar file -->
95
114
<mkdir dir =" ${source.path}/build" />
96
115
<javac release =" 11" srcdir =" ${source.path}/src/" destdir =" ${source.path}/build" includeantruntime =" false"
@@ -214,7 +233,6 @@ SPDX-License-Identifier: Apache-2.0
214
233
</exec >
215
234
</target >
216
235
217
-
218
236
<target name =" publish-bitwuzla" depends =" package-bitwuzla, load-ivy"
219
237
description =" Publish Bitwuzla binaries to Ivy repository." >
220
238
<ivy : resolve conf =" solver-bitwuzla" file =" solvers_ivy_conf/ivy_bitwuzla.xml" />
0 commit comments