X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvirtualfilesystem.cpp;h=0e9595085b08d1523fe89d7a714a2809f84f138c;hb=c51411c4b3ed4e6a0d8343b848db3dc736bc7857;hp=5c548980073b9b46ac39da6982e4e5c2c8abfb66;hpb=07503a34b80778fe74977f0fb0c2094c92d64ce0;p=builder.git diff --git a/source/virtualfilesystem.cpp b/source/virtualfilesystem.cpp index 5c54898..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;