Fix build caching (#242)
Summary: See https://github.com/facebook/flipper/issues/230 for a longer explanation. It turns out that many of the tasks in `native.gradle` (at least `prepareGlog` which modifies files inside the source directory, but also others) cause the cmake cache to invalidate. Because we run those tasks unconditionally, we need to recompile all our C++ code even when unmodified. I fix this by adding a manual cache key to this which simply skips all the tasks unless an up-to-date `external_cache_revision.txt` is found. This is a bit hacky, but the alternatives are a) convincing cmake that these modifications are not recompile-worthy which I have no idea how to do and which might be impossible to do `mtime` on the files touches, or b) having fine-grained `onlyIf` rules for every task which can easily break. This seems the most straight-forward option. Fixes #230. Pull Request resolved: https://github.com/facebook/flipper/pull/242 Reviewed By: jknoxville Differential Revision: D9381340 Pulled By: passy fbshipit-source-id: a7db55aacac4a29076c29298d6c5b97d8bc91f66
This commit is contained in:
committed by
Facebook Github Bot
parent
d8e5e31c9a
commit
02cf3a90a2
@@ -48,7 +48,6 @@ set(rsocket_build_DIR ${build_DIR}/rsocket/${ANDROID_ABI})
|
||||
|
||||
file(MAKE_DIRECTORY ${build_DIR})
|
||||
|
||||
#add_subdirectory(${libfolly_DIR} ${libfolly_build_DIR})
|
||||
add_subdirectory(${rsocket_DIR} ${rsocket_build_DIR})
|
||||
|
||||
message(STATUS "RSocket DIR:- " ${rsocket_DIR})
|
||||
|
||||
Reference in New Issue
Block a user