pub fn addSearchPrefix(b: *Build, search_prefix: []const u8) void b: *Buildsearch_prefix: []const u81841
1842
1843
1844
1845
1846
1847
1848pub 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");
}
}
Adds additional paths, equivalent to the
--search-prefixarguments 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.