[LLVMbugs] [Bug 6978] New: lit should not unset CCACHE_DIR

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 29 13:51:50 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=6978

           Summary: lit should not unset CCACHE_DIR
           Product: Test Suite
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: lit
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: pipping.elias at gmail.com
                CC: llvmbugs at cs.uiuc.edu, daniel at zuster.org


The gcc that I have in my path is the one provided by ccache. To work properly,
CCACHE_DIR needs to be set or else ccache will try to use $HOME/.ccache as its
cache location.

When, from inside tools/clang/test, I run

  CCACHE_DIR=/var/tmp/ccache \
  PATH=/usr/libexec/ccache/:$PATH \
  ../../../utils/lit/lit.py Driver

the variable CCACHE_DIR ends up unset for some reason, causing

  tools/clang/test/Driver/Output/hello.c.tmp.log

to contain

  "/usr/libexec/ccache/gcc" -c -m64 -o /tmp/cc-lRfkeD.o -x assembler
/tmp/cc-wRxkGW.s
ccache: failed to create [..]/.ccache (Permission denied)

if $HOME/.ccache is not writable (which with automated building, a dedicated
user account and proper sandboxing will be the case), causing the test to fail.
In such a scenario, not adding ccache's gcc wrapper to the PATH isn't a
feasible solution (because it's usually added globally). Instead, ccache is
usually disabled by setting CCACHE_DISABLE. Again, this variable does not get
through, so this doesn't work either.

Does lit.py need to strip CCACHE_* from the environment? If not, could it be
made not to?

-- 
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