aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/common.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-05-22 11:34:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-22 11:34:19 +0200
commitf352dbb8308ddeab5fa47a5d18883f854192ec53 (patch)
tree17bf76b6acf13711049cc54aa3948df6b27db3f6 /libbuild2/cc/common.cxx
parent630b498533f5a9a1e9d40893f4806ef855f1e03b (diff)
Make template definition available in all translation units where used
We were trying to be clever but GCC 10's IPA-SRA optimization didn't like it.
Diffstat (limited to 'libbuild2/cc/common.cxx')
-rw-r--r--libbuild2/cc/common.cxx27
1 files changed, 0 insertions, 27 deletions
diff --git a/libbuild2/cc/common.cxx b/libbuild2/cc/common.cxx
index 6bd9ac3..8150cfa 100644
--- a/libbuild2/cc/common.cxx
+++ b/libbuild2/cc/common.cxx
@@ -487,33 +487,6 @@ namespace build2
return xt->as<file> ();
}
- // Insert a target "tagging" it with the specified process path and
- // verifying that it already exists if requested. Return the lock.
- //
- template <typename T>
- ulock common::
- insert_library (context& ctx,
- T*& r,
- string name,
- dir_path dir,
- const process_path& out,
- optional<string> ext,
- bool exist,
- tracer& trace)
- {
- auto p (ctx.targets.insert_locked (T::static_type,
- move (dir),
- path_cast<dir_path> (out.effect),
- name,
- move (ext),
- true, // Implied.
- trace));
-
- assert (!exist || !p.second.owns_lock ());
- r = &p.first.template as<T> ();
- return move (p.second);
- }
-
// Note that pk's scope should not be NULL (even if dir is absolute).
//
target* common::