Closed
Description
Subsystem: deps
ICU 59.1 ( per #12486 ) needs a preprocessing step ( see here to convert u'文';
to u'\u6587';
, because ICU's source code is now UTF-8.
The escaper itself is (currently) an ICU C++ tool, written using a subset of ICU's source code (only header files) that does not need any escaping or data. So it is a single .cpp
file built into a single executable.
Platforms this is known to be needed on are:
- IBM:
AIX, z/OS (using xlC++) - Oracle:
Solaris (using Oracle Studio 12.5 which is now the minimum supported version )
edit this is only for z, see discussion
(if gcc or clang are used, there’s no issue.)
ICU4C handles all of this by fun with makefiles. I think for node’s build, it might be best done at configure
time:
- Actually compile the single binary
- run all source code through to create the normal temporary
node/deps/icu4c
directory but with preprocessed source as well as original source - the temporary icu source is now compilable directly by the
gyp
-based toolchain without any additional issues.
the preprocessed source has #line
directives in it so that compile errors, etc, show the original source names.
The escaper steps are basically:
escapesrc < somefile.cpp > _somefile.cpp
$(CC) -c _somefile.cpp …
(the usual build)