[LLVMbugs] [Bug 8531] New: clang cannot color diagnostics when output is not going to a terminal
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Tue Nov  2 05:31:14 PDT 2010
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=8531
           Summary: clang cannot color diagnostics when output is not
                    going to a terminal
           Product: clang
           Version: 2.8
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu
clang's compiler driver (lib/Driver/Tools.cpp:1478 or so) refuses to pass
-fcolor-diagnostics on to cc1 if stderr is not a tty. This means you can't get
colored diagnostics out of clang if you're running it through distcc or another
compilation distribution system which doesn't allocate a pty.
It would seem more reasonable to say:
  * if -fno-color-diagnostics is given to the driver, never color diagnostics
  * if -fcolor-diagnostics is given to the driver, always color diagnostics
  * if neither is given, color diagnostics iff stderr is a tty which supports
colors.
Indeed, the comment seems to suggest that this was the intention.
-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
    
    
More information about the llvm-bugs
mailing list