From e7c5ea405fd863a9fcf85d49694e0f69fd5511ec Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Fri, 26 Apr 2013 21:38:57 +0000 Subject: 2013-04-26 Geoff Pike gold/ * gold.cc (queue_final_tasks): invoke layout->queue_build_id_tasks(). * layout.cc (Hash_task): New class. (Layout::queue_build_id_tasks): New function. (Layout::write_build_id): Handle single-thread portion of build ID computation. (In some cases, all of it is single-threaded.) Replace {sha1,md5}_process_bytes with {sha1,md5}_buffer to get the same functionality in fewer lines of code. * layout.h (Layout::queue_build_id_tasks): New function declaration. * options.h (General_options): make "--build-id" default to tree rather than sha1. Add two new options related to --build-id=tree: --build-id-chunk-size-for-treehash and --build-id-min-file-size-for-treehash. * Makefile.am: add testing of --build-id=tree and related new options (these tests will be invoked by "make check"). * Makefile.in: Regenerate. --- gold/gold.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gold/gold.cc') diff --git a/gold/gold.cc b/gold/gold.cc index d26dc2e6f5e..4de9289b4d6 100644 --- a/gold/gold.cc +++ b/gold/gold.cc @@ -874,6 +874,9 @@ queue_final_tasks(const General_options& options, final_blocker = new_final_blocker; } + // Create tasks for tree-style build ID computation, if necessary. + final_blocker = layout->queue_build_id_tasks(workqueue, final_blocker, of); + // Queue a task to close the output file. This will be blocked by // FINAL_BLOCKER. workqueue->queue(new Task_function(new Close_task_runner(&options, layout, -- cgit v1.2.1