[llvm] r298603 - Do not polute the source directory.

Vassil Vassilev via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 07:54:34 PDT 2017


Author: vvassilev
Date: Thu Mar 23 09:54:34 2017
New Revision: 298603

URL: http://llvm.org/viewvc/llvm-project?rev=298603&view=rev
Log:
Do not polute the source directory.

When a python script is run, by default it creates the bytecode file if the directory is writable, and this ‘pollutes’ source folders.

>From python's help:
-B Don’t write .py[co] files on import. See also PYTHONDONTWRITEBYTECODE.

Patch by Pere Mato (D30604)!

Modified:
    llvm/trunk/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=298603&r1=298602&r2=298603&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Mar 23 09:54:34 2017
@@ -618,7 +618,7 @@ endif (LLVM_USE_OPROFILE)
 
 message(STATUS "Constructing LLVMBuild project information")
 execute_process(
-  COMMAND ${PYTHON_EXECUTABLE} ${LLVMBUILDTOOL}
+  COMMAND ${PYTHON_EXECUTABLE} -B ${LLVMBUILDTOOL}
             --native-target "${LLVM_NATIVE_ARCH}"
             --enable-targets "${LLVM_TARGETS_TO_BUILD}"
             --enable-optional-components "${LLVMOPTIONALCOMPONENTS}"




More information about the llvm-commits mailing list