This follows up to our previous commit [1], which was a preparation to
address the symbol name mismatch in Mozc's TIP DLLs (#1108) but
accidentally removed 'linkshared' from them.
While a subsequent commit [2] addressed the immediate issue by passing
'static_crt' to 'linkshared', strictly speaking they are two orthogonal
concepts. Let's decouple them to avoid future confusions.
There must be no immediate change in the final artifacts with this
commit right now.
[1]: bc546b239b
[2]: 8d20ea6328
PiperOrigin-RevId: 709332940
There was an attempt to make 'rules_android_ndk' compatible with
'--incompatible_disallow_empty_glob' [1], but it seems that it was not
complete.
To unblock Mozc to enable '--incompatible_disallow_empty_glob' (#1150),
let's work around this in the Mozc side for now.
There must be no behavior change in the final artifacts.
[1]: https://github.com/bazelbuild/rules_android_ndk/pull/37
PiperOrigin-RevId: 709015396
This follows up to my previous commit [1], which aimed to enable us to
use Bazel to build executables with Qt6 dependencies.
Thanks to '--incompatible_disallow_empty_glob', which is going to be
enabled by default from Bazel 8.0, it is clear that an empty list was
set to 'hdrs' despite my intention. Let's fix it (#1150).
There must be no change in the final artifacts.
[1]: 019911b19d
PiperOrigin-RevId: 709014821
This is just a mechanical update of rules_python from 0.34.0 to 1.0.0.
No change is expected in the final artifacts.
Closes#1148.
PiperOrigin-RevId: 708197475
bazel 8 set --incompatible_disallow_empty_glob default to True. For
pkg-confg repository, libexec is likely to be empty, so empty should be
allowed there.
PiperOrigin-RevId: 707430069
This follows up to our previous commit [1], which introduced the
dependency on 'rules_java' as an attempt to support Android build with
bzlmod (#1002).
Luckily a subsequent commit [2] had effectively removed the the
dependency on 'rules_java', but 'MODULE.bazel' had not been reflected.
Let's also update 'MODULE.bazel' for simplicity and maintainability.
There must be no difference in the final artifacts.
[1]: 699c2ce5b7
[2]: 6c61c4f29a
PiperOrigin-RevId: 707118402
Rewriters will stop calling Converter::ResizeSegments directly, but returns the request to the converter via CheckResizeSegmentsRequest.
* This will remove cyclic dependency between Converter and Rewriter.
* Actual changes to rewriters will be done in the following CLs (e.g. cl/704192521).
PiperOrigin-RevId: 706980207
- Moves the core data loading loop from engine to data loader. This reduces the number of public APIs and simplifies the algorithm of data_loader.
- Removes the method that returns the moved object (MaybeMoveDataLoaderResponse), as it is confusing. We've introduced a callback to pass the ownership from data loader to engine more safely.
- Avoid loading multiple and unused LMs requested sequentially in a short period. We can improve the performance of data loading.
PiperOrigin-RevId: 706573104
- Avoid passing pointers after std::move()
- Moves the ownership of predictor, rewriter and immutable_converter to pointer
- Passes the factory function object to Converter so that we can generate any predictor/rewrite while keeping the Converter's ownership.
PiperOrigin-RevId: 705022641
* This is a preparation for the unification of ResizeSegment and ResizeSegments in Converter. (e.g. cl/702707766).
#codehealth
PiperOrigin-RevId: 704959457
* This makes consistency b/w ResizeSegment and ResizeSegments.
* This changes the behavior, but it's not user visible.
+ Because UserBoundaryHistoryRewriter is the only client of this function,
and it does not have unconsumed Segments.
PiperOrigin-RevId: 704528072
* https://github.com/google/mozc/pull/1109
This change is a preparation to merge PR#1109.
The difference from PR#1109 is the implementation of `mozc_win32_cc_prod_binary` and `mozc_cc_win32_library`.
* mozc_win32_cc_prod_binary: In this change, this is a wrapper of `mozc_win_build_target` migrated from `trasition.bzl` to `build_defs.bzl`.
* mozc_cc_win32_library: In this change, nothing is changed.
PiperOrigin-RevId: 704201709
There are two overloaded functions of Converter::ResizeSegment.
This is a preparation to unify the implementations of those functions.
#codehealth
PiperOrigin-RevId: 704136470
As a preparation to build Mozc for ARM64 in Windows (#1130), this commit
aims to simplify UpdateEnvironmentFilesForWindows in build_mozc.py so
that we can tweak environment file for ARM64 build configurations in a
subsequent commit easily.
This is still a mechanical code clean up. There must be no difference
in the final artifacts.
PiperOrigin-RevId: 703739072
This commit removes the dependency on platform macros such as _M_X64 and
_M_IX86 from tip_text_service.cc.
There must be no change in the final artifacts.
This is a preparation to build Mozc for ARM64 (#1130).
PiperOrigin-RevId: 703735488
Changes the owner of supplemental model from SessionHandler to Engine.
Remove spellchecker operations as it is no longer used.
PiperOrigin-RevId: 703360331
The current implementation of
ProgramFilesX86Cache::TryProgramFilesPath
is unnecessarily complex. We can always use CSIDL_PROGRAM_FILESX86 not
only within 64-bit processes but also within 32-bit processes.
There must be no observable behavior change in this commit.
This is a preparation to build Mozc as an ARM64 executable (#1130).
See #1086 for how and when we can stop relying on this historical
installation location.
PiperOrigin-RevId: 702632385
This follows up to my previous commit [1] for #835.
This option (/CETCOMPAT) is not compatible with ARM64 builds.
As a preparation to build Mozc executables for ARM64 (#1130) let's
specify it in 'x86_Base' and 'x64_Base' instead of globally defining it.
There must be no change in the final artifacts.
[1]: a0133fb078
PiperOrigin-RevId: 702630613
#### Note for removal of `i += (j + target_segments_size - old_segments_size)` in Resize():
> target_segments_size and old_segments_size store the same value since cl/8867845 (2012-02). As `parent_converter_->ResizeSegment` should update `j + 1` segments, proceeding `j` here (and +1 in the main loop) should be fine here.
### Note for target_segments_size
* Before this change, `target_segments_size` (in Resize) was `segments_size()` that is `history_segments_size() + conversion_segments_size()`.
* With this change, `target_segments_size` (in Resize) will be `conversion_segments_size()` that is `segments_size() - history_segments_size()`.
* Before this change, indexes of segments (i.e. `i`) started from history_segments_size. So `- history_segments_size` was applied to each operation.
* With this change, indexes of segments (i.e. `i` and `seg_idx`) start from 0. To access segments, `conversion_segment(i)` is used instead of `segment(i)`.
#codehealth
PiperOrigin-RevId: 702537901