]> granicus.if.org Git - llvm/commitdiff
Do not polute the source directory.
authorVassil Vassilev <v.g.vassilev@gmail.com>
Thu, 23 Mar 2017 14:54:34 +0000 (14:54 +0000)
committerVassil Vassilev <v.g.vassilev@gmail.com>
Thu, 23 Mar 2017 14:54:34 +0000 (14:54 +0000)
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)!

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

CMakeLists.txt

index 3c2c709153948e54d274c126d4e6078be0e8673c..47bd35c098872c39440ec2136240d45527ea2033 100644 (file)
@@ -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}"