1 #include <msp/core/algorithm.h>
2 #include <msp/fs/utils.h>
5 #include "objectfile.h"
6 #include "sourcefile.h"
7 #include "sourcepackage.h"
12 ObjectFile::ObjectFile(Builder &b, const Component &c, SourceFile &s):
13 FileTarget(b, c.get_package(), generate_target_path(c, s.get_path())),
17 add_dependency(source);
20 FS::Path ObjectFile::generate_target_path(const Component &comp, const FS::Path &src)
22 string fn = comp.flatten_source_path(src);
23 const Architecture &arch = comp.get_package().get_builder().get_current_arch();
24 return comp.get_temp_directory()/arch.create_filename<ObjectFile>(FS::basepart(fn));
27 void ObjectFile::set_used_in_shared_library(bool u)
32 void ObjectFile::collect_build_info(BuildInfo &binfo) const
34 Target::collect_build_info(binfo);
35 binfo.update_from(component->get_build_info_for_path(source.get_path()));