Skip to content

Commit 4efeb8a

Browse files
riptlripatel-fd
authored andcommitted
Fix build without deps
- Remove vm dependency on runtime (incorrect inverse dependency) - Remove useless test_shred_tile test - Add some missing FD_HAS_SECP256K1 guards
1 parent 46ac4f2 commit 4efeb8a

28 files changed

+117
-152
lines changed

src/app/firedancer-dev/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ fd_topo_run_tile_t * TILES[] = {
166166
&fd_tile_snapwr,
167167
&fd_tile_snapla,
168168
&fd_tile_snapls,
169+
# if FD_HAS_BZIP2
169170
&fd_tile_genesi,
171+
# endif
170172
&fd_tile_ipecho,
171173
&fd_tile_vinyl,
172174
&fd_tile_solcap,

src/app/firedancer/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ extern fd_topo_run_tile_t fd_tile_gui;
7272
extern fd_topo_run_tile_t fd_tile_rpc;
7373
extern fd_topo_run_tile_t fd_tile_plugin;
7474
extern fd_topo_run_tile_t fd_tile_bundle;
75+
#if FD_HAS_BZIP2
7576
extern fd_topo_run_tile_t fd_tile_genesi;
77+
#endif
7678
extern fd_topo_run_tile_t fd_tile_ipecho;
7779

7880
extern fd_topo_run_tile_t fd_tile_gossvf;
@@ -126,7 +128,9 @@ fd_topo_run_tile_t * TILES[] = {
126128
&fd_tile_snapwr,
127129
&fd_tile_snapla,
128130
&fd_tile_snapls,
131+
# if FD_HAS_BZIP2
129132
&fd_tile_genesi,
133+
# endif
130134
&fd_tile_ipecho,
131135
NULL,
132136
};

src/disco/net/xdp/Local.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ ifdef FD_HAS_ALLOCA
22
$(call add-objs,fd_xdp_tile,fd_disco)
33
ifdef FD_ARCH_SUPPORTS_SANDBOX
44
$(call make-unit-test,test_xdp_tile,test_xdp_tile,fd_disco fd_tango fd_waltz fd_util)
5+
ifdef FD_HAS_SECP256K1 # FIXME silly
56
$(call make-unit-test,test_xdp_tile1,test_xdp_tile1,fdctl_shared fdctl_platform fd_disco fd_flamenco fd_ballet fd_tango fd_waltz fd_reedsol fd_funk fd_util)
67
$(call run-unit-test,test_xdp_tile)
78
endif
89
endif
10+
endif

src/disco/pack/Local.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ $(call make-unit-test,test_pack,test_pack,fd_disco fd_ballet fd_util)
2222
$(call run-unit-test,test_pack)
2323
endif
2424
ifdef FD_ARCH_SUPPORTS_SANDBOX
25+
ifdef FD_HAS_SECP256K1 # FIXME silly
2526
$(call make-unit-test,test_pack_tile,test_pack_tile,fdctl_shared fdctl_platform fd_disco fd_flamenco fd_ballet fd_tango fd_waltz fd_reedsol fd_funk fd_util)
2627
endif
2728
endif
29+
endif

src/disco/shred/Local.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ ifdef FD_HAS_ALLOCA
66
$(call add-objs,fd_shred_tile,fd_disco)
77
endif
88
$(call make-unit-test,test_shred_dest,test_shred_dest,fd_disco fd_flamenco fd_ballet fd_util)
9-
ifdef FD_ARCH_SUPPORTS_SANDBOX
10-
$(call make-unit-test,test_shred_tile,test_shred_tile,fdctl_shared fdctl_platform fd_disco fd_flamenco fd_ballet fd_tango fd_waltz fd_reedsol fd_funk fd_util)
11-
endif
129
$(call make-unit-test,test_fec_resolver,test_fec_resolver,fd_flamenco fd_disco fd_ballet fd_util fd_tango fd_reedsol)
1310
$(call make-unit-test,test_stake_ci,test_stake_ci,fd_disco fd_flamenco fd_ballet fd_util fd_tango fd_reedsol)
1411
$(call run-unit-test,test_shred_dest,)

src/disco/shred/test_shred_tile.c

Lines changed: 0 additions & 68 deletions
This file was deleted.

src/discof/genesis/fd_genesi_tile.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "fd_genesis_client.h"
55
#include "../../disco/topo/fd_topo.h"
66
#include "../../ballet/sha256/fd_sha256.h"
7-
#include "../../flamenco/runtime/fd_txn_account.h"
87
#include "../../flamenco/accdb/fd_accdb_admin.h"
98
#include "../../flamenco/accdb/fd_accdb_impl_v1.h"
109
#include "../../flamenco/runtime/fd_hashes.h"

src/flamenco/progcache/Local.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ $(call add-objs,fd_prog_load,fd_flamenco)
66
$(call add-hdrs,fd_progcache_admin.h)
77
$(call add-objs,fd_progcache_admin,fd_flamenco)
88

9-
ifdef FD_HAS_SECP256K1
109
$(call add-hdrs,fd_progcache_user.h)
1110
$(call add-objs,fd_progcache_user,fd_flamenco)
1211

12+
ifdef FD_HAS_SECP256K1
1313
$(call make-unit-test,test_progcache,test_progcache,fd_flamenco fd_funk fd_ballet fd_util)
1414
$(call run-unit-test,test_progcache)
15+
endif
1516

1617
ifdef FD_HAS_RACESAN
1718
$(call make-unit-test,test_progcache_racesan,test_progcache_racesan,fd_flamenco fd_funk fd_ballet fd_util)
@@ -20,4 +21,3 @@ endif
2021

2122
# Internals
2223
$(call add-objs,fd_progcache_rec,fd_flamenco)
23-
endif

src/flamenco/progcache/fd_progcache_user.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ fd_progcache_push( fd_progcache_t * cache,
409409
return 1;
410410
}
411411

412+
#if FD_HAS_ATOMIC
413+
412414
static int
413415
fd_progcache_txn_try_lock( fd_funk_txn_t * txn ) {
414416
for(;;) {
@@ -421,6 +423,19 @@ fd_progcache_txn_try_lock( fd_funk_txn_t * txn ) {
421423
}
422424
}
423425

426+
#else
427+
428+
static int
429+
fd_progcache_txn_try_lock( fd_funk_txn_t * txn ) {
430+
ushort * lock = &txn->lock->value;
431+
ushort value = FD_VOLATILE_CONST( *lock );
432+
if( FD_UNLIKELY( value>=0xFFFE ) ) return 0; /* txn is write-locked */
433+
*lock = value + 1;
434+
return 1; /* transaction now read-locked */
435+
}
436+
437+
#endif
438+
424439
static void
425440
fd_progcache_txn_unlock( fd_funk_txn_t * txn ) {
426441
if( !txn ) return;

src/flamenco/runtime/fd_runtime.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,13 +1857,3 @@ fd_account_meta_checked_sub_lamports( fd_account_meta_t * meta, ulong lamports )
18571857
meta->lamports = balance_post;
18581858
return FD_EXECUTOR_INSTR_SUCCESS;
18591859
}
1860-
1861-
void
1862-
fd_account_meta_resize( fd_account_meta_t * meta,
1863-
ulong dlen ) {
1864-
ulong old_sz = meta->dlen;
1865-
ulong new_sz = dlen;
1866-
ulong memset_sz = fd_ulong_sat_sub( new_sz, old_sz );
1867-
fd_memset( fd_account_data( meta ) + old_sz, 0, memset_sz );
1868-
meta->dlen = (uint)dlen;
1869-
}

0 commit comments

Comments
 (0)