1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00
Commit Graph

35 Commits

Author SHA1 Message Date
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