Skip to content

Commit

Permalink
build: reorg the no-solana extra
Browse files Browse the repository at this point in the history
  • Loading branch information
CantelopePeel authored and lheeger-jump committed May 2, 2024
1 parent dae6322 commit 7007b35
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 48 deletions.
2 changes: 1 addition & 1 deletion config/everything.mk
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ make-bin-rust = $(eval $(call _make-exe,$(1),$(2),$(3),rust,bin,$(4)))
make-shared = $(eval $(call _make-exe,$(1),$(2),$(3),lib,lib,-shared $(4)))
make-unit-test = $(eval $(call _make-exe,$(1),$(2),$(3),unit-test,unit-test,$(4)))
run-unit-test = $(eval $(call _run-unit-test,$(1)))
make-integration-test = $(eval $(call _make-exe,$(1),$(2),$(3),integration-test,integration-test))
make-integration-test = $(eval $(call _make-exe,$(1),$(2),$(3),integration-test,integration-test,$(4)))
run-integration-test = $(eval $(call _run-integration-test,$(1)))
make-fuzz-test = $(eval $(call _fuzz-test,$(1),$(2),$(3)))

Expand Down
13 changes: 9 additions & 4 deletions src/app/fdctl/Local.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ifdef FD_HAS_HOSTED
ifdef FD_HAS_ALLOCA
ifdef FD_HAS_DOUBLE
ifdef FD_HAS_SECP256K1

include src/app/fdctl/with-version.mk
$(info Using FIREDANCER_VERSION=$(FIREDANCER_VERSION_MAJOR).$(FIREDANCER_VERSION_MINOR).$(FIREDANCER_VERSION_PATCH))
Expand Down Expand Up @@ -41,7 +40,15 @@ $(call add-objs,configure/xdp,fd_fdctl)
$(call add-objs,configure/ethtool,fd_fdctl)
$(call add-objs,configure/workspace,fd_fdctl)

$(call make-bin-rust,fdctl,main,fd_fdctl fd_choreo fd_disco fd_flamenco fd_funk fd_quic fd_tls fd_ip fd_reedsol fd_ballet fd_waltz fd_tango fd_util solana_validator, $(SECP256K1_LIBS))
ifdef FD_HAS_NO_SOLANA
ifdef FD_HAS_SECP256K1
$(call make-lib,external_functions)
$(call add-objs,external_functions,external_functions)
$(call make-bin-rust,fdctl,main,fd_fdctl fd_choreo fd_disco fd_flamenco fd_funk fd_quic fd_tls fd_ip fd_reedsol fd_ballet fd_waltz fd_tango fd_util external_functions, $(SECP256K1_LIBS))
endif
else
$(call make-bin-rust,fdctl,main,fd_fdctl fd_disco fd_flamenco fd_funk fd_quic fd_tls fd_ip fd_reedsol fd_ballet fd_waltz fd_tango fd_util solana_validator)
endif
$(call make-unit-test,test_tiles_verify,run/tiles/test_verify,fd_ballet fd_tango fd_util)
$(call run-unit-test,test_tiles_verify)

Expand Down Expand Up @@ -109,5 +116,3 @@ solana: $(OBJDIR)/bin/solana $(OBJDIR)/bin/solana
endif
endif
endif
endif

36 changes: 36 additions & 0 deletions src/app/fdctl/external_functions.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#include "../../util/fd_util.h"


extern void fd_ext_validator_main( const char ** args FD_PARAM_UNUSED ) {}
extern void fd_ext_genesis_main( const char ** args FD_PARAM_UNUSED ) {}

extern void * fd_ext_bank_pre_balance_info( void const * bank FD_PARAM_UNUSED, void * txns FD_PARAM_UNUSED, ulong txn_cnt FD_PARAM_UNUSED ) { return NULL; }
extern void * fd_ext_bank_load_and_execute_txns( void const * bank FD_PARAM_UNUSED, void * txns FD_PARAM_UNUSED, ulong txn_cnt FD_PARAM_UNUSED, int * out_load_results FD_PARAM_UNUSED, int * out_executing_results FD_PARAM_UNUSED, int * out_executed_results FD_PARAM_UNUSED ) { return NULL; }
extern void fd_ext_bank_acquire( void const * bank FD_PARAM_UNUSED ) {}
extern void fd_ext_bank_release( void const * bank FD_PARAM_UNUSED ) {}
extern void fd_ext_bank_release_thunks( void * load_and_execute_output FD_PARAM_UNUSED ) {}
extern void fd_ext_bank_release_pre_balance_info( void * pre_balance_info FD_PARAM_UNUSED ) {}

extern void fd_ext_bank_commit_txns( void const * bank FD_PARAM_UNUSED, void const * txns FD_PARAM_UNUSED, ulong txn_cnt FD_PARAM_UNUSED, void * load_and_execute_output FD_PARAM_UNUSED, void * pre_balance_info FD_PARAM_UNUSED ) {}
extern void fd_ext_poh_signal_leader_change( void * sender FD_PARAM_UNUSED ) {}
extern void fd_ext_poh_register_tick( void const * bank FD_PARAM_UNUSED, uchar const * hash FD_PARAM_UNUSED ) {}

extern int
fd_ext_blockstore_insert_shreds( void const * blockstore FD_PARAM_UNUSED,
ulong shred_cnt FD_PARAM_UNUSED,
uchar const * shred_bytes FD_PARAM_UNUSED,
ulong shred_sz FD_PARAM_UNUSED,
ulong stride FD_PARAM_UNUSED ) { return 0; }

extern int
fd_ext_bank_sanitized_txn_load_addresess( void const * bank FD_PARAM_UNUSED,
void * address_table_lookups FD_PARAM_UNUSED,
ulong address_table_lookups_cnt FD_PARAM_UNUSED,
void * out_sidecar FD_PARAM_UNUSED ) { return 0; }

extern void
fd_ext_blockstore_create_block0( char const * ledger_path FD_PARAM_UNUSED,
ulong shred_cnt FD_PARAM_UNUSED,
uchar const * shred_bytes FD_PARAM_UNUSED,
ulong shred_sz FD_PARAM_UNUSED,
ulong stride FD_PARAM_UNUSED ) {}
13 changes: 7 additions & 6 deletions src/app/fddev/Local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ ifdef FD_HAS_HOSTED
ifdef FD_HAS_ALLOCA
ifdef FD_HAS_DOUBLE
ifdef FD_HAS_INT128
ifdef FD_HAS_SECP256K1

include src/app/fdctl/with-version.mk

Expand All @@ -24,9 +23,11 @@ $(call add-objs,configure/genesis,fd_fddev)
$(call add-objs,configure/blockstore,fd_fddev)

ifdef FD_HAS_NO_SOLANA
$(call make-bin-rust,fddev,main external_functions,fd_fdctl fd_fddev fd_choreo fd_disco fd_flamenco fd_funk fd_quic fd_tls fd_reedsol fd_ballet fd_waltz fd_tango fd_util, $(SECP256K1_LIBS))
ifdef FD_HAS_SECP256K1
$(call make-bin-rust,fddev,main,fd_fdctl fd_fddev fd_choreo fd_disco fd_flamenco fd_funk fd_quic fd_tls fd_reedsol fd_ballet fd_waltz fd_tango fd_util external_functions, $(SECP256K1_LIBS))
endif
else
$(call make-bin-rust,fddev,main,fd_fdctl fd_fddev fd_choreo fd_disco fd_flamenco fd_funk fd_quic fd_tls fd_reedsol fd_ballet fd_waltz fd_tango fd_util solana_validator, $(SECP256K1_LIBS))
$(call make-bin-rust,fddev,main,fd_fdctl fd_fddev fd_disco fd_flamenco fd_funk fd_quic fd_tls fd_reedsol fd_ballet fd_waltz fd_tango fd_util solana_validator)
endif

ifeq (run,$(firstword $(MAKECMDGOALS)))
Expand Down Expand Up @@ -54,7 +55,9 @@ monitor: bin
$(OBJDIR)/bin/fddev monitor $(MONITOR_ARGS)

ifdef FD_HAS_NO_SOLANA
$(call make-integration-test,test_fddev,tests/test_fddev,fd_fdctl fd_fddev fd_disco fd_flamenco fd_funk fd_quic fd_tls fd_reedsol fd_ballet fd_waltz fd_tango fd_util external_functions)
ifdef FD_HAS_SECP256K1
$(call make-integration-test,test_fddev,tests/test_fddev,fd_fdctl fd_fddev fd_choreo fd_disco fd_flamenco fd_funk fd_quic fd_tls fd_reedsol fd_ballet fd_waltz fd_tango fd_util external_functions, $(SECP256K1_LIBS))
endif
else
$(call make-integration-test,test_fddev,tests/test_fddev,fd_fdctl fd_fddev fd_disco fd_flamenco fd_funk fd_quic fd_tls fd_reedsol fd_ballet fd_waltz fd_tango fd_util solana_validator)
endif
Expand All @@ -64,5 +67,3 @@ endif
endif
endif
endif
endif

37 changes: 0 additions & 37 deletions src/app/fddev/external_functions.c

This file was deleted.

0 comments on commit 7007b35

Please sign in to comment.