aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-09-01 17:32:35 +0000
committerIan Lance Taylor <ian@airs.com>2009-09-01 17:32:35 +0000
commit44453f85d94b039d2c66cdd19a49adc2d35f6cda (patch)
tree64a499d7c20a4e8c8c84f037894aed6344f3fcd9 /gold/gold.cc
parent404c2abb01aeb1f5434d613036ee101bf256e57a (diff)
downloadfsf-binutils-gdb-44453f85d94b039d2c66cdd19a49adc2d35f6cda.zip
fsf-binutils-gdb-44453f85d94b039d2c66cdd19a49adc2d35f6cda.tar.gz
fsf-binutils-gdb-44453f85d94b039d2c66cdd19a49adc2d35f6cda.tar.bz2
* gold.cc: Include "incremental.h".
(queue_initial_tasks): Call Incremental_checker methods. * incremental.cc: Include "output.h". (Incremental_checker::can_incrementally_link_output_file): New method. * incremental.h (Incremental_checker): New class.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r--gold/gold.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/gold/gold.cc b/gold/gold.cc
index 9f9f251..cb29e7d9 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -42,6 +42,7 @@
#include "defstd.h"
#include "plugin.h"
#include "icf.h"
+#include "incremental.h"
namespace gold
{
@@ -176,6 +177,20 @@ queue_initial_tasks(const General_options& options,
thread_count = cmdline.number_of_input_files();
workqueue->set_thread_count(thread_count);
+ if (cmdline.options().incremental())
+ {
+ Incremental_checker incremental_checker(
+ parameters->options().output_file_name());
+ if (incremental_checker.can_incrementally_link_output_file())
+ {
+ // TODO: remove when incremental linking implemented.
+ printf("Incremental linking might be possible "
+ "(not implemented yet)\n");
+ }
+ // TODO: If we decide on an incremental build, fewer tasks
+ // should be scheduled.
+ }
+
// Read the input files. We have to add the symbols to the symbol
// table in order. We do this by creating a separate blocker for
// each input file. We associate the blocker with the following
@@ -229,8 +244,8 @@ queue_initial_tasks(const General_options& options,
}
}
-// Queue up a set of tasks to be done before queueing the middle set
-// of tasks. This is only necessary when garbage collection
+// Queue up a set of tasks to be done before queueing the middle set
+// of tasks. This is only necessary when garbage collection
// (--gc-sections) of unused sections is desired. The relocs are read
// and processed here early to determine the garbage sections before the
// relocs can be scanned in later tasks.