3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-13 12:25:37 +00:00
z3/src/api
Copilot ce9cf4ad7b
Fix ARM64 nightly build: dotnet NuGet packaging broken under Ninja/cmake (#9589)
The Windows ARM64 nightly build (`mk_win_dist_cmake.py --arm64-only`)
was failing because the cmake-built `Microsoft.Z3` NuGet package was
produced without any native Windows DLL, causing the downstream dotnet
example build to fail.

## Root causes

- **Wrong DLL path in `Microsoft.Z3.csproj.in`**: Path included
`/$(_DN_CMAKE_CONFIG)/` (e.g., `.../RelWithDebInfo/libz3.dll`), but
`CMakeLists.txt` sets `CMAKE_RUNTIME_OUTPUT_DIRECTORY =
PROJECT_BINARY_DIR` with no config subdir. With Ninja single-config, the
DLL lands at `build-dir/libz3.dll`. The `Exists()` guard silently
excluded the DLL from the package.
- **Wrong runtime identifier**: ARM64 DLL was being packed under
`runtimes\win-x64\native` instead of `runtimes\win-arm64\native`.
- **Legacy copy fires for `net8.0`**: `Microsoft.Z3.targets` excluded
`netstandard`/`netcoreapp` but not modern TFMs like `net8.0`, so
`CopyToOutputDirectory` fired and failed trying to copy the absent
`win-x64` DLL.

## Changes

- **`src/api/dotnet/CMakeLists.txt`**: Introduce `Z3_DOTNET_WIN_RID`
cmake variable (`win-x64` / `win-x86` / `win-arm64`) derived from
`TARGET_ARCHITECTURE`; used at `configure_file` time.
- **`src/api/dotnet/Microsoft.Z3.csproj.in`**: Remove
`/$(_DN_CMAKE_CONFIG)` from the Windows DLL path; replace hardcoded
`runtimes\win-x64\native` with `runtimes\${Z3_DOTNET_WIN_RID}\native`.
- **`src/api/dotnet/Microsoft.Z3.targets`**: Add
`!$(TargetFramework.Contains('.'))` to the legacy-copy condition, which
correctly excludes `net5.0`/`net6.0`/`net7.0`/`net8.0` (all use dotted
TFMs) while keeping `net45`/`net472` etc.
- **`src/api/dotnet/Microsoft.Z3.props`**: Add explicit `arm64`
condition mapping `$(Platform) == 'arm64'` to
`runtimes\win-arm64\native\libz3.dll` for legacy .NET Framework ARM64
consumers.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-05-21 11:18:03 -07:00
..
c++ Fix high and medium priority API coherence issues (Go, Java, C++, TypeScript) (#8983) 2026-03-14 10:46:03 -07:00
dll Tabs, formatting. 2017-09-17 14:54:09 +01:00
dotnet Fix ARM64 nightly build: dotnet NuGet packaging broken under Ninja/cmake (#9589) 2026-05-21 11:18:03 -07:00
go Go bindings: extract CGo slice-conversion helpers to eliminate boilerplate (#9465) 2026-05-06 12:32:53 -07:00
java fix issues 1-10: add missing API bindings across Go, Julia, TypeScript, OCaml, and Java (#9432) 2026-05-04 09:29:47 -07:00
js fix issues 1-10: add missing API bindings across Go, Julia, TypeScript, OCaml, and Java (#9432) 2026-05-04 09:29:47 -07:00
julia fix issues 1-10: add missing API bindings across Go, Julia, TypeScript, OCaml, and Java (#9432) 2026-05-04 09:29:47 -07:00
mcp remove non-working ts mcp server, settle with python variant 2025-04-18 10:10:12 -07:00
ml Expose Seq.mk_re_diff in ocaml bindings (#9584) 2026-05-21 10:29:08 -07:00
python Add Z3_mk_polymorphic_datatype to Python, .NET, Go, and TypeScript bindings (#9181) 2026-03-31 14:15:34 -07:00
api_algebraic.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
api_arith.cpp Add check that argument of Z3_is_algebraic_number is_expr (#8027) 2026-02-18 20:55:56 -08:00
api_array.cpp Fix API bugs exercised by test/deep_api_bugs.cpp 2026-03-12 22:58:53 +00:00
api_ast.cpp [code-simplifier] Simplify api_ast.cpp by removing unreachable branch and stray comment (#9570) 2026-05-19 13:56:17 -07:00
api_ast_map.cpp Add [[nodiscard]] to AST factory functions and modernize iterator loops (#8143) 2026-02-18 20:57:08 -08:00
api_ast_map.h booyah 2020-07-04 15:56:30 -07:00
api_ast_vector.cpp Modern C++: Add std::span overload for mk_or, adopt std::clamp, optimize stream output (#8507) 2026-02-18 20:58:05 -08:00
api_ast_vector.h Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
api_bv.cpp fix #7572 and fix #7574 2025-03-07 10:46:29 -08:00
api_config_params.cpp fix #7622 2025-04-17 11:05:49 -07:00
api_context.cpp Refactor mk_and and mk_app to use std::span API (#8285) 2026-02-18 20:57:52 -08:00
api_context.h Add finite set API functions to access term constructors from finite_set_decl_plugin.h (#7996) 2025-10-23 17:10:47 +02:00
api_datalog.cpp Adopt std::optional for try_get_value and try_get_size functions (#8268) 2026-02-18 20:57:50 -08:00
api_datalog.h move smt params to params directory, update release.yml 2025-06-09 10:47:22 -07:00
api_datatype.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
api_finite_set.cpp add parameter validation 2026-02-19 14:02:59 -08:00
api_fpa.cpp Fix API bugs exercised by test/deep_api_bugs.cpp 2026-03-12 22:58:53 +00:00
api_goal.cpp fix #7609 2025-04-04 18:40:15 -07:00
api_goal.h Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
api_log.cpp api: avoid some string copies when using mk_external_string 2024-12-28 09:42:54 +00:00
api_model.cpp Fix indentation: use spaces instead of tabs in api_model.cpp CHECK_NON_NULL 2026-03-12 23:00:07 +00:00
api_model.h Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
api_numeral.cpp Note that Z3_get_numeral_small is essentially redundant (#7599) 2025-03-29 10:02:32 -07:00
api_opt.cpp Fix API bugs exercised by test/deep_api_bugs.cpp 2026-03-12 22:58:53 +00:00
api_params.cpp Modern C++: Add std::span overload for mk_or, adopt std::clamp, optimize stream output (#8507) 2026-02-18 20:58:05 -08:00
api_parsers.cpp add py_value to selected classes in python bindings, add mode for input-assertion based lookahead solving 2025-01-04 13:40:49 -08:00
api_pb.cpp call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
api_polynomial.cpp preserve the initial state of the solver with push/pop for multiple objectives (#8264) 2026-02-18 20:57:53 -08:00
api_polynomial.h remove a hundred implicit constructors/destructors 2021-05-23 14:25:01 +01:00
api_qe.cpp filter out terms that are not solved 2025-04-30 09:40:45 -07:00
api_quant.cpp Fix API bugs exercised by test/deep_api_bugs.cpp 2026-03-12 22:58:53 +00:00
api_rcf.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
api_seq.cpp Fix API bugs exercised by test/deep_api_bugs.cpp 2026-03-12 22:58:53 +00:00
api_solver.cpp Fix API bugs exercised by test/deep_api_bugs.cpp 2026-03-12 22:58:53 +00:00
api_solver.h add API for creating and attaching simplifiers 2023-01-31 17:06:03 -08:00
api_special_relations.cpp remove '#include <iostream>' from headers and from unneeded places 2022-06-17 14:10:19 +01:00
api_stats.cpp fix infinite loop in internalize 2022-09-14 11:50:53 +01:00
api_stats.h Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
api_tactic.cpp Revert "Refactor find_tactic_cmd to use std::optional<tactic_cmd*> (#8331)" 2026-02-18 20:57:56 -08:00
api_tactic.h add API for creating and attaching simplifiers 2023-01-31 17:06:03 -08:00
api_util.h Add parameter validation for selected API functions 2025-07-27 13:38:37 -07:00
CMakeLists.txt Add finite set API functions to access term constructors from finite_set_decl_plugin.h (#7996) 2025-10-23 17:10:47 +02:00
z3.h z3.h: Don't include stdio.h (#7014) 2023-11-24 16:46:32 +01:00
z3_algebraic.h fix grouping for latest doxygen (#5626) 2021-10-27 23:46:31 +02:00
z3_api.h Fix documentation for Z3_solver_to_dimacs_string (#9053) 2026-03-20 10:18:13 -07:00
z3_ast_containers.h fix grouping for latest doxygen (#5626) 2021-10-27 23:46:31 +02:00
z3_fixedpoint.h Added function to select the next variable to split on (User-Propagator) (#6096) 2022-06-19 10:49:25 -07:00
z3_fpa.h Return sign from Z3_fpa_get_numeral_sign as bool instead of int (#8047) 2026-02-18 20:56:01 -08:00
z3_logger.h Make sure all headers do #pragma once. (#6188) 2022-07-23 10:41:14 -07:00
z3_macros.h Make sure all headers do #pragma once. (#6188) 2022-07-23 10:41:14 -07:00
z3_optimization.h Implement Z3_optimize_translate for context translation (#8072) 2026-02-18 20:56:58 -08:00
z3_polynomial.h fix grouping for latest doxygen (#5626) 2021-10-27 23:46:31 +02:00
z3_private.h remove '#include <iostream>' from headers and from unneeded places 2022-06-17 14:10:19 +01:00
z3_rcf.h Return bool instead of int from Z3_rcf_interval (#8046) 2026-02-18 20:56:01 -08:00
z3_replayer.cpp Add static linkage to internal functions 2026-02-18 20:58:05 -08:00
z3_replayer.h Return sign from Z3_fpa_get_numeral_sign as bool instead of int (#8047) 2026-02-18 20:56:01 -08:00
z3_spacer.h add projection with witnesses 2024-11-27 10:26:34 -08:00
z3_v1.h booyah 2020-07-04 15:56:30 -07:00