Implement and document the TOOL_VERBOSE option that asks each tool invoked
authorReid Spencer <rspencer@reidspencer.com>
Mon, 8 Nov 2004 17:32:12 +0000 (17:32 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 8 Nov 2004 17:32:12 +0000 (17:32 +0000)
to be verbose about its actions too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17624 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules
docs/MakefileGuide.html

index b5f385386603914ba27c3afa2aec0c1e2f006e83..69bb2c9926f4b4e5fba6fdd8a4dda935722675b3 100644 (file)
@@ -222,6 +222,14 @@ else
   LD.Flags += -rpath $(LibDir)
 endif
 
+ifdef TOOL_VERBOSE
+  C.Flags += -v
+  CXX.Flags += -v
+  LD.Flags += -v
+  BCLinkLib.Flags += -v
+  VERBOSE := 1
+endif
+
 # Adjust settings for verbose mode
 ifndef VERBOSE
   Verb := @
@@ -268,7 +276,7 @@ Link          = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
                $(CompileCommonOpts) $(LD.Flags) $(Strip)
 Relink        = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
                 $(CompileCommonOpts)
-BCLinkLib     = $(LLVMGCC) -shared -nostdlib
+BCLinkLib     = $(LLVMGCC) -shared -nostdlib $(BCLinkLib.Flags)
 LTInstall     = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL)
 Burg          = $(BURG) -I $(BUILD_SRC_DIR)
 TableGen      = $(TBLGEN) -I $(BUILD_SRC_DIR)
index cb2cba5d280a8907c789a876fafb8efb25d1fdcc..43ed704c9033611f4f07a69803cc5b04675f0864 100644 (file)
     <dt><a name="TOOLNAME"><tt>TOOLNAME</tt></a></dt>
     <dd>Specifies the name of the tool that the current directory should
     build.</dd>
+    <dt><a name="TOOL_VERBOSE"><tt>TOOL_VERBOSE</tt></a></dt>
+    <dd>Implies VERBOSE and also tells each tool invoked to be verbose. This is
+    handy when you're trying to see the sub-tools invoked by each tool invoked 
+    by the makefile. For example, this will pass <tt>-v</tt> to the GCC 
+    compilers which causes it to print out the command lines it uses to invoke
+    sub-tools (compiler, assembler, linker).</dd>
     <dt><a name="USEDLIBS"><tt>USEDLIBS</tt></a></dt>
     <dd>Specifies the list of project libraries that will be linked into the
     tool or library.</dd>