Add --no-append-metadata in CLI and metadata.append in JSON

Skips appending metadata to the binary
This commit is contained in:
hrkrshnn
2022-09-26 20:40:34 +02:00
parent 8b7010872c
commit f96e802e74
7 changed files with 45 additions and 2 deletions
+6 -1
View File
@@ -349,6 +349,11 @@ public:
/// caused by differences in metadata. Should only be used for testing.
void setMetadataFormat(MetadataFormat _metadataFormat) { m_metadataFormat = _metadataFormat; }
static MetadataFormat defaultMetadataFormat()
{
return VersionIsRelease ? MetadataFormat::WithReleaseVersionTag : MetadataFormat::WithPrereleaseVersionTag;
}
private:
/// The state per source unit. Filled gradually during parsing.
struct Source
@@ -515,7 +520,7 @@ private:
/// Whether or not there has been an error during processing.
/// If this is true, the stack will refuse to generate code.
bool m_hasError = false;
MetadataFormat m_metadataFormat = VersionIsRelease ? MetadataFormat::WithReleaseVersionTag : MetadataFormat::WithPrereleaseVersionTag;
MetadataFormat m_metadataFormat = defaultMetadataFormat();
};
}