This enables "classic" desktop builds of ICU4C for both ARM (32-bit)
and ARM64 (64-bit) on Windows.
All but the two samples "cal" and "date" in the "allinone" project now
have ARM and ARM64 project configurations, and build for Windows Desktop
ARM/ARM64.
Note: In order to build the ARM/ARM64 data DLL, you need to first build
x64/Release, as the ARM/ARM build uses the x64 bits in order to be able
to cross-compile for ARM/ARM64. This allows for completely building
ARM/ARM64 binaries using only x64 hardware.
The ARM/ARM64 builds require using a newer version of the Windows SDK
than 8.1, so they have a separate WindowsTargetPlatformVersion which
uses Windows 10 SDK version 10.0.16299.0 (aka RS3), which is the first
version of the Windows SDK to support building ARM64 desktop applications.
In addition this also greatly cleans-up the ICU4C ".vcxproj" files, in
order to remove redundant parts, fix inconsistencies, and make them more
readable. This introduces two new variables in the shared `*.props`
files: `IcuBinOutputDir` and `IcuLibOutputDir` in order to further
reduce the amount of duplicated lines in the individual ".vcxproj"
files themselves.
This also changes the pkgdata tool command line options to decouple the
ARM/ARM64 flags from the UWP flag, and adds a generic architecture
option (-a) for passing in the value of the linker "/MACHINE:" argument
on the command line. (Ex: -a ARM64).
Additionally this change also adds another option to pkgdata (-b) to
set /DYNAMICBASE on the data DLL, which is required for the ARM64 builds.
Both of these changes also work towards future work in order to enable
full ARM64 desktop builds without UWP.
This change also removes a number of ifdefs/forks in the ICU code based
on U_PLATFORM_HAS_WINUWP_API, and changes them to use ICU_DATA_DIR_WINDOWS
instead. This is needed to unblock the usage of the data DLL in the
UWP scenario, but also helps to further reduce the divergence of the UWP
projects from regular Windows builds.
Related tickets:
ICU4C: Remove fixed DLL base addresses when building Windows DLLs
https://unicode-org.atlassian.net/browse/ICU-20768
Add support to generate ICU data DLL for Windows arm64
https://unicode-org.atlassian.net/browse/ICU-20670
This adds a separate CI build that enables -Werror for clang.
This also fixes all of the -Wall -Wextra warnings in the tests, and all the
-Wextra-semi warnings as well.
- added PKGDATA_TRAILING_SPACE to all of the pkgdataMakefile.in file.
- NOTE: Users who create their own pkgdata.inc / icupkg.inc files may need
to recreate this PKGDATA_TRAILING_SPACE behavior.
- used the above variable, normally undefined, in mh-* files that need a trailing space
- Also, fixed use of system() in pkgdata.cpp per ICU-20538
This was causing pkgdata to return a zero status even on clang
failure, masking this issue.
(cherry picked from commit 83a0542b5b)
- added PKGDATA_TRAILING_SPACE to all of the pkgdataMakefile.in file.
- NOTE: Users who create their own pkgdata.inc / icupkg.inc files may need
to recreate this PKGDATA_TRAILING_SPACE behavior.
- used the above variable, normally undefined, in mh-* files that need a trailing space
- Also, fixed use of system() in pkgdata.cpp per ICU-20538
This was causing pkgdata to return a zero status even on clang
failure, masking this issue.
- remove the old LocaleMatcher implementation code
- move the XLocaleMatcher code into LocaleMatcher, same for test
- remove unused internal methods
- stop comparing old vs. new performance
- generate langInfo.txt resource bundle file with precomputed likely-subtags and matcher data
- make genrb handle multi-line binary values
- load likely-subtags & distance data from new langInfo.res bundle
- test that built data == loaded data
- move data builders to tools, no more runtime dependency on builder code
- Fixes filterrb.cpp to check for wildcard when at a leaf.
- Adds additional verbose logging to genrb.
- Fixes filtration to add deps to dep_targets instead of dep_files.
- Separates dep_files to common_dep_files and specific_dep_files.
If a file with an input line larger than INT32_MAX (i.e. 2 GB) contains
an UTF8 character after that limit, escapesrc crashes on 64 bit systems
or does not remove incomplete files on 32 bit systems.
The issue is that an unchecked cast from size_t to int32_t can turn
negative, which results in negative offsets during array access.
This will eventually lead to an out of boundary read, which most likely
crashes the tool.
This patch sets a fixed limit on 1 GB to make sure that no side effects
occur if the line is exactly INT32_MAX or a few bytes less. It should
still be way more than anyone would really need.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
If gencnval encounters an empty input file the function resolveAlias
triggers an out of boundary write due to uniqueAliasArr pointing to
a 0 byte reserved memory address.
This patch protects the code in question with a check for
knownAliasesCount being not 0.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
- Reads, parses, and applies the filter file syntax.
- Removes unused keys from the resource bundle.
- Adds sample filter txt file with test in intltest.
- Creates new Python package in icu4c/data/buildtool
- Creates BUILRDULES.py in icu4c/data and icu4c/test/testdata, unified between Unix/Windows
- Removes most data build orchestration rules from makedata.mak, testdata.mak, data/Makefile.in, and test/testdata/Makefile.in
- Removes pool.res files and builds them on the fly instead
* Fix MSVC C4251: Need to export explicit template instantiation for std::atomic<int32_t> when building DLLs
* Some more warning fixes for MSVC as well.
* Can't use static_cast in C file.