Skip to content

Commit

Permalink
mingw hidden attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
SashaZezulinsky committed Sep 30, 2021
1 parent 1127ba4 commit e8d9d90
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
if: ${{ matrix.platform == 'windows-latest' }}
shell: msys2 {0}
run: |
autoreconf --install && ./configure && make lib
autoreconf --install && ./configure && make all
- name: Upload
uses: actions/upload-artifact@v2
with:
Expand Down
17 changes: 14 additions & 3 deletions src/goldilocks_gen_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
#include <stdio.h>
#include <stdlib.h>

#include "field.h"
#include "include/field.h"
#include "f_field.h"
#include "goldilocks.h"
#include "api.h"
#include "public_include/goldilocks.h"
#include "include/api.h"

static const unsigned char base_point_ser_for_pregen[SER_BYTES] = {
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33
Expand Down Expand Up @@ -102,7 +102,12 @@ int main(int argc, char **argv) {
output = (const gf_s *)pre;
printf("const gf API_NS(precomputed_base_as_fe)[%d]\n",
(int)(API_NS(sizeof_precomputed_s) / sizeof(gf)));

#ifdef __MINGW32__
printf("VECTOR_ALIGNED = {\n ");
#else
printf("VECTOR_ALIGNED __attribute__((visibility(\"hidden\"))) = {\n ");
#endif

for (i=0; i < API_NS(sizeof_precomputed_s); i+=sizeof(gf)) {
if (i) printf(",\n ");
Expand All @@ -113,7 +118,13 @@ int main(int argc, char **argv) {
output = (const gf_s *)pre_wnaf;
printf("const gf API_NS(precomputed_wnaf_as_fe)[%d]\n",
(int)(API_NS(sizeof_precomputed_wnafs) / sizeof(gf)));

#ifdef __MINGW32__
printf("VECTOR_ALIGNED = {\n ");
#else
printf("VECTOR_ALIGNED __attribute__((visibility(\"hidden\"))) = {\n ");
#endif

for (i=0; i < API_NS(sizeof_precomputed_wnafs); i+=sizeof(gf)) {
if (i) printf(",\n ");
field_print(output++);
Expand Down

0 comments on commit e8d9d90

Please sign in to comment.