bespoke-silicon-group / bsg_replicant

BSG Replicant: Cosimulation and Emulation Infrastructure for HammerBlade
BSD 3-Clause "New" or "Revised" License
26 stars 20 forks source link

Fix LDFLAGS #786

Closed drichmond closed 2 years ago

drichmond commented 2 years ago

We used to link the pod repl library when we wanted to replicate calls across pods.

Now the library is linked into the simulation executable and is no longer necessary here. If a program wants to call it, the user should include the header in the program, and when main.so is dynamically loaded the appropriate symbols will exist in the execution binary

mrutt92 commented 2 years ago

I don't get it. How do you choose to swap in the pod replication?

drichmond commented 2 years ago

Isn't the API different?

I've never actually used the repl library

mrutt92 commented 2 years ago

No. The api is the same but we substitute at link time.

drichmond commented 2 years ago

Hmm. I need to think about this. I don't think our current simulation build system works with this.

Do we have a test that would break here?

mrutt92 commented 2 years ago

No actually: in practice the pod replication stuff might be something we apply to the entire regression instead of individual tests. In which case, these changes would be appropriate and we add a commented out line/option to turn this on in some shared makefile (link.mk?)

drichmond commented 2 years ago

We could also create a repl target.

drichmond commented 2 years ago

OK, I went ahead and implemented a potential solution. There's now a repl execution target which will use the API in the replicated library. See the most recent commit

drichmond commented 2 years ago

@mrutt92 OK with the changes here?