For backwards compatibility, we also `#include "tox_options.h"` in
`tox.h`, but in 0.3.0 we can break that so most toxcore client code
doesn't need the options, only the part that creates the instance.
The master branch might include staging code that is subject to change,
e.g. code including VLAs, which CompCert does not support and thus would
fail on, which will be changed to not use VLAs once merged into the
stable branch.
See https://github.com/jedisct1/libsodium/pull/1188#issuecomment-2221660989
It's a disableable option since we allow the user to change versions of
dependencies and we obviously have hashes only for the default versions,
we are not able to verify hashes of any other version, so it might be
handy to be able to disable the check in that case.
For some reason even with -DCMAKE_EXE_LINKER_FLAGS="-static" specified,
CMake still links OpenMP dynamically, even though it links other libs
statically, e.g. -pthread.
While fun utils are of very low quality, both code-wise and usage-wise
-- not checking for failed mallocs, not offering usage instructions,
etc., there are a couple of them that Windows users might find useful,
like the vanity key generators or a savedata creator, for example.
The building of the fun utils was broken on Windows due to the utils
failing to find sodium.h, as no libsodium include dirs were set on the
fun utils.
We used to make the dll manually as we previously had 3 dlls:
libtoxcore.dll, libtoxav.dll and libtoxencryptsave.dll, but for Windows
we wanted them to be all combined into libtox.dll with all the
dependencies included: libsodium, libopus, libvpx, pthreads, etc, to
reduce the overall dll size and simplify linking. However, since CMake
now produces a single libtoxcore.dll with toxcore, toxav and
toxencryptsave included, we don't have to do this manually anymore.
This results in the dll being named libtoxcore.dll instead of the
libtox.dll that it previously was, matching the static libtoxcore.a's
name.
The same hardening flags as the slated for the upcoming gcc's
`-fhardened` sets, sans `-Wl,-z,relro,-z,now` as MinGW-w64's gcc doesn't
support -z flags. This adds a dependency on libssp -- gcc's stack
protector library.
Used by NetBSD, but we build on Alpine Linux for speed. Separately, we
will build on NetBSD without pkgsrc, to see whether it compiles and runs
there. That VM build is more expensive and harder to debug, so we keep
the pkgsrc Linux build for development.
This ensures that we're able to generate a guaranteed semantically
correct binary with all of toxcore and libsodium. We don't currently
compile libvpx and opus with compcert. Probably not worth the effort.
Sparse checks it. This is neater than using a struct, which has some
slightly weird syntax at times. This also reduces the risk of someone
adding another struct member.
It correctly warns about potentially dereferencing NULL chat in a log
statement. However, chat can semantically never be NULL in that call,
and it's just a defensive check. Still good to fix for clarity.
So we don't need to write so many edge case tests ourselves for things
like parsers, which really don't need those manual tests, as long as we
can check for some properties like "can output the parsed data and it'll
be the same as the input".