windows building support
This commit is contained in:
27
README.md
27
README.md
@@ -13,6 +13,33 @@ Install with:
|
||||
meson install -C builddir
|
||||
```
|
||||
|
||||
# Cross Compiling for Windows
|
||||
|
||||
We all hate Windows, right? As much as we hate it, people still use it, so it's nice to be able to run our good software on their crappy platform.
|
||||
|
||||
You'll need the cross compiler (install command is for Arch and derivatives):
|
||||
|
||||
```sh
|
||||
sudo pacman -S mingw-w64-gcc
|
||||
```
|
||||
|
||||
First, cross compile libffi for Windows (look up a guide) and install it to `/usr/x86_64-w64-mingw32/`.
|
||||
|
||||
Cross compile for Windows with the following commands:
|
||||
|
||||
```sh
|
||||
meson setup --cross-file x86_64-w64-mingw32.txt -Ddefault_library=static --prefix=/usr/x86_64-w64-mingw32/ windows-builddir
|
||||
meson compile -C windows-builddir
|
||||
```
|
||||
|
||||
If you'd like it to be installed as a library to link with (for example with Solstice), run
|
||||
|
||||
```sh
|
||||
meson install -C windows-builddir
|
||||
```
|
||||
|
||||
This will install it to `/usr/x86_64-w64-mingw32/`, for convenient usage with other Windows cross compilation projects.
|
||||
|
||||
You may need to run `ldconfig` or reboot to update your ld cache.
|
||||
|
||||
## Bytecode Format
|
||||
|
||||
Reference in New Issue
Block a user