-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
gh-130213: update hacl_star_rev to 322f6d58290e0ed7f4ecb84fcce12917aa0f594b #130960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
02f3ebe
94bcca9
5db43ba
75edcdd
35052e8
427dfab
6968b93
e5b9dcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,10 +120,6 @@ $sed -i 's!#include "fstar_uint128_struct_endianness.h"!#include "krml/fstar_uin | |
# use KRML_VERIFIED_UINT128 | ||
$sed -i -z 's!#define KRML_TYPES_H!#define KRML_TYPES_H\n#define KRML_VERIFIED_UINT128!g' include/krml/internal/types.h | ||
|
||
# FStar_UInt_8_16_32_64 contains definitions useful in the general case, but not | ||
# for us; trim! | ||
$sed -i -z 's!\(extern\|typedef\)[^;]*;\n\n!!g' include/krml/FStar_UInt_8_16_32_64.h | ||
|
||
# This contains static inline prototypes that are defined in | ||
# FStar_UInt_8_16_32_64; they are by default repeated for safety of separate | ||
# compilation, but this is not necessary. | ||
|
@@ -132,13 +128,6 @@ $sed -i 's!#include.*Hacl_Krmllib.h"!!g' "${all_files[@]}" | |
# Use globally unique names for the Hacl_ C APIs to avoid linkage conflicts. | ||
$sed -i -z 's!#include <string.h>!#include <string.h>\n#include "python_hacl_namespaces.h"!' Hacl_Hash_*.h | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without removing the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you might have the evil core.autocrlf setting set to true, in which case git will rewrite the files to have windows-style line endings -- in any case, good to change the sed 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I thought so, too, but in WSL I have Unix-style endings (there I did run So this change is good either way? Great :) |
||
|
||
# Finally, we remove a bunch of ifdefs from target.h that are, again, useful in | ||
# the general case, but not exercised by the subset of HACL* that we vendor. | ||
$sed -z -i 's!#ifndef KRML_\(HOST_TIME\)\n\(\n\|# [^\n]*\n\|[^#][^\n]*\n\)*#endif\n\n!!g' include/krml/internal/target.h | ||
$sed -z -i 's!\n\n\([^#][^\n]*\n\)*#define KRML_\(EABORT\|EXIT\)[^\n]*\(\n [^\n]*\)*!!g' include/krml/internal/target.h | ||
$sed -z -i 's!\n\n\([^#][^\n]*\n\)*#if [^\n]*\n\( [^\n]*\n\)*#define KRML_\(EABORT\|EXIT\|CHECK_SIZE\)[^\n]*\(\n [^\n]*\)*!!g' include/krml/internal/target.h | ||
$sed -z -i 's!\n\n\([^#][^\n]*\n\)*#if [^\n]*\n\( [^\n]*\n\)*# define _\?KRML_\(DEPRECATED\|HOST_SNPRINTF\)[^\n]*\n\([^#][^\n]*\n\|#el[^\n]*\n\|# [^\n]*\n\)*#endif!!g' include/krml/internal/target.h | ||
gpshead marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Step 3: trim whitespace (for the linter) | ||
|
||
find . -name '*.c' -or -name '*.h' | xargs $sed -i 's![[:space:]]\+$!!' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As suggested py @msprotz, let's go here with
KRML_VERIFIED_UINT128
and do not usefstar_uint128_{gcc64,msvc.h}
for now.