1
0
mirror of https://github.com/lz4/lz4.git synced 2026-10-24 01:48:57 +03:00

10 Commits

Author SHA1 Message Date
Yann Collet
5d0c796189 lib/Makefile: Windows DLL built through multiconf, so that changing MULTITHREAD rebuilds it
The DLL was compiled directly from sources, without the objects' cache keyed by flags :
after make lib-nomt, make lib-mt kept the DLL without threads (and conversely).
It now uses c_dynamic_library(), as the Unix shared library, with the multi-threading flags
in the cache key ; the resource object is an additional dependency. The import library
is the same for both variants (same exports). With BUILD_SHARED=no, liblz4 builds nothing, as before.
Checked with mingw-w64 : MULTITHREAD=0 / 1 / back to 1 (cached) switch the DLL's thread imports ;
a program linked to the multi-threaded DLL compresses with nbWorkers=4 under wine.
2026-10-22 12:58:19 -07:00
Yann Collet
869ed8083f build: shared pthread probe within a private directory, also for programs (checkpoint)
Prototype, not intended for a PR as is.

programs/Makefile probed pthread with a fixed have_pthread.c in its directory
(pre-existing in dev) : concurrent invocations collided (24 / 192 concurrent probes
wrongly reported no threads, producing an lz4 CLI without multi-threading),
and read-only source trees made it fail.

- build/make/lz4defs.make : PTHREAD_PROBE, evaluated with the CC and ALLFLAGS of
  the invoking Makefile, within a private temporary directory (mktemp -d).
- lib/Makefile and programs/Makefile employ it (lib/'s copy from previous commit removed).

Validated : probes of lib/ and programs/ (192 concurrent, read-only trees), full tests
MT / no-MT, ASAN+UBSAN, TSAN, make test, wine, CLI build (lz4 multithread, lz4-nomt not),
build policies, install scenarios + test_install.sh.
2026-10-22 04:26:50 -07:00
Yann Collet
518f56a4bd Avoid resetting make jobserver in submakes 2026-05-28 20:48:18 -07:00
Yann Collet
aa8694a11e make compilation uses multithreading by default 2026-01-25 10:59:16 -08:00
Tomas Lopez
79a80135dd Fix typo 2025-05-30 14:28:32 -04:00
Yann Collet
6a65138bd8 update "make lib" from tests/
to not override CFLAGS required adjustment (+fPIC)
2025-05-05 18:51:19 -07:00
Yann Collet
55341797c3 changed way to add -fPIC 2025-05-05 17:53:56 -07:00
Yann Collet
191efabe60 dynamic library built with multiconf.make
on posix.

Windows build is more complex.
It's doubtful if it's worth forcing its integration within multiconf.make.
2025-05-05 17:33:38 -07:00
Yann Collet
fe679bf80d update multiconf.make 2025-05-05 16:36:27 -07:00
Yann Collet
c9c9bf8c12 added multiconf doc 2025-05-01 16:53:52 -07:00