[llvm] r282704 - [modules] Centralize the module cache.

Vassil Vassilev via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 29 01:14:07 PDT 2016


Author: vvassilev
Date: Thu Sep 29 03:14:06 2016
New Revision: 282704

URL: http://llvm.org/viewvc/llvm-project?rev=282704&view=rev
Log:
[modules] Centralize the module cache.

This reduces the build size from 17G to 1.9G on my machine.

Modified:
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=282704&r1=282703&r2=282704&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Thu Sep 29 03:14:06 2016
@@ -475,7 +475,7 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE
   endif()
   if (LLVM_ENABLE_MODULES)
     set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-    set(module_flags "-fmodules -fmodules-cache-path=module.cache")
+    set(module_flags "-fmodules -fmodules-cache-path=${PROJECT_BINARY_DIR}/module.cache")
     if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
       # On Darwin -fmodules does not imply -fcxx-modules.
       set(module_flags "${module_flags} -fcxx-modules")




More information about the llvm-commits mailing list