| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 492e3e6 commit 5f2ba15
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -227,17 +227,12 @@ ENSUREPIP= @ENSUREPIP@ | |||
| 227 | 227 | # Internal static libraries | |
| 228 | 228 | LIBMPDEC_A= Modules/_decimal/libmpdec/libmpdec.a | |
| 229 | 229 | LIBEXPAT_A= Modules/expat/libexpat.a | |
| 230 | - LIBHACL_MD5_A= Modules/_hacl/libHacl_Hash_MD5.a | ||
| 231 | - LIBHACL_SHA1_A= Modules/_hacl/libHacl_Hash_SHA1.a | ||
| 232 | - LIBHACL_SHA2_A= Modules/_hacl/libHacl_Hash_SHA2.a | ||
| 233 | - LIBHACL_SHA3_A= Modules/_hacl/libHacl_Hash_SHA3.a | ||
| 234 | - LIBHACL_BLAKE2_A= Modules/_hacl/libHacl_Hash_Blake2.a | ||
| 235 | - LIBHACL_HMAC_A= Modules/_hacl/libHacl_HMAC.a | ||
| 230 | + | ||
| 231 | + # HACL* build configuration | ||
| 236 | 232 | LIBHACL_CFLAGS=@LIBHACL_CFLAGS@ | |
| 237 | - LIBHACL_SIMD128_FLAGS=@LIBHACL_SIMD128_FLAGS@ | ||
| 238 | - LIBHACL_SIMD256_FLAGS=@LIBHACL_SIMD256_FLAGS@ | ||
| 239 | - LIBHACL_SIMD128_OBJS=@LIBHACL_SIMD128_OBJS@ | ||
| 240 | - LIBHACL_SIMD256_OBJS=@LIBHACL_SIMD256_OBJS@ | ||
| 233 | + LIBHACL_LDFLAGS=@LIBHACL_LDFLAGS@ | ||
| 234 | + LIBHACL_BLAKE2_SIMD128_CFLAGS=@LIBHACL_SIMD128_FLAGS@ -DHACL_CAN_COMPILE_VEC128 | ||
| 235 | + LIBHACL_BLAKE2_SIMD256_CFLAGS=@LIBHACL_SIMD256_FLAGS@ -DHACL_CAN_COMPILE_VEC256 | ||
| 241 | 236 | ||
| 242 | 237 | # Module state, compiler flags and linker flags | |
| 243 | 238 | # Empty CFLAGS and LDFLAGS are omitted. | |
@@ -660,25 +655,40 @@ LIBEXPAT_HEADERS= \ | |||
| 660 | 655 | ||
| 661 | 656 | ########################################################################## | |
| 662 | 657 | # hashlib's HACL* library | |
| 658 | + # | ||
| 659 | + # On WASI, static build is required. | ||
| 660 | + # On other platforms, a shared library is used. | ||
| 663 | 661 | ||
| 664 | 662 | LIBHACL_MD5_OBJS= \ | |
| 665 | 663 | Modules/_hacl/Hacl_Hash_MD5.o | |
| 664 | + LIBHACL_MD5_LIB_STATIC=Modules/_hacl/libHacl_Hash_MD5.a | ||
| 665 | + LIBHACL_MD5_LIB_SHARED=$(LIBHACL_MD5_OBJS) | ||
| 666 | 666 | ||
| 667 | 667 | LIBHACL_SHA1_OBJS= \ | |
| 668 | 668 | Modules/_hacl/Hacl_Hash_SHA1.o | |
| 669 | + LIBHACL_SHA1_LIB_STATIC=Modules/_hacl/libHacl_Hash_SHA1.a | ||
| 670 | + LIBHACL_SHA1_LIB_SHARED=$(LIBHACL_SHA1_OBJS) | ||
| 669 | 671 | ||
| 670 | 672 | LIBHACL_SHA2_OBJS= \ | |
| 671 | 673 | Modules/_hacl/Hacl_Hash_SHA2.o | |
| 674 | + LIBHACL_SHA2_LIB_STATIC=Modules/_hacl/libHacl_Hash_SHA2.a | ||
| 675 | + LIBHACL_SHA2_LIB_SHARED=$(LIBHACL_SHA2_OBJS) | ||
| 672 | 676 | ||
| 673 | 677 | LIBHACL_SHA3_OBJS= \ | |
| 674 | 678 | Modules/_hacl/Hacl_Hash_SHA3.o | |
| 679 | + LIBHACL_SHA3_LIB_STATIC=Modules/_hacl/libHacl_Hash_SHA3.a | ||
| 680 | + LIBHACL_SHA3_LIB_SHARED=$(LIBHACL_SHA3_OBJS) | ||
| 675 | 681 | ||
| 682 | + LIBHACL_BLAKE2_SIMD128_OBJS=@LIBHACL_BLAKE2_SIMD128_OBJS@ | ||
| 683 | + LIBHACL_BLAKE2_SIMD256_OBJS=@LIBHACL_BLAKE2_SIMD256_OBJS@ | ||
| 676 | 684 | LIBHACL_BLAKE2_OBJS= \ | |
| 677 | 685 | Modules/_hacl/Hacl_Hash_Blake2s.o \ | |
| 678 | 686 | Modules/_hacl/Hacl_Hash_Blake2b.o \ | |
| 679 | 687 | Modules/_hacl/Lib_Memzero0.o \ | |
| 680 | - $(LIBHACL_SIMD128_OBJS) \ | ||
| 681 | - $(LIBHACL_SIMD256_OBJS) | ||
| 688 | + $(LIBHACL_BLAKE2_SIMD128_OBJS) \ | ||
| 689 | + $(LIBHACL_BLAKE2_SIMD256_OBJS) | ||
| 690 | + LIBHACL_BLAKE2_LIB_STATIC=Modules/_hacl/libHacl_Hash_BLAKE2.a | ||
| 691 | + LIBHACL_BLAKE2_LIB_SHARED=$(LIBHACL_BLAKE2_OBJS) | ||
| 682 | 692 | ||
| 683 | 693 | LIBHACL_HMAC_OBJS= \ | |
| 684 | 694 | Modules/_hacl/Hacl_HMAC.o \ | |
@@ -688,6 +698,8 @@ LIBHACL_HMAC_OBJS= \ | |||
| 688 | 698 | $(LIBHACL_SHA2_OBJS) \ | |
| 689 | 699 | $(LIBHACL_SHA3_OBJS) \ | |
| 690 | 700 | $(LIBHACL_BLAKE2_OBJS) | |
| 701 | + LIBHACL_HMAC_LIB_STATIC=Modules/_hacl/libHacl_HMAC.a | ||
| 702 | + LIBHACL_HMAC_LIB_SHARED=$(LIBHACL_HMAC_OBJS) | ||
| 691 | 703 | ||
| 692 | 704 | LIBHACL_HEADERS= \ | |
| 693 | 705 | Modules/_hacl/include/krml/FStar_UInt128_Verified.h \ | |
@@ -732,7 +744,6 @@ LIBHACL_BLAKE2_HEADERS= \ | |||
| 732 | 744 | Modules/_hacl/internal/Hacl_Impl_Blake2_Constants.h \ | |
| 733 | 745 | Modules/_hacl/internal/Hacl_Hash_Blake2s_Simd128.h \ | |
| 734 | 746 | Modules/_hacl/internal/Hacl_Hash_Blake2b_Simd256.h \ | |
| 735 | - Modules/_hacl/internal/Hacl_Streaming_Types.h \ | ||
| 736 | 747 | $(LIBHACL_HEADERS) | |
| 737 | 748 | ||
| 738 | 749 | LIBHACL_HMAC_HEADERS= \ | |
@@ -1461,74 +1472,72 @@ $(LIBEXPAT_A): $(LIBEXPAT_OBJS) | |||
| 1461 | 1472 | $(AR) $(ARFLAGS) $@ $(LIBEXPAT_OBJS) | |
| 1462 | 1473 | ||
| 1463 | 1474 | ########################################################################## | |
| 1464 | - # Build HACL* static libraries for hashlib and HACL* HMAC. | ||
| 1475 | + # HACL* library build | ||
| 1476 | + # | ||
| 1477 | + # The HACL* modules are dynamically compiled and linked with the | ||
| 1478 | + # corresponding CPython built-in modules on demand, depending on | ||
| 1479 | + # whether the module is built or not. | ||
| 1465 | 1480 | # | |
| 1466 | - # The contents of libHacl_Blake2.a vary depending on whether we | ||
| 1467 | - # have the ability to compile vectorized versions | ||
| 1481 | + # In particular, the HACL* objects are also dependencies of the | ||
| 1482 | + # corresponding C extension modules but makesetup must NOT create | ||
| 1483 | + # a rule for them. | ||
| 1484 | + # | ||
| 1485 | + # For WASI, static linking is needed and HACL* is statically linked instead. | ||
| 1486 | + | ||
| 1487 | + Modules/_hacl/Lib_Memzero0.o: $(srcdir)/Modules/_hacl/Lib_Memzero0.c $(LIBHACL_HEADERS) | ||
| 1488 | + $(CC) -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Lib_Memzero0.c | ||
| 1468 | 1489 | ||
| 1469 | 1490 | Modules/_hacl/Hacl_Hash_MD5.o: $(srcdir)/Modules/_hacl/Hacl_Hash_MD5.c $(LIBHACL_MD5_HEADERS) | |
| 1470 | 1491 | $(CC) -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_MD5.c | |
| 1471 | - | ||
| 1472 | - $(LIBHACL_MD5_A): $(LIBHACL_MD5_OBJS) | ||
| 1492 | + $(LIBHACL_MD5_LIB_STATIC): $(LIBHACL_MD5_OBJS) | ||
| 1473 | 1493 | -rm -f $@ | |
| 1474 | 1494 | $(AR) $(ARFLAGS) $@ $(LIBHACL_MD5_OBJS) | |
| 1475 | 1495 | ||
| 1476 | 1496 | Modules/_hacl/Hacl_Hash_SHA1.o: $(srcdir)/Modules/_hacl/Hacl_Hash_SHA1.c $(LIBHACL_SHA1_HEADERS) | |
| 1477 | 1497 | $(CC) -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_SHA1.c | |
| 1478 | - | ||
| 1479 | - $(LIBHACL_SHA1_A): $(LIBHACL_SHA1_OBJS) | ||
| 1498 | + $(LIBHACL_SHA1_LIB_STATIC): $(LIBHACL_SHA1_OBJS) | ||
| 1480 | 1499 | -rm -f $@ | |
| 1481 | 1500 | $(AR) $(ARFLAGS) $@ $(LIBHACL_SHA1_OBJS) | |
| 1482 | 1501 | ||
| 1483 | 1502 | Modules/_hacl/Hacl_Hash_SHA2.o: $(srcdir)/Modules/_hacl/Hacl_Hash_SHA2.c $(LIBHACL_SHA2_HEADERS) | |
| 1484 | 1503 | $(CC) -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_SHA2.c | |
| 1485 | - | ||
| 1486 | - $(LIBHACL_SHA2_A): $(LIBHACL_SHA2_OBJS) | ||
| 1504 | + $(LIBHACL_SHA2_LIB_STATIC): $(LIBHACL_SHA2_OBJS) | ||
| 1487 | 1505 | -rm -f $@ | |
| 1488 | 1506 | $(AR) $(ARFLAGS) $@ $(LIBHACL_SHA2_OBJS) | |
| 1489 | 1507 | ||
| 1490 | 1508 | Modules/_hacl/Hacl_Hash_SHA3.o: $(srcdir)/Modules/_hacl/Hacl_Hash_SHA3.c $(LIBHACL_SHA3_HEADERS) | |
| 1491 | 1509 | $(CC) -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_SHA3.c | |
| 1492 | - | ||
| 1493 | - $(LIBHACL_SHA3_A): $(LIBHACL_SHA3_OBJS) | ||
| 1510 | + $(LIBHACL_SHA3_LIB_STATIC): $(LIBHACL_SHA3_OBJS) | ||
| 1494 | 1511 | -rm -f $@ | |
| 1495 | 1512 | $(AR) $(ARFLAGS) $@ $(LIBHACL_SHA3_OBJS) | |
| 1496 | 1513 | ||
| 1497 | 1514 | Modules/_hacl/Hacl_Hash_Blake2s.o: $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2s.c $(LIBHACL_BLAKE2_HEADERS) | |
| 1498 | 1515 | $(CC) -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2s.c | |
| 1499 | - | ||
| 1500 | 1516 | Modules/_hacl/Hacl_Hash_Blake2b.o: $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2b.c $(LIBHACL_BLAKE2_HEADERS) | |
| 1501 | 1517 | $(CC) -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2b.c | |
| 1502 | - | ||
| 1503 | 1518 | Modules/_hacl/Hacl_Hash_Blake2s_Simd128.o: $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c $(LIBHACL_BLAKE2_HEADERS) | |
| 1504 | - $(CC) -c $(LIBHACL_CFLAGS) $(LIBHACL_SIMD128_FLAGS) -DHACL_CAN_COMPILE_VEC128 -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c | ||
| 1505 | - | ||
| 1519 | + $(CC) -c $(LIBHACL_CFLAGS) $(LIBHACL_BLAKE2_SIMD128_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2s_Simd128.c | ||
| 1506 | 1520 | Modules/_hacl/Hacl_Hash_Blake2s_Simd128_universal2.o: $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2s_Simd128_universal2.c $(LIBHACL_BLAKE2_HEADERS) | |
| 1507 | - $(CC) -c $(LIBHACL_CFLAGS) $(LIBHACL_SIMD128_FLAGS) -DHACL_CAN_COMPILE_VEC128 -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2s_Simd128_universal2.c | ||
| 1508 | - | ||
| 1521 | + $(CC) -c $(LIBHACL_CFLAGS) $(LIBHACL_BLAKE2_SIMD128_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2s_Simd128_universal2.c | ||
| 1509 | 1522 | Modules/_hacl/Hacl_Hash_Blake2b_Simd256.o: $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c $(LIBHACL_BLAKE2_HEADERS) | |
| 1510 | - $(CC) -c $(LIBHACL_CFLAGS) $(LIBHACL_SIMD256_FLAGS) -DHACL_CAN_COMPILE_VEC256 -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c | ||
| 1511 | - | ||
| 1523 | + $(CC) -c $(LIBHACL_CFLAGS) $(LIBHACL_BLAKE2_SIMD256_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2b_Simd256.c | ||
| 1512 | 1524 | Modules/_hacl/Hacl_Hash_Blake2b_Simd256_universal2.o: $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2b_Simd256_universal2.c $(LIBHACL_BLAKE2_HEADERS) | |
| 1513 | - $(CC) -c $(LIBHACL_CFLAGS) $(LIBHACL_SIMD256_FLAGS) -DHACL_CAN_COMPILE_VEC256 -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2b_Simd256_universal2.c | ||
| 1514 | - | ||
| 1515 | - Modules/_hacl/Lib_Memzero0.o: $(srcdir)/Modules/_hacl/Lib_Memzero0.c $(LIBHACL_BLAKE2_HEADERS) | ||
| 1516 | - $(CC) -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Lib_Memzero0.c | ||
| 1517 | - | ||
| 1518 | - $(LIBHACL_BLAKE2_A): $(LIBHACL_BLAKE2_OBJS) | ||
| 1525 | + $(CC) -c $(LIBHACL_CFLAGS) $(LIBHACL_BLAKE2_SIMD256_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Hash_Blake2b_Simd256_universal2.c | ||
| 1526 | + $(LIBHACL_BLAKE2_LIB_STATIC): $(LIBHACL_BLAKE2_OBJS) | ||
| 1519 | 1527 | -rm -f $@ | |
| 1520 | 1528 | $(AR) $(ARFLAGS) $@ $(LIBHACL_BLAKE2_OBJS) | |
| 1521 | 1529 | ||
| 1530 | + # Other HACL* cryptographic primitives | ||
| 1531 | + | ||
| 1522 | 1532 | Modules/_hacl/Hacl_HMAC.o: $(srcdir)/Modules/_hacl/Hacl_HMAC.c $(LIBHACL_HMAC_HEADERS) | |
| 1523 | 1533 | $(CC) -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_HMAC.c | |
| 1524 | - | ||
| 1525 | 1534 | Modules/_hacl/Hacl_Streaming_HMAC.o: $(srcdir)/Modules/_hacl/Hacl_Streaming_HMAC.c $(LIBHACL_HMAC_HEADERS) | |
| 1526 | 1535 | $(CC) -Wno-unused-variable -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Streaming_HMAC.c | |
| 1527 | - | ||
| 1528 | - $(LIBHACL_HMAC_A): $(LIBHACL_HMAC_OBJS) | ||
| 1536 | + $(LIBHACL_HMAC_LIB_STATIC): $(LIBHACL_HMAC_OBJS) | ||
| 1529 | 1537 | -rm -f $@ | |
| 1530 | 1538 | $(AR) $(ARFLAGS) $@ $(LIBHACL_HMAC_OBJS) | |
| 1531 | 1539 | ||
| 1540 | + ########################################################################## | ||
| 1532 | 1541 | # create relative links from build/lib.platform/egg.so to Modules/egg.so | |
| 1533 | 1542 | # pybuilddir.txt is created too late. We cannot use it in Makefile | |
| 1534 | 1543 | # targets. ln --relative is not portable. | |
@@ -3302,12 +3311,21 @@ MODULE__DECIMAL_DEPS=$(srcdir)/Modules/_decimal/docstrings.h @LIBMPDEC_INTERNAL@ | |||
| 3302 | 3311 | MODULE__ELEMENTTREE_DEPS=$(srcdir)/Modules/pyexpat.c @LIBEXPAT_INTERNAL@ | |
| 3303 | 3312 | MODULE__HASHLIB_DEPS=$(srcdir)/Modules/hashlib.h | |
| 3304 | 3313 | MODULE__IO_DEPS=$(srcdir)/Modules/_io/_iomodule.h | |
| 3305 | - MODULE__MD5_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_MD5_HEADERS) $(LIBHACL_MD5_A) | ||
| 3306 | - MODULE__SHA1_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_SHA1_HEADERS) $(LIBHACL_SHA1_A) | ||
| 3307 | - MODULE__SHA2_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_SHA2_HEADERS) $(LIBHACL_SHA2_A) | ||
| 3308 | - MODULE__SHA3_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_SHA3_HEADERS) $(LIBHACL_SHA3_A) | ||
| 3309 | - MODULE__BLAKE2_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_BLAKE2_HEADERS) $(LIBHACL_BLAKE2_A) | ||
| 3310 | - MODULE__HMAC_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_HMAC_HEADERS) $(LIBHACL_HMAC_A) | ||
| 3314 | + | ||
| 3315 | + # HACL*-based cryptographic primitives | ||
| 3316 | + MODULE__MD5_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_MD5_HEADERS) $(LIBHACL_MD5_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3317 | + MODULE__MD5_LDEPS=$(LIBHACL_MD5_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3318 | + MODULE__SHA1_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_SHA1_HEADERS) $(LIBHACL_SHA1_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3319 | + MODULE__SHA1_LDEPS=$(LIBHACL_SHA1_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3320 | + MODULE__SHA2_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_SHA2_HEADERS) $(LIBHACL_SHA2_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3321 | + MODULE__SHA2_LDEPS=$(LIBHACL_SHA2_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3322 | + MODULE__SHA3_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_SHA3_HEADERS) $(LIBHACL_SHA3_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3323 | + MODULE__SHA3_LDEPS=$(LIBHACL_SHA3_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3324 | + MODULE__BLAKE2_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_BLAKE2_HEADERS) $(LIBHACL_BLAKE2_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3325 | + MODULE__BLAKE2_LDEPS=$(LIBHACL_BLAKE2_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3326 | + MODULE__HMAC_DEPS=$(srcdir)/Modules/hashlib.h $(LIBHACL_HMAC_HEADERS) $(LIBHACL_HMAC_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3327 | + MODULE__HMAC_LDEPS=$(LIBHACL_HMAC_LIB_@LIBHACL_LDEPS_LIBTYPE@) | ||
| 3328 | + | ||
| 3311 | 3329 | MODULE__SOCKET_DEPS=$(srcdir)/Modules/socketmodule.h $(srcdir)/Modules/addrinfo.h $(srcdir)/Modules/getaddrinfo.c $(srcdir)/Modules/getnameinfo.c | |
| 3312 | 3330 | MODULE__SSL_DEPS=$(srcdir)/Modules/_ssl.h $(srcdir)/Modules/_ssl/cert.c $(srcdir)/Modules/_ssl/debughelpers.c $(srcdir)/Modules/_ssl/misc.c $(srcdir)/Modules/_ssl_data_111.h $(srcdir)/Modules/_ssl_data_300.h $(srcdir)/Modules/socketmodule.h | |
| 3313 | 3331 | MODULE__TESTCAPI_DEPS=$(srcdir)/Modules/_testcapi/parts.h $(srcdir)/Modules/_testcapi/util.h | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,6 +16,9 @@ | |||
| 16 | 16 | # generated by PY_STDLIB_MOD macro. | |
| 17 | 17 | # * All source files automatically depend on $(PYTHON_HEADERS) and | |
| 18 | 18 | # $(MODULE_{NAME}_DEPS). | |
| 19 | + # * ${NAME}$(EXT_SUFFIX) rules automatically depend on $(MODULE_{NAME}_LDEPS), | ||
| 20 | + # thus $(MODULE_{NAME}_LDEPS) must only contain Makefile rule names. To pass | ||
| 21 | + # specific values to the linker, use $(MODULE_{NAME}_LDFLAGS) instead. | ||
| 19 | 22 | # | |
| 20 | 23 | # See Modules/Setup and Modules/makesetup | |
| 21 | 24 | # | |
@@ -76,13 +79,23 @@ | |||
| 76 | 79 | # needs -lreadline or -ledit, sometimes termcap, termlib, or tinfo | |
| 77 | 80 | @MODULE_READLINE_TRUE@readline readline.c | |
| 78 | 81 | ||
| 79 | - # hashing builtins, can be disabled with --without-builtin-hashlib-hashes | ||
| 80 | - @MODULE__MD5_TRUE@_md5 md5module.c -I$(srcdir)/Modules/_hacl/include Modules/_hacl/libHacl_Hash_MD5.a -D_BSD_SOURCE -D_DEFAULT_SOURCE | ||
| 81 | - @MODULE__SHA1_TRUE@_sha1 sha1module.c -I$(srcdir)/Modules/_hacl/include Modules/_hacl/libHacl_Hash_SHA1.a -D_BSD_SOURCE -D_DEFAULT_SOURCE | ||
| 82 | - @MODULE__SHA2_TRUE@_sha2 sha2module.c -I$(srcdir)/Modules/_hacl/include Modules/_hacl/libHacl_Hash_SHA2.a -D_BSD_SOURCE -D_DEFAULT_SOURCE | ||
| 83 | - @MODULE__SHA3_TRUE@_sha3 sha3module.c -I$(srcdir)/Modules/_hacl/include Modules/_hacl/libHacl_Hash_SHA3.a -D_BSD_SOURCE -D_DEFAULT_SOURCE | ||
| 84 | - @MODULE__BLAKE2_TRUE@_blake2 blake2module.c -I$(srcdir)/Modules/_hacl/include Modules/_hacl/libHacl_Hash_Blake2.a -D_BSD_SOURCE -D_DEFAULT_SOURCE | ||
| 85 | - | ||
| 82 | + ############################################################################ | ||
| 83 | + # HACL*-based Cryptographic Primitives | ||
| 84 | + # | ||
| 85 | + # Since the compilation of the built-in cryptographic modules depends | ||
| 86 | + # on whether we are building on WASI or not, rules will be explicitly | ||
| 87 | + # written. In the future, it should be preferrable to be able to setup | ||
| 88 | + # the relevant bits here instead of in Makefile.pre.in or configure.ac. | ||
| 89 | + | ||
| 90 | + # Hash functions can be disabled with --without-builtin-hashlib-hashes. | ||
| 91 | + @MODULE__MD5_TRUE@_md5 md5module.c | ||
| 92 | + @MODULE__SHA1_TRUE@_sha1 sha1module.c | ||
| 93 | + @MODULE__SHA2_TRUE@_sha2 sha2module.c | ||
| 94 | + @MODULE__SHA3_TRUE@_sha3 sha3module.c | ||
| 95 | + @MODULE__BLAKE2_TRUE@_blake2 blake2module.c | ||
| 96 | + | ||
| 97 | + # Since HMAC is always supported, the HACL* implementation modules must | ||
| 98 | + # be built unconditionally. | ||
| 86 | 99 | @MODULE__HMAC_TRUE@_hmac hmacmodule.c | |
| 87 | 100 | ||
| 88 | 101 | ############################################################################ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,5 @@ | |||
| 1 | 1 | #include <inttypes.h> | |
| 2 | + #include "python_hacl_namespaces.h" | ||
| 2 | 3 | ||
| 3 | 4 | void Lib_Memzero0_memzero0(void *dst, uint64_t len); | |
| 4 | 5 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments