Adds additional paths, equivalent to the --search-prefix arguments
provided by the user. Paths added with this function have lower precedence
than the ones specified by the user on the command line.
It is generally best practice to avoid calling this function, instead relying on the user to provide these paths via the standard build system interface. However, when integrating with other build systems, the user may have already provided the information to the other build system, and thus it is desirable to use that same information without requiring the user to provide it again.
pub fn addSearchPrefix(b: *Build, search_prefix: []const u8) void
pub fn addSearchPrefix(b: *Build, search_prefix: []const u8) void {
if (b.isRoot()) {
const graph = b.graph;
const wc = &graph.wip_configuration;
const string = wc.addString(search_prefix) catch @panic("OOM");
wc.search_prefixes.append(wc.gpa, string) catch @panic("OOM");
}
}