|
| 1 | +# Recommendations for Packaging Wild linker |
| 2 | + |
| 3 | +## Binaries |
| 4 | + |
| 5 | +This repository consists of Wild linker and linker-diff binaries. We recommend providing the `wild` |
| 6 | +binary and symlink `ld.wild` pointing to it, as this enables `-fuse-ld=wild` usage with Clang. |
| 7 | +Linker-diff is mainly a tool to aid Wild development, so you most likely don't want to package it. |
| 8 | + |
| 9 | +## Building |
| 10 | + |
| 11 | +This project uses Cargo as its build system. The official releases are built with `--profile dist` |
| 12 | +that enables compiler's internal ThinLTO and strips the binaries. The benefit from ThinLTO |
| 13 | +is very mild in Wild's case, so it's up to you whether to use it. Musl releases also enable |
| 14 | +`--feature mimalloc`, see below for the explanation. |
| 15 | + |
| 16 | +### Optional features |
| 17 | + |
| 18 | +Wild has two optional build-time features: |
| 19 | + |
| 20 | +- `fork` (enabled by default) – an optimisation of process clean-up phase using `fork()`. Can be |
| 21 | + disabled in the runtime via `--no-fork` flag. |
| 22 | +- `mimalloc` (disabled by default) – build and use Mimalloc as the allocator instead of the system |
| 23 | + one. It performs marginally worse than Glibc in Wild's case, but much better than Musl. |
| 24 | + |
| 25 | +## Testing |
| 26 | + |
| 27 | +To test built binary, you can use `cargo test`, preferably with the same configuration as the build |
| 28 | +to avoid rebuilding. The testsuite is configured with `test-config.toml` file (default values are |
| 29 | +used if absent) and `WILD_TEST_IGNORE_FORMAT`. |
| 30 | + |
| 31 | +To tweak the configuration, you can copy `test-config.toml.example` to `test-config.toml` and edit |
| 32 | +it to your liking. You can learn more about the options |
| 33 | +at [Configuration file for tests](./CONTRIBUTING.md#configuration-file-for-tests). Just be careful |
| 34 | +with `run_all_diffs` option, it's meant mostly for Wild development and may cause false positives. |
| 35 | + |
| 36 | +Setting `WILD_TEST_IGNORE_FORMAT` disables format checks of C/C++ source files in tests which you |
| 37 | +might prefer because your `clang-format` may give different results. |
| 38 | + |
| 39 | +## Issues |
| 40 | + |
| 41 | +If you, or the users of your package, encounter any issues or pain points with Wild, don't hesitate |
| 42 | +to report them to us or reach out for help. |
0 commit comments