X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=inline;f=source%2Fvirtualfilesystem.cpp;h=0e9595085b08d1523fe89d7a714a2809f84f138c;hb=1c80c1c33af10e8e325808906a95969ee57676b6;hp=2f4ee645281c1727aca01cb0b4abced00124a463;hpb=728b2f65fadd5fb5f000d908efa414027123f964;p=builder.git diff --git a/source/virtualfilesystem.cpp b/source/virtualfilesystem.cpp index 2f4ee64..0e95950 100644 --- a/source/virtualfilesystem.cpp +++ b/source/virtualfilesystem.cpp @@ -35,10 +35,10 @@ void VirtualFileSystem::register_path(const FS::Path &path, FileTarget *t) builder.get_logger().log("vfs", format("Path %s registered to %s", path, t->get_name())); } -FileTarget *VirtualFileSystem::find_header(const string &name, const SearchPath &path, bool use_syspath) +FileTarget *VirtualFileSystem::find_header(const string &name, const Tool *tool, const SearchPath &path, bool use_syspath) { - // 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) + tool = builder.get_toolchain().get_tool_for_suffix(FS::extpart(FS::basename(name)), true); if(!tool) return 0; @@ -118,7 +118,7 @@ FileTarget *VirtualFileSystem::find_library(const string &lib, const SearchPath if(++j==cur_names->end()) { - if(mode==BuildInfo::DYNAMIC && cur_names==&shared_names) + if(mode==BuildInfo::DYNAMIC && cur_names==&shared_names) cur_names = &static_names; else if(mode==BuildInfo::STATIC && cur_names==&static_names) cur_names = &shared_names;