ICU4C: Add an option to not export icudtNl_dat symbol during static link on Windows.

Description

env: windows, custom builds, static build

Genccode creates icudtNl_dat.obj with dll exported symbol of the same name from .dat file.
In obj file: -export:icudt65_dat,data....
Then obj file is transformed into .lib file which is linked to resulting exe.

When statically linking such library, resulting exe exports that single export (if there are no other exports) which is not desirable.

Solution:
Add an option to genccode and to pkg_genc.cpp api to prevent printing of export information.
That info is printed at https://github.com/unicode-org/icu/blob/a3078fb8c89b61c35ccebb04cf6b189bc81093b3/icu4c/source/tools/toolutil/pkg_genc.cpp#L1256

If we comment out (or put them under condition) lines 1257,1259 and 1261 everything works good, I tested that. Do not comment lines 1258,1260 and 1262, because length must be adjusted even if information is skipped.

Activity

Show:
Egor Pugin
January 23, 2020, 8:51 PM

Ok, thank you too. :)

 

Jeff Genovy
January 23, 2020, 8:02 PM

Thank you for the PR! (https://github.com/unicode-org/icu/pull/968).
Note that this will be part of the upcoming 67.1 release of ICU.
Resolving this ticket as Fixed.
Thanks!

Egor Pugin
January 22, 2020, 7:59 PM

See

 

Jeff Genovy
January 22, 2020, 7:15 PM

[Note to self: Markus and Steven asked to added to the PR for review].

Jeff Genovy
January 22, 2020, 7:14 PM

Yes we do!

If you’re familiar with git and GitHub then you should be able to use the “normal” process for PRs on GitHub.

(If not then there is a page here that has some tips/pointers http://site.icu-project.org/repository/gitdev).

Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Jeff Genovy

Reporter

Egor Pugin

Components

Reviewer

Markus Scherer

Priority

minor

Fix versions