Frank Denis
d3f165405f
Revert "Try changing the target for every lib"
...
This reverts commit 45ee1c31b8
.
2024-04-27 00:51:10 +02:00
Frank Denis
be7c9c2f51
Revert "Do not install CPU-specific libs"
...
This reverts commit e6b1f1c9f2
.
2024-04-27 00:50:57 +02:00
Frank Denis
e6b1f1c9f2
Do not install CPU-specific libs
2024-04-26 15:26:09 +02:00
Frank Denis
45ee1c31b8
Try changing the target for every lib
2024-04-26 15:21:10 +02:00
Frank Denis
9b369db0d5
Zig build: enable CPU-specific flags only on relevant files
...
Fixes https://github.com/jedisct1/libsodium/discussions/1358
2024-04-26 13:50:49 +02:00
Frank Denis
f8ca998c52
Update for zig-current
2024-04-08 21:16:26 +02:00
Frank Denis
3990da5802
Update for zig-master
2024-01-04 12:07:16 +01:00
Frank Denis
6d906294c9
Set .iterate = true on dirs that will be traversed
2023-11-24 14:54:56 +01:00
Frank Denis
547dde9387
Require Zig 0.12
2023-11-24 13:52:42 +01:00
Frank Denis
5dd81ad0cd
Zig: use "const" for variables that are never mutated
2023-11-20 18:58:50 +01:00
Frank Denis
6c05a64bfe
Zig 0.12 compat
2023-11-02 06:51:29 +01:00
Frank Denis
cb4d121517
Try to support both zig 0.11 and zig-master
2023-10-20 12:33:25 +02:00
Frank Denis
9ff9301465
Update for Zig-master
2023-10-16 18:07:55 +02:00
Frank Denis
ec27581dd3
build.zig: predefine some CPU features
...
Eventually, we should compile files depending on specific CPU
extensions separately, like what regular Makefiles are doing.
2023-09-11 00:07:44 +02:00
Frank Denis
0a44a9eb73
Enable more SIMD optimizations when using Zig
2023-09-09 20:38:53 +02:00
Fergus Baker
5191b40acc
Allow other zig projects to use libsodium as a dependency ( #1300 )
...
* fix(build.zig): derive cwd from builder
Using fs.cwd() only resolves the libsodium directory when building from
within libsodium. Deriving the absolute path to the libsodium directory
from the builder allows the build script to be invoked from other
projects.
* feat(build.zig): add options for building libsodium
Added the options to build either the static, shared, and/or tests. The
tests depend on the static library, and therefore imply the static
library.
* feat(build.zig): include header files
2023-09-09 00:39:15 +02:00
Frank Denis
4c8367de7f
Reorder
2023-08-05 11:08:32 +02:00
Frank Denis
22815d222c
Only create a shared library where we know it works
2023-08-05 11:07:20 +02:00
Frank Denis
1c2398fb7c
Build shared libraries again, even on Windows
2023-08-05 10:38:54 +02:00
Frank Denis
71b92ae78b
Update for zig 0.11
2023-08-03 07:41:50 +02:00
Frank Denis
004c8bee84
Define HAVE_CET_H for zig cc
2023-07-21 05:48:23 +02:00
Frank Denis
c341b85969
Update build.zig
2023-07-18 17:51:34 +02:00
Frank Denis
d787d2b1cf
Define SODIUM_STATIC for static builds on Windows
...
Fixes #1278
2023-04-27 08:21:13 +02:00
Frank Denis
adcde0ca4e
Update for zig-master
2023-04-12 12:58:37 +02:00
Frank Denis
da1be5bf55
build.zig: build only static libraries
2023-03-01 17:04:21 +01:00
Frank Denis
bb2ee2359f
Update for Zig 0.11
2023-02-16 21:59:29 +01:00
Frank Denis
05b8da1a49
Use CLOCK_MONOTONIC for benchmarking, if possible
2023-02-15 19:42:08 +01:00
Frank Denis
9cd9a0d120
On Windows, a ".LIB" file can be either shared or static
...
We were overwriting the static library with the shared one.
2023-01-18 22:13:29 +01:00
Frank Denis
e0f6d836a3
Add the ability to convert tests into benchmarks
2022-12-17 21:36:51 +01:00
Frank Denis
fb01eda660
Don't built shared library for WASI
2022-12-17 20:17:50 +01:00
Frank Denis
e484cf4959
build.zig: require at least SSE4.1 when targeting x86_64
2022-11-27 22:42:29 +01:00
Frank Denis
b0a4ef1939
getentropy() didn't exist on old glibc versions
2022-11-27 22:02:39 +01:00
Frank Denis
a3a9773516
getrandom() didn't exist on ancient glibc versions
2022-11-27 22:01:20 +01:00
Frank Denis
520592d38b
Tests: disable LTO, strip
2022-11-27 21:49:35 +01:00
Frank Denis
e474a5475c
Windows doesn't have getpid()
2022-11-27 21:27:07 +01:00
Frank Denis
f40cb1e142
build.zig: define a few OS-specific feature macros
2022-11-27 21:10:10 +01:00
Frank Denis
71c7aa0975
Add a simple test runner to zig-out/bin/
2022-11-23 21:37:20 +01:00
Frank Denis
195e98af39
build.zig: statically compile and install all the tests
2022-11-23 21:17:21 +01:00
Frank Denis
77c676a9e1
Zig build: enable ARM Crypto
2022-11-13 20:50:27 +01:00
Frank Denis
ee11a1ff8a
Update build.zig for Zig-current
2022-10-20 14:42:39 +02:00
Frank Denis
a0058a7623
Strip builds
2022-06-07 17:35:41 +02:00
Frank Denis
94100e5920
build.zig: build both static and shared versions, copy version file
2022-04-28 18:19:02 -07:00
Frank Denis
be7c15b23b
build.zig remove ASM_BUILD_SYMBOL
2022-04-28 17:46:37 -07:00
Frank Denis
826b7d2a10
Compile assembly files
2021-11-10 15:40:20 +01:00
Frank Denis
620d4529b6
Strip non-debug builds
2021-11-10 15:35:22 +01:00
Frank Denis
91340df7a0
Correct target library name
2021-11-10 15:33:37 +01:00
Frank Denis
1329ba8ad8
Remove duplicate definition
2021-11-10 15:31:59 +01:00
Frank Denis
59b869b356
Add preliminary build.zig file
2021-11-10 15:31:32 +01:00