223 Commits

Author SHA1 Message Date
Yann Collet
88f95e0678 trailingWhitespace test now provides the line number when test fails 2025-12-17 10:50:15 -08:00
Yann Collet
db36ccbeea fix DISPATCH=1 on non-x86 target
started by #1055, but it was insufficient:
the DISPATCH value would stay set to 1 when on the right side of `make`.

Also: displays a warning, so that users understand what is going on.
2025-07-28 08:51:52 -07:00
Christian Hesse
50c5ba6a93 make sure dispatch is unset when it does not apply
This allows to have it set explicitly without breaking anything on other
architectures.
2025-07-28 08:46:24 +02:00
Yann Collet
4d8655029c removed some clean stages
no longer necessary, since builds are guaranteed to be separated per flag set.

This in turns makes it possible to build multiple targets in parallel
with less risks of interference due to clean actions triggered in between.
2025-05-04 16:43:25 -07:00
Yann Collet
378ea520c5 dynamic library created with multiconf.make 2025-05-04 16:31:47 -07:00
Yann Collet
f0761f4d9a included clean_cache
no need to specify anything in user's Makefile,
clean_cache target is automatically invoked from `make clean`.
2025-05-04 14:06:19 -07:00
Yann Collet
b1ece5dcc4 more modular library link creation 2025-05-04 12:24:35 -07:00
Yann Collet
c87fc38d9d also support static_library 2025-05-04 12:08:38 -07:00
Yann Collet
0f13e0bee7 simplified fuzzer target
and added it back to clean:
since fuzzer target is conditional, hence it's not always part of clean_cache
2025-05-04 11:25:30 -07:00
Yann Collet
5790e919cc xxhsum32 can be compiled with DISPATCH enabled or disabled 2025-05-04 10:32:37 -07:00
Yann Collet
d8db540ede improve make build
- object files preserve their relative path
- correcly recompile xxhsum depending on DISPATCH value
2025-05-04 10:09:50 -07:00
Yann Collet
f20eec61ad added fuzzer target
now handle by multiconf.make
2025-05-03 15:56:44 -07:00
Yann Collet
22c6d81fc3 update Makefile
using multiconf.make
2025-05-03 15:22:30 -07:00
Yann Collet
7f96b04a18 move cmake scripts to build/cmake 2025-05-03 00:57:39 -07:00
Schell-HAR
e3edd4c4ef Update Makefile
added support for 64-bit ARM architecture
2025-02-05 11:48:11 +01:00
chitao1234
70533298f9 Fix 'make install' for xxhsum on Windows 2025-01-29 11:59:01 +08:00
Po-Chuan Hsieh
867e8752f3 Update MANDIR for FreeBSD
FreeBSD uses share/man/ rather than man/ now.

Reference:	https://cgit.freebsd.org/ports/tree/devel/xxhash/Makefile#n17
2025-01-04 19:35:30 +08:00
Yann Collet
67bba310c7 Merge pull request #987 from Cyan4973/libxxh_dispatch
LIBXXH_DISPATCH: control runtime vector dispatch in `libxxhash`
2024-12-26 20:06:57 -08:00
Yann Collet
9ff12f6797 control runtime dispatch in the library via separate variable LIBXXH_DISPATCH
disabled by default (in contrast with `DISPATCH`, which is enabled by default, for `xxhsum`).
2024-12-26 18:51:36 -08:00
Yann Collet
5dd119795e fix -Og test, by adding -DXXH_NO_INLINE_HINTS 2024-12-26 17:01:02 -08:00
Yann Collet
cfd77237e6 updated doc 2024-12-26 16:02:40 -08:00
Yann Collet
877d9e5092 enable runtime detection of vector extension on x86/64 target 2024-12-26 15:25:51 -08:00
Yann Collet
6c666adcdc xxhsum with auto-dispatch displays the locally detected vector extension
using command -V
ex: compiled as 64-bit x86 autoVec (AVX2 detected) little endian with GCC 13.3.0
2024-12-26 01:55:05 -08:00
Yann Collet
61509f29b4 added a test that can catch if any XXH64_ symbol is not inlined
even though XXH_INLINE_ALL is set
2024-12-04 11:13:54 -05:00
Yann Collet
33e28c84ec added --filelist command
equivalent to recently committed --files-from .
both commands are available.
2024-11-04 22:51:18 -08:00
Yann Collet
b0d6fad0f6 changed INSTALL_DIR into MAKE_DIR
INSTALL_DIR is apparently used by cmake:
https://cmake.org/cmake/help/latest/module/ExternalProject.html

fix #911
2024-01-19 11:08:24 -08:00
Nathaniel Brough
530e6623d2 Add fuzzing harness 2023-12-27 13:40:32 -08:00
Yann Collet
ee14620ae7 added tests for xxh3sum
and updated man pages.
2023-07-25 18:57:11 +02:00
Yann Collet
d0a58163c3 added xxh3sum symlink
dedicated to producing and checking XXH3_* checksums.
2023-07-25 18:46:34 +02:00
Yann Collet
ffb4565b3a add XXH3 GNU format
using XXH3_ prefix.

Can be used both to encode and check.
2023-07-25 03:01:02 +02:00
Yann Collet
90e54a21ea fixed minor conversion warning
and added runtime tests for collision tester.
2023-07-23 02:26:24 +02:00
Takayuki Matsuoka
e592478eea add: cli: --ignore-missing
- Add `--ignore-missing` option for `xxhsum`.
- Add test script `tests/cli-ignore-missing.sh` and related `Makefile` entries.
  - Note that we still don't have CLI test entry in our CI.

`xxhsum` returns failure exit code when

- `--ignore-missing` is presented.
- Checksum file is specified.
- But `XSUM_checkFile()` doesn't read actual file (may) due to `--ignore-missing`

If so, `xxhsum` reports `no file was verified` with failure exit code.

<details><summary>`--ignore-missing` related code in `digest.c`</summary>
- 2f1cffe07a/src/digest.c (L190-L191)
- 2f1cffe07a/src/digest.c (L362)
- 2f1cffe07a/src/digest.c (L380)
- 2f1cffe07a/src/digest.c (L506)
- 2f1cffe07a/src/digest.c (L978-L982)
- 2f1cffe07a/src/digest.c (L1236-L1240)
- 2f1cffe07a/src/digest.c (L1325-L1328)
- 2f1cffe07a/src/digest.c (L1429-L1431)
- 2f1cffe07a/src/digest.c (L1558-L1564)
</details>
2023-07-10 17:43:40 +09:00
Yann Collet
c234b940f0 Merge pull request #825 from easyaspi314/wasm128
Add WebAssembly SIMD128 implementation and Node.JS support
2023-07-09 22:21:00 -07:00
easyaspi314
4f092f2c62 Document NODE_JS, remove RUN_ENV hack, use proper -sNODERAWFS flag 2023-07-09 20:11:47 -04:00
Yann Collet
17bbdee42e Merge pull request #723 from ilya-fedin/fix-cmake-prefix
Fix double prefix when building with cmake
2023-06-24 22:01:57 -07:00
Takayuki Matsuoka
0691980f72 Add test for # comment lines 2023-06-17 20:37:02 +09:00
easyaspi314
207e2abcc9 Add some nodejs workarounds so make check works
- Link in `nodefs` and `noderawfs`
 - Use Node's `tty.isatty()` via inline JS instead of the broken libc `isatty()`
 - Used with `make NODE_JS=1`
2023-03-15 01:35:43 -04:00
Takayuki Matsuoka
25dfa1aab7 Add Makefile entry and gitignore for sanity_test
make check
Depends (invokes) test_sanity

make test_sanity
Invokes make -C tests test_sanity

make -C tests test_sanity
Create and execute tests/sanity_test

make -C tests sanity_test_vectors.h
Create and execute tests/sanity_test_vectors_generator.
It generates tests/sanity_test_vectors.h.
2023-03-11 22:28:04 +09:00
Takayuki Matsuoka
a09fd870c2 Fix: gcc -Og false positive warnings
See #810
2023-03-06 23:46:03 +09:00
Fabrice Fontaine
b7c91f761b Makefile: add install_libxxhash.includes target
Add install_libxxhash.includes to be able to install headers when
building and installing the static library

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-12-27 23:14:04 +01:00
Ilya Fedin
c5475408fd Fix double prefix when building with cmake 2022-09-02 18:37:06 +04:00
Yann Collet
c4359b17db Merge pull request #730 from t-mat/fix-issue-724
Fix issue #724
2022-07-29 23:41:47 +02:00
Takayuki Matsuoka
7a9ff01710 Add test-xxh-nnn-sums to test-all 2022-07-30 05:27:08 +09:00
Takayuki Matsuoka
06061c985a Add tests 2022-07-30 05:19:15 +09:00
Takayuki Matsuoka
051276a4bd Fix: brace expansion
Since GNU make invokes `shell` by default, it doesn't support brace expansion.
This changeset expands the braces to fix the issue.
2022-07-30 04:18:53 +09:00
Takayuki Matsuoka
f1f2ff9133 Add test script and Makefile entry for filename escape 2022-04-04 19:53:17 +09:00
easyaspi314 (Devin)
6f97097934 Introduce XXH_SIZE_OPT and XXH_NO_STREAM
- XXH_SIZE_OPT is a value from 0-2 which indicates how much xxHash
   should care about code size, default 1 for -Os/-Oz, default 0
   otherwise
 - XXH_NO_STREAM disables the streaming API.
 - These two interact: if XXH_SIZE_OPT == 2 and XXH_NO_STREAM is not
 defined, XXH32 and XXH64 use the streaming API for single shot
    - TODO: apply this to XXH3 as well
2021-12-22 22:40:57 -05:00
Fabrice Fontaine
0e7418bce8 Makefile: add dedicated install targets
Add dedicated install targets to allow the user to install only xxhsum,
the static library, the shared library, etc.

This is especially useful on embedded systems where dynamic library is
not always supported by toolchains

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-12-15 22:21:38 +01:00
Yann Collet
d857cca62e improved nostdlib test 2021-12-11 12:06:59 -08:00
Yann Collet
6d78332def new build macro XXH_NO_STDLIB
ensures there is no usage / invocation of <stdlib.h> within libxxhash
at the expense of `XXH*_createState()` functions, which always return `NULL`.
This is not a concern when state is allocated statically,
or when one-short functions (like `XXH64()`) are used.
2021-12-08 14:52:55 -08:00