diff options
author | Sergey Nazaryev <sergey@nazaryev.com> | 2022-05-06 14:20:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 14:20:44 +0300 |
commit | 5e9274a3e7803e9713a87ebae69019b9ee6468de (patch) | |
tree | ce41ae0a3faa89512dad6a63639450e037727220 | |
parent | cf5afb78e93c6cbb334b7b875d829cd71f539e2a (diff) |
build: fix indeterminacy of icu_locales value
`icu_locales` is generated by joining values from `set` data structure.
However, `set` doesn't guarantee an order, so the result of
`icu_locales` is not determined. For example, the result value could be
'en,root' or 'root,en'. This fix makes it deterministic.
The main reason of this fix is to restore the reproducibility of the
build because the value of `icu_locales` is embedded into `node` binary.
PR-URL: https://github.com/nodejs/node/pull/42865
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
-rwxr-xr-x | configure.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.py b/configure.py index 8bf2bc0a986..17ff53ef645 100755 --- a/configure.py +++ b/configure.py @@ -1664,7 +1664,7 @@ def configure_intl(o): o['variables']['icu_small'] = b(True) locs = set(options.with_icu_locales.split(',')) locs.add('root') # must have root - o['variables']['icu_locales'] = ','.join(str(loc) for loc in locs) + o['variables']['icu_locales'] = ','.join(str(loc) for loc in sorted(locs)) # We will check a bit later if we can use the canned deps/icu-small o['variables']['icu_default_data'] = options.with_icu_default_data_dir or '' elif with_intl == 'full-icu': |