]> git.tdb.fi Git - builder.git/blobdiff - source/objectfile.cpp
Don't rely on component type in determining whether to use -fPIC
[builder.git] / source / objectfile.cpp
index 732fe142400f72159f2f800407c16d6287fce10d..0536755bb26788354d5e147e021f38fe64d0af36 100644 (file)
@@ -11,7 +11,8 @@ using namespace Msp;
 
 ObjectFile::ObjectFile(Builder &b, const Component &c, SourceFile &s):
        FileTarget(b, c.get_package(), generate_target_path(c, s.get_path())),
-       source(s)
+       source(s),
+       used_in_shlib(false)
 {
        component = &c;
        add_dependency(source);
@@ -37,6 +38,11 @@ FS::Path ObjectFile::generate_target_path(const Component &comp, const FS::Path
        return temp_dir/(FS::basepart(fn)+".o");
 }
 
+void ObjectFile::set_used_in_shared_library(bool u)
+{
+       used_in_shlib = u;
+}
+
 void ObjectFile::collect_build_info(BuildInfo &binfo) const
 {
        Target::collect_build_info(binfo);