]> git.tdb.fi Git - builder.git/blobdiff - source/virtualfilesystem.cpp
Pass a tool hint to VirtualFileSystem::find_header
[builder.git] / source / virtualfilesystem.cpp
index 5c548980073b9b46ac39da6982e4e5c2c8abfb66..0e9595085b08d1523fe89d7a714a2809f84f138c 100644 (file)
@@ -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;