Closed anwayde closed 2 weeks ago
@anwayde Making fdctl portable has lots of subtasks. I'll just list them out here for future reference. They are each a decent amount of work (> 2 weeks total) unless we want to go some cheap route.
FD_HAS_INT128
is a hard requirement for the runtime. Really, it is only 64-bit wide multiply. Modern compilers do tricks to provide a virtual int128 that is stored in memory / in two 64-bit GPRs and can fall back to soft multiply. The Clang BPF target isn't able to do this. Practically, this means that Firedancer's runtime components cannot run inside the Solana VM. It would be easier to fix the Clang BPF target than to fix Firedancer../deps.sh
builds on other architectures.Chatted with Anway. Unfortunately, the noarch
target got removed from CI. We should at it back at some point.
I've added the noarch64
target back to CI.
@anwayde Great, thanks. Can we close this then?
We could, the reason I didn't was because fdctl
still doesn't build with noarch. Was wondering if we should keep this open to track that? Or maybe that's not necessary. Either way, I leave the decision up to you @ripatel-fd and @lheeger-jump
I see no reason to build fdctl with noarch. On these embedded targets the assumptions that fdctl makes probably don't hold. Those include AF_XDP available, sandbox, etc. The noarch build target so far has mainly served to ensure individual components (like the sBPF VM or ELF parser) can build in isolation, not that entire Firedancer is supported on arbitrary architectures. @mmcgee-jump Do you have any thoughts on this?
Yeah, we don't need to support noarch for fdctl (or anything other than linux+x86_64 for now)
Currently, our CI does not use
noarch
.noarch64
does not work with a bunch of stuff that requiresFD_HAS_INT128
.noarch128
addresses that but cannot build important targets likefdctl
,fddev
,integration-test
since they needFD_HAS_SSE
which is a requirement indisco/mux
. We should address this and make sure we can build these targets withnoarch
as well to maintain a nice base for compiling under Arm, PPC, and BPF/SBPF.