mirror of
https://github.com/Z3Prover/z3
synced 2026-06-16 21:56:22 +00:00
`Microsoft.Z3.dll` was being emitted with PE `Machine=0x8664` (AMD64) despite being pure IL, because the Windows x64 CI environment (`vcvarsall.bat x64`) injects `Platform=x64` into MSBuild, which sets the COFF machine type when `PlatformTarget` is not explicitly specified. This causes `FS0193` / architecture mismatch errors on any arm64 .NET host (macOS Apple Silicon, Linux aarch64, Windows on ARM). ## Changes - **`scripts/mk_util.py`** — Add `<PlatformTarget>AnyCPU</PlatformTarget>` to the in-memory `.csproj` template generated by the Python build system (`mk_win_dist.py`, `mk_unix_dist.py`) - **`src/api/dotnet/Microsoft.Z3.csproj.in`** — Add `<PlatformTarget>AnyCPU</PlatformTarget>` to the CMake build system template Both paths now produce `Machine=0x014C` (i386/AnyCPU) regardless of host or CI environment, matching the assembly's actual nature (`ILONLY=True`, `32BIT_REQUIRED=False`). The native side already ships six RIDs; no changes needed there. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| tests | ||
| build-win-signed-cmake.yml | ||
| build-win-signed.yml | ||
| build_libcxx_msan.sh | ||
| coverage.yml | ||
| find_non_defined_param_eval_patterns.py | ||
| generate-doc.yml | ||
| jsdoctest.yml | ||
| mk_consts_files.py | ||
| mk_copyright.py | ||
| mk_def_file.py | ||
| mk_exception.py | ||
| mk_genfile_common.py | ||
| mk_gparams_register_modules_cpp.py | ||
| mk_install_tactic_cpp.py | ||
| mk_make.py | ||
| mk_mem_initializer_cpp.py | ||
| mk_nuget_task.py | ||
| mk_pat_db.py | ||
| mk_project.py | ||
| mk_unix_dist.py | ||
| mk_unix_dist_cmake.py | ||
| mk_util.py | ||
| mk_win_dist.py | ||
| mk_win_dist_cmake.py | ||
| policy.json | ||
| pyg2hpp.py | ||
| README | ||
| test-examples-cmake.yml | ||
| test-java-cmake.yml | ||
| test-jupyter.yml | ||
| test-regressions-coverage.yml | ||
| test-regressions.yml | ||
| test-z3.yml | ||
| trackall.sh | ||
| update_api.py | ||
| update_header_guards.py | ||
| update_include.py | ||
| update_version.py | ||
| VERSION.txt | ||
| vsts-mac.sh | ||
| vsts-vs2013.cmd | ||
| vsts-vs2017.cmd | ||
Instructions for updating external Z3 API ----------------------------------------- The python "macros": def_Type() and def_API() are used to add new types and function definitions to the Z3 API. The .h files provided to `mk_bindings(API_files)` contain these definitions. See src\api\z3_api.h for many examples. The bindings for .Net and Python are generated when mk_make.py is invoked.