aboutsummaryrefslogtreecommitdiff
path: root/gold/incremental.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/incremental.cc')
-rw-r--r--gold/incremental.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/incremental.cc b/gold/incremental.cc
index 25caabe..4a3ecb1 100644
--- a/gold/incremental.cc
+++ b/gold/incremental.cc
@@ -25,6 +25,7 @@
#include "output.h"
#include "incremental.h"
#include "archive.h"
+#include "output.h"
using elfcpp::Convert;
@@ -149,6 +150,18 @@ class Incremental_inputs_entry_write
internal::Incremental_inputs_entry_data* p_;
};
+// Analyzes the output file to check if incremental linking is possible and
+// (to be done) what files need to be relinked.
+
+bool
+Incremental_checker::can_incrementally_link_output_file()
+{
+ Output_file output(this->output_name_);
+ if (!output.open_for_modification())
+ return false;
+ return true;
+}
+
// Add the command line to the string table, setting
// command_line_key_. In incremental builds, the command line is
// stored in .gnu_incremental_inputs so that the next linker run can