From 71e9e44ae97bcb72e0020961d8e10b57d05d57d4 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 29 Sep 2016 08:14:06 +0000 Subject: [PATCH] [modules] Centralize the module cache. This reduces the build size from 17G to 1.9G on my machine. llvm-svn: 282704 --- llvm/cmake/modules/HandleLLVMOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 0268548..3c1d0d7 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -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") -- 2.7.4