You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
The two main goals of this change are:
- To make it easier to build the Intl option using ICU (particularly,
using a newer ICU than v8/Chromium's version)
- To enable a much smaller ICU build with only English support The goal
here is to get node.js binaries built this way by default so that the
Intl API can be used. Additional data can be added at execution time
(see Readme and wiki)
More details are at #7719
In particular, this change adds the "--with-intl=" configure option to
provide more ways of building "Intl":
- "full-icu" picks up an ICU from deps/icu
- "small-icu" is similar, but builds only English
- "system-icu" uses pkg-config to find an installed ICU
- "none" does nothing (no Intl)
For Windows builds, the "full-icu" or "small-icu" options are added to
vcbuild.bat.
Note that the existing "--with-icu-path" option is not removed from
configure, but may not be used alongside the new option.
Wiki changes have already been made on
https://github.com/joyent/node/wiki/Installation
and a new page created at
https://github.com/joyent/node/wiki/Intl
(marked as provisional until this change lands.)
Summary of changes:
* README.md : doc updates
* .gitignore : added "deps/icu" as this is the location where ICU is
unpacked to.
* Makefile : added the tools/icu/* files to cpplint, but excluded a
problematic file.
* configure : added the "--with-intl" option mentioned above.
Calculate at config time the list of ICU source files to use and data
packaging options.
* node.gyp : add the new files src/node_i18n.cc/.h as well as ICU
linkage.
* src/node.cc : add call into
node::i18n::InitializeICUDirectory(icu_data_dir) as well as new
--icu-data-dir option and NODE_ICU_DATA env variable to configure ICU
data loading. This loading is only relevant in the "small"
configuration.
* src/node_i18n.cc : new source file for the above Initialize..
function, to setup ICU as needed.
* tools/icu : new directory with some tools needed for this build.
* tools/icu/icu-generic.gyp : new .gyp file that builds ICU in some new
ways, both on unix/mac and windows.
* tools/icu/icu-system.gyp : new .gyp file to build node against a
pkg-config detected ICU.
* tools/icu/icu_small.json : new config file for the "English-only" small
build.
* tools/icu/icutrim.py : new tool for trimming down ICU data. Reads the
above .json file.
* tools/icu/iculslocs.cc : new tool for repairing ICU data manifests
after trim operation.
* tools/icu/no-op.cc : dummy file to force .gyp into using a C++ linker.
* vcbuild.bat : added small-icu and full-icu options, to call into
configure.
* Fixed toolset dependencies, see
#7719 (comment)
Note that because of a bug in gyp {CC,CXX}_host must also be set.
Otherwise gcc/g++ will be used by default for part of the build.
Reviewed-by: Trevor Norris <[email protected]>
Reviewed-by: Fedor Indutny <[email protected]>
If your python binary is in a non-standard location or has a
34
23
non-standard name, run the following instead:
35
24
@@ -47,7 +36,9 @@ Prerequisites (Windows only):
47
36
48
37
Windows:
49
38
50
-
vcbuild nosign
39
+
```sh
40
+
vcbuild nosign
41
+
```
51
42
52
43
You can download pre-built binaries for various operating systems from
53
44
[http://nodejs.org/download/](http://nodejs.org/download/). The Windows
@@ -92,6 +83,35 @@ make doc
92
83
man doc/node.1
93
84
```
94
85
86
+
### To build `Intl` (ECMA-402) support:
87
+
88
+
*Note:* more docs, including how to reduce disk footprint, are on
" --trace-deprecation show stack traces on deprecations\n"
2954
2963
" --v8-options print v8 command line options\n"
2955
2964
" --max-stack-size=val set max v8 stack size (bytes)\n"
2965
+
#if defined(NODE_HAVE_I18N_SUPPORT)
2966
+
" --icu-data-dir=dir set ICU data load path to dir\n"
2967
+
" (overrides NODE_ICU_DATA)\n"
2968
+
#if !defined(NODE_HAVE_SMALL_ICU)
2969
+
" Note: linked-in ICU data is\n"
2970
+
" present.\n"
2971
+
#endif
2972
+
#endif
2956
2973
"\n"
2957
2974
"Environment variables:\n"
2958
2975
#ifdef _WIN32
@@ -2964,6 +2981,12 @@ static void PrintHelp() {
2964
2981
"NODE_MODULE_CONTEXTS Set to 1 to load modules in their own\n"
2965
2982
" global contexts.\n"
2966
2983
"NODE_DISABLE_COLORS Set to 1 to disable colors in the REPL\n"
2984
+
#if defined(NODE_HAVE_I18N_SUPPORT)
2985
+
"NODE_ICU_DATA Data path for ICU (Intl object) data\n"
2986
+
#if !defined(NODE_HAVE_SMALL_ICU)
2987
+
" (will extend linked-in data)\n"
2988
+
#endif
2989
+
#endif
2967
2990
"\n"
2968
2991
"Documentation can be found at http://nodejs.org/\n");
0 commit comments