build: add flag for setting vendor version (#41259)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
trop[bot]
2024-02-08 10:09:58 +09:00
committed by GitHub
parent aa4ea630f8
commit 90ca228cdc
3 changed files with 21 additions and 0 deletions

View File

@@ -940,6 +940,10 @@ void OnNodePreload(node::Environment* env,
if (dict.Get("versions", &versions)) {
versions.SetReadOnly(ELECTRON_PROJECT_NAME, ELECTRON_VERSION_STRING);
versions.SetReadOnly("chrome", CHROME_VERSION_STRING);
#if BUILDFLAG(HAS_VENDOR_VERSION)
versions.SetReadOnly(BUILDFLAG(VENDOR_VERSION_NAME),
BUILDFLAG(VENDOR_VERSION_VALUE));
#endif
}
// Execute lib/node/init.ts.