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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to