diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-04-06 11:21:07 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-04-06 11:21:07 +0200 |
| commit | 4e90c49724c6c6ece65acbe8888a597343b286f9 (patch) | |
| tree | 8d43fbd01d9a3cdcc8756cf532186c9d92b08ffe /README.md | |
| parent | 05473ae999c9b01db17a8caa22805376e4d79c75 (diff) | |
| download | nissy-core-4e90c49724c6c6ece65acbe8888a597343b286f9.tar.gz nissy-core-4e90c49724c6c6ece65acbe8888a597343b286f9.zip | |
Update readme for Windows build
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 39 |
1 files changed, 31 insertions, 8 deletions
| @@ -39,14 +39,26 @@ is going to configure `nissy` to use at most 3 threads, and build it with | |||
| 39 | 39 | ||
| 40 | ### Windows | 40 | ### Windows |
| 41 | 41 | ||
| 42 | It is possible to build this project on Windows using `build.bat`. The | 42 | It is possible to build this project on Windows using `build.bat`, using |
| 43 | [Clang](https://clang.llvm.org/) compiler must be installed, and the | 43 | either MSVC (default) or [Clang](https://clang.llvm.org/). In either case, |
| 44 | command prompt must be correctly configured to run it. | 44 | the command prompt must be correctly configured to run the compiler from |
| 45 | the command line. | ||
| 45 | 46 | ||
| 46 | We suggest installing Clang via the Visual Studio Installer, selecting | 47 | For Clang, we suggest installing it via the Visual Studio Installer, |
| 47 | the "C++ development" pack, as well as the "clang" and "Windows SDK 11" | 48 | selecting the "C++ development" pack, as well as the "clang" and "Windows |
| 48 | components. It is advised to use "x64 Native Tools Command Prompt for | 49 | SDK 11" components. It is advised to use "x64 Native Tools Command Prompt |
| 49 | VS 2022" instead of a regular command prompt to run the build script. | 50 | for VS 2022" instead of a regular command prompt to run the build script. |
| 51 | |||
| 52 | |||
| 53 | You can specify the compiler to use by setting the | ||
| 54 | `CC` environment variable to either `clang` or `msvc`. For example: | ||
| 55 | |||
| 56 | ``` | ||
| 57 | > SET CC=clang | ||
| 58 | > build.bat test | ||
| 59 | ``` | ||
| 60 | |||
| 61 | Will run all the tests using clang. | ||
| 50 | 62 | ||
| 51 | The `build.bat` script has the same syntax as the `build.sh` script, | 63 | The `build.bat` script has the same syntax as the `build.sh` script, |
| 52 | but not all options are available. For example | 64 | but not all options are available. For example |
| @@ -64,9 +76,20 @@ can be used to build the basic shell, while | |||
| 64 | Builds and runs the unit tests. See `build.bat help` for a list of | 76 | Builds and runs the unit tests. See `build.bat help` for a list of |
| 65 | all available options. | 77 | all available options. |
| 66 | 78 | ||
| 67 | Note: The build script for Windows does not support all the options | 79 | #### Caveats for building on Windows |
| 80 | |||
| 81 | * The build script for Windows does not support all the options | ||
| 68 | available with build.sh. If you want to tune the build options, you'll | 82 | available with build.sh. If you want to tune the build options, you'll |
| 69 | have to manually edit the build script. | 83 | have to manually edit the build script. |
| 84 | * If you are building on an old x86-64 machine that does not support AVX2 | ||
| 85 | instructions, you will have to manually set the architecture to `PORTABLE` | ||
| 86 | with `SET ARCH=PORTABLE`. | ||
| 87 | * Build on Windows on ARM has not been tested at all. | ||
| 88 | * When building with MSVC, the option `/experimental:c11atomics` is used. | ||
| 89 | Despite atomic types being part of the C11 standard for 15 years now, | ||
| 90 | they have only [recently been | ||
| 91 | implemented](https://devblogs.microsoft.com/cppblog/c11-atomics-in-visual-studio-2022-version-17-5-preview-2), | ||
| 92 | and Microsoft still considers them an experimental feature. Impressive! | ||
| 70 | 93 | ||
| 71 | ## Running tests | 94 | ## Running tests |
| 72 | 95 | ||
