* options.cc (parse_short_option): Keep dash_z from registering itself.
[deliverable/binutils-gdb.git] / gold / parameters.cc
index fdd5fd76544b0f1d455279f134c85cb0fbb975e8..729305116aad78086d58ac1cff81c0abb17a312d 100644 (file)
@@ -1,6 +1,6 @@
 // parameters.cc -- general parameters for a link using gold
 
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -22,6 +22,7 @@
 
 #include "gold.h"
 
+#include "debug.h"
 #include "options.h"
 #include "target.h"
 #include "target-select.h"
@@ -41,8 +42,12 @@ Parameters::set_options(const General_options* options)
 {
   gold_assert(!this->options_valid());
   this->options_ = options;
-  // For speed, we make our own copy of the debug variable.
-  this->debug_ = this->options().debug();
+  // For speed, we convert the options() debug var from a string to an
+  // enum (from debug.h).
+  this->debug_ = debug_string_to_enum(this->options().debug());
+  // If --verbose is set, it acts as "--debug=files".
+  if (options->verbose())
+    this->debug_ |= DEBUG_FILES;
 }
 
 void
@@ -72,7 +77,7 @@ const Target&
 Parameters::default_target() const
 {
   gold_assert(this->options_valid());
-  if (this->options().oformat() != NULL)
+  if (this->options().user_set_oformat())
     {
       const Target* target
           = select_target_by_name(this->options().oformat());
This page took 0.024331 seconds and 4 git commands to generate.