[ParseableInterface] Distinguish SDK and non-SDK dependencies

This allows the SDK to be relocated without automatically resulting in a
rebuild.

Based on an old patch from Jordan Rose.
This commit is contained in:
Nathan Hawes
2019-03-29 10:05:00 -07:00
parent f683373116
commit 58d0ee0888
9 changed files with 222 additions and 28 deletions

View File

@@ -253,14 +253,16 @@ static bool validateInputBlock(
switch (kind) {
case input_block::FILE_DEPENDENCY: {
bool isHashBased = scratch[2] != 0;
bool isSDKRelative = scratch[3] != 0;
if (isHashBased) {
dependencies.push_back(
SerializationOptions::FileDependency::hashBased(
blobData, scratch[0], scratch[1]));
blobData, isSDKRelative, scratch[0], scratch[1]));
} else {
dependencies.push_back(
SerializationOptions::FileDependency::modTimeBased(
blobData, scratch[0], scratch[1]));
blobData, isSDKRelative, scratch[0], scratch[1]));
}
break;
}