Some verilog code, such as the serv core, uses $readmemh to read memory content to pre-fill memory arrays. This apparently happens at verilation step, making it necessary to provide the memory file to the verilator_cc_library rule at compile time.
While it is possible to provide additional files to verilator_library, such files become part of the runfiles, and are not available at build time.