[llvm] r282704 - [modules] Centralize the module cache.
Vassil Vassilev via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 12:08:01 PDT 2016
On 29/09/16 19:48, Adrian Prantl wrote:
> Nice! Which build configuration were you using? I've never seen this fail with cmake+ninja, which seems to not change directories while building.
This is when building with make. The compilation line looks like cd
some/dir/ && make ... -fmodules-cache-path=module.cache. It created a
module.cache folder for each folder it entered. Maybe ninja doesn't do a
cd and the module cache is centralized by definition.
>
> -- adrian
>> On Sep 29, 2016, at 1:14 AM, Vassil Vassilev via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>> 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")
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list