hdl / bazel_rules_hdl

Hardware Description Language (Verilog, VHDL, Chisel, nMigen, etc) with open tools (Yosys, Verilator, OpenROAD, etc) rules for Bazel (https://bazel.build)
Apache License 2.0
120 stars 45 forks source link

Add *Machine.cc files that are included by Machine.cc. #338

Open grebe opened 4 months ago

grebe commented 4 months ago

OpenRoad includes different Machine*.cc files on different platforms, and only Linux was previously included. This change makes all files available to be included.

mikesinouye commented 4 months ago

/gcbrun

QuantamHD commented 4 months ago

This is going to lead to ODR violations. You'll need to bazel select them based on the @platforms// target.

grebe commented 4 months ago

I don't think it should because it's stuffed into hdrs. Confusingly, it looks like they're #includeing .cc files.

I don't disagree that selecting them would be less confusing, though I'm a little unsure of how to do that in a way that won't be fighting the platform detection they do.

QuantamHD commented 4 months ago

I think technically these should be included in the textual_hdrs, and not the regular hdrs since they aren't meant to be compiled.