3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-02 18:08:57 +00:00
Commit graph

654 commits

Author SHA1 Message Date
Lev Nachmanson
d3f5fd6825 Fix Java UnsatisfiedLinkError on macOS (#7640)
On macOS, libz3java.dylib was built without an rpath to find
libz3.dylib in the same directory. When Java loaded the JNI library,
the dynamic linker could not resolve the libz3 dependency, causing
UnsatisfiedLinkError.

Three fixes:
- mk_util.py: add -Wl,-rpath,@loader_path to the macOS JNI link command
- CMakeLists.txt: set MACOSX_RPATH, BUILD_RPATH, INSTALL_RPATH for
  z3java target; remove duplicate headerpad block
- update_api.py: improve Native.java error message to show the root
  cause from both load attempts instead of only the fallback error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-17 13:59:37 -10:00
copilot-swe-agent[bot]
ba0f276584 fix: use SLINK_EXTRA_FLAGS for JNI bindings to support macOS cross-compilation
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-09 16:15:57 +00:00
copilot-swe-agent[bot]
c4acd2a47e Fix macOS cross-compilation from ARM64 to x86_64 in mk_unix_dist.py and mk_util.py
When macos-latest changed to ARM64 runners, the mac-build-x64 job started
producing arm64 libz3.dylib inside x86_64-tagged wheels, causing import
failures on macOS x86_64.

Root cause: mk_make.py subprocess detects the ARM64 host at module level
(IS_ARCH_ARM64=True), and without --arm64=false override it adds -arch arm64
to SLIBEXTRAFLAGS, overriding the -arch x86_64 set via environment variables.

Fix 1 (mk_unix_dist.py): Pass --arm64=false to mk_make.py subprocess when
building x64 on an ARM64 host, preventing the arm64 flag inheritance.

Fix 2 (mk_util.py): When IS_ARCH_ARM64=False on an ARM64 macOS host, add
-arch x86_64 to SLIBEXTRAFLAGS so the shared library linker also targets
x86_64 (LDFLAGS already receives this flag from the env var).

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-02-19 18:02:52 +00:00
copilot-swe-agent[bot]
ae328dc006 Fix Priority 1 ASSERT_FAIL bugs - replace assertions with proper error handling
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-02-18 00:42:55 +00:00
Nikolaj Bjorner
66d0fb5477 git bindings v1.0 2026-02-15 21:24:40 -08:00
copilot-swe-agent[bot]
af76ac69d6 Apply headerpad fix to build systems (Python and CMake) and fix validation test paths
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-02-08 17:23:04 +00:00
Simon Sobisch
c390afa279
AIX compat (#8113)
* fix name conflict for struct proc

* aix compat
2026-01-05 07:23:05 -08:00
Guido Martínez
32e9440855
mk_util.py: fix --gprof option (#8040)
The addition of -fomit-frame-pointer was missing a space (which broke
the command line), but also this option should be added only if -pg is
*not* given, as they are incompatible. So, just remove this line to fix
the --gprof flag in configure.

Also, this option is implied by any level of `-O`, so there is no need
to pass it explicitly in most cases. It could be added to debug,
non-profile builds, but I'm not sure that's useful.
2025-11-23 16:42:05 -08:00
hwisungi
2bf1cc7d61
Enabling Control Flow Guard (CFG) by default for MSVC on Windows, with options to disable CFG. (#7988)
* Enabling Control Flow Guard by default for MSVC on Windows, with options to disable it.

* Fix configuration error for non-MSVC compilers.

* Reviewed and updated configuration for Python build and added comment for CFG.
2025-10-22 14:18:25 +02:00
Christoph M. Wintersteiger
590b79dc54
Fix #7623 (#7672) 2025-06-06 20:29:04 +02:00
Nikolaj Bjorner
56b706ac55 fixes for #7420 #7405 2024-10-13 15:52:13 -07:00
Nikolaj Bjorner
1121815439 Standardize C++20 flag across different platforms in build script 2024-09-22 21:45:10 +01:00
Nikolaj Bjorner
1e580a7f12 update to c++20, remove debug output
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-09-22 21:30:44 +01:00
Christoph M. Wintersteiger
80642e5a7c
Add check for libatomic requirement to Python build system (#7184)
* Add check for libatomic requirement to Python build system

* More thorough check

* Fix typos
2024-03-23 11:38:14 -07:00
Christoph M. Wintersteiger
a2b490baa6
Disable Python compilation cache during build (#7057)
* Disable Python compilation cache during build

* More pythonic check for none
2023-12-14 07:26:52 -08:00
Nikolaj Bjorner
f7d9a5ba93
Revert "Disable Python compilation cache during build (#7052)" (#7054)
This reverts commit 8293be859f.
2023-12-13 19:32:00 -08:00
Christoph M. Wintersteiger
8293be859f
Disable Python compilation cache during build (#7052)
* Disable Python compilation cache during build

* Fix var name
2023-12-13 18:05:33 -08:00
Nikolaj Bjorner
156426a0cf use / for package path
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-05 15:10:13 -08:00
Nikolaj Bjorner
111ce01702 update path reference to readme 2023-12-05 13:47:05 -08:00
Nikolaj Bjorner
d566eb3df7 include readme in package
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-12-05 13:04:25 -08:00
John Fleisher
858477f3e3
Add c++ flags for vulcan assembly compliance (#6906) 2023-09-18 09:03:56 -07:00
NikolajBjorner
260cb337de try to instrument nightly with aarch compiler for arm64
Signed-off-by: NikolajBjorner <nbjorner@microsoft.com>
2023-08-02 11:25:16 -07:00
NikolajBjorner
ea95f8086f try to instrument nightly with aarch compiler for arm64
Signed-off-by: NikolajBjorner <nbjorner@microsoft.com>
2023-08-02 11:24:32 -07:00
Nikolaj Bjorner
d33d8ac07a revert setting arm on linux
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-02 10:55:03 -07:00
Nikolaj Bjorner
9b5727adde enable arm for non-osx
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-02 10:51:52 -07:00
Jerry James
f5c069f899
Fix regular expression strings with escapes (#6797) 2023-07-07 09:57:07 -07:00
Kevin Phoenix
1a9990a92f
Use sys.getdefaultencoding() instead of sys.stdout.encoding (#6612) 2023-02-28 11:46:10 -08:00
John Fleisher
f72cdda5fb
Change to 4 digit assembly version (#6297)
* WiP: test build specific version number

* update mk_win_dist for assembly-version

* Add print statements for version

* remove stray semicolon

* undo quote change in projectstr

* nit fixes

* revert print formatting for Mac build

* fix spaces
2022-08-31 06:46:06 -07:00
John Fleisher
b3f4d3fdc7
Publish Z3 symbols (#6280)
* WiP: publish symbols for package

* set debugtype to full

* fix internal nuget feed publishing

* Try pipeline github authorization

* Update github service connection

* WiP: try symbol publish in build

* try Z3Prover for GitHub connection

* WiP: collect symbols

* revert symbol type to pdbonly (only portable is not supported for publishing)

* Publish symbols in nightly and release

* Revert this: comment out publish to test release build pipe

* restore publishing

* Turn of index sources to eliminate warning that it is not supported for Github

Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-17 07:30:55 -07:00
Bruce Mitchener
dc75031a36 Remove all per-OS defines apart from _WINDOWS.
These are all unused and shouldn't be needed. Mostly we need
something for differentiating between POSIX and non-POSIX
(until we can reduce some of those differences as well).

We shouldn't need to modify the build system to build on a new
OS if it is basically a Unix and is supported by cmake.
2022-08-03 19:03:04 +03:00
Nikolaj Bjorner
774ce3d7ab create special case for osx arm
shortcut when store/select are distinct

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-08-03 07:56:02 +03:00
Bruce Mitchener
9a99c78ffb Enable thread_local code more broadly.
This was only being enabled on Windows, Linux, and FreeBSD. (FreeBSD
only had it enabled in the legacy build system, not in cmake.)

`thread_local` is part of C++11, so now that we require C++17
or later and more recent compilers, this should work everywhere
that threading does, so only disable it within a `SINGLE_THREAD`
build.
2022-08-02 09:24:51 +03:00
Nikolaj Bjorner
b743e210f8 give java dynamic lib a chance for extra flags for #5848 2022-07-15 08:44:05 -07:00
Nikolaj Bjorner
b254f4086b Separate out native static content for Java
Make it easier to add native methods for callbacks (for user propagator) #6097

The Java User propagator wrapper should define a base class with virtual methods that can be invoked from functions defined in NativeStatic.txt
2022-06-21 09:09:42 -07:00
Olaf Tomalka
7fdcbbaee9
Add high level bindings for js (#6048)
* [Draft] Added unfinished code for high level bindings for js

* * Rewrote structure of js api files
* Added more high level apis

* Minor fixes

* Fixed wasm github action

* Fix JS test

* Removed ContextOptions type

* * Added Ints to JS Api
* Added tests to JS Api

* Added run-time checks for contexts

* Removed default contexts

* Merged Context and createContext so that the api behaves the sames as in other constructors

* Added a test for Solver

* Added Reals

* Added classes for IntVals and RealVals

* Added abillity to specify logic for solver

* Try to make CI tests not fail

* Changed APIs after a round of review

* Fix test

* Added BitVectors

* Made sort into getter

* Added initial JS docs

* Added more coercible types

* Removed done TODOs
2022-06-14 09:55:58 -07:00
Gleb Popov
6f7be77e2b
Buildsystem fixes for FreeBSD. (#6029)
* Enable thread-local storage on FreeBSD.

* Pass -soname linker flag on FreeBSD.
2022-05-12 10:54:57 -07:00
Nikolaj Bjorner
3821eb4134 fpflags 2022-04-08 14:47:38 +02:00
Nikolaj Bjorner
67434a3096 again 2022-04-08 14:40:55 +02:00
Nikolaj Bjorner
9533dbaf5c missing arg specifier 2022-04-08 14:34:52 +02:00
Nikolaj Bjorner
746a4161af more passing of parameters 2022-04-08 14:24:21 +02:00
Nikolaj Bjorner
cb6aba2315 more arm 2022-04-08 14:07:56 +02:00
Nikolaj Bjorner
79553261d1 no uname on nt 2022-04-08 07:02:32 +02:00
Nikolaj Bjorner
2e91d66888 Update mk_util.py
use more meaningful name
2022-04-08 06:28:36 +02:00
Nikolaj Bjorner
c47bd1d01f add arm64 auto-detect
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-04-07 13:43:35 +02:00
Nikolaj Bjorner
8c2909f52b working on python make for arm
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-04-07 13:36:23 +02:00
Nikolaj Bjorner
05ec77cb56 revert 2022-04-03 12:20:10 -07:00
Nikolaj Bjorner
321745fdb1 #5941
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-04-03 11:07:54 -07:00
Matt Thornton
4e0a2f5968
Dispose of intermediate Z3Objects created in dotnet api. (#5901)
* Dispose of intermediate Z3Objects created in dotnet api.

* Set C# LangVersion to 8.0.

* Fix build errors.

* Fix warning about empty using statement.

* Fix Xor to only dispose of objects that it creates internally.
2022-03-17 08:08:05 -07:00
Emma Jane Bonestell
dc110f10a4
Update mk_util.py (#5864)
Fix dynamic -lib opam builds on MSYS2
2022-02-23 03:36:46 -08:00
Nikolaj Bjorner
b38b6daba3 add option to disable FPMATH 2022-02-20 15:33:13 +02:00