builder.get_logger().log("vfs", format("Path %s registered to %s", path, t->get_name()));
}
builder.get_logger().log("vfs", format("Path %s registered to %s", path, t->get_name()));
}
{
// XXX This will cause trouble with multiple architectures in a single build
const Tool *tool = builder.get_toolchain().get_tool_for_suffix(FS::extpart(FS::basename(name)), true);
if(!tool)
return 0;
{
// XXX This will cause trouble with multiple architectures in a single build
const Tool *tool = builder.get_toolchain().get_tool_for_suffix(FS::extpart(FS::basename(name)), true);
if(!tool)
return 0;
- combined_path.insert(combined_path.end(), syspath.begin(), syspath.end());
+ if(use_syspath)
+ {
+ const Tool::SearchPath &syspath = tool->get_system_path();
+ combined_path.insert(combined_path.end(), syspath.begin(), syspath.end());
+ }
-FileTarget *VirtualFileSystem::find_library(const string &lib, const SearchPath &path, BuildInfo::LibraryMode mode)
+FileTarget *VirtualFileSystem::find_library(const string &lib, const SearchPath &path, BuildInfo::LibraryMode mode, bool use_syspath)
- combined_path.insert(combined_path.end(), syspath.begin(), syspath.end());
+ if(use_syspath)
+ {
+ const Tool &linker = builder.get_toolchain().get_tool("LINK");
+ const Tool::SearchPath &syspath = linker.get_system_path();
+ combined_path.insert(combined_path.end(), syspath.begin(), syspath.end());
+ }
- if(cur_names!=&shared_names || mode==BuildInfo::DYNAMIC)
- {
- builder.get_logger().log("vfs", format("Library %s (%s) found in %s as existing %s", lib, *j, i->str(), tgt->get_type()));
- return tgt;
- }
+ builder.get_logger().log("vfs", format("Library %s (%s) found in %s as existing %s", lib, *j, i->str(), tgt->get_type()));
+ return tgt;
}
else if(file_exists(filename))
{
builder.get_logger().log("vfs", format("Library %s (%s) found in %s", lib, *j, i->str()));
if(cur_names==&shared_names)
}
else if(file_exists(filename))
{
builder.get_logger().log("vfs", format("Library %s (%s) found in %s", lib, *j, i->str()));
if(cur_names==&shared_names)