Yohei Yukawa e3f30a92f6 Introduce platform host-windows-clang-cl (#1195)
This is a preparation to build Mozc for Windows with clang-cl (#1179).

Now that Windows Bazel builds rely on CC toolchain resolution (#1112),
'clang-cl' needs to be picked up based on 'platform' specified to Bazel.
This gives us an inverse problem what needs to be passed to Bazel so
that such a resolution can happen.

The simplest solution as far as I have figures out is doing the
following two steps.

1. Specify '--host_platform=//:host-windows-clang-cl', where it is
   defined as follows.

     platform(
         name = "host-windows-clang-cl",
         constraint_values = [
             "@platforms//os:windows",
             "@bazel_tools//tools/cpp:clang-cl",
         ],
         parents = ["@local_config_platform//:host"],
     )

   By doing this, '@bazel_tools//tools/cpp:clang-cl' can be propagated
   into each execution platform, which is mandatory for 'clang-cl' to be
   picked up.

2. Specify '--extra_toolchains' command line options to put the
   following toolchains from 'rules_cc' in higher priority than cl.exe.

     * '@local_config_cc//:cc-toolchain-x64_x86_windows-clang-cl'
     * '@local_config_cc//:cc-toolchain-x64_windows-clang-cl'

   This is important because CC toolchain resolution picks up the first
   toolchain that satisfies all the constraints. To give a higher
   priority to 'clang-cl' toolchains, they need to be registered before
   'cl' toolchains are registered.

   Note that

     register_toolchains("@local_config_cc//:all")

   in 'MODULE.bazel' registers toolchains in the alphabetical order. To
   give a higher priority to 'clang-cl' toolchains, '--extra_toolchains'
   command line looks to be the best way.

What this commit does is the step 1. Without the step 2, there must be
no observable behavior change yet.

PiperOrigin-RevId: 730872676
2025-02-26 15:34:33 +09:00
2023-04-10 06:18:39 +00:00
2016-01-10 10:16:37 -08:00

Mozc - a Japanese Input Method Editor designed for multi-platform

Copyright 2010-2025 Google LLC

Mozc is a Japanese Input Method Editor (IME) designed for multi-platform such as Android OS, Apple macOS, Chromium OS, GNU/Linux and Microsoft Windows. This OpenSource project originates from Google Japanese Input.

Mozc is not an officially supported Google product.

Build Status

Linux Windows macOS Android lib
Linux Windows macOS Android lib

What's Mozc?

For historical reasons, the project name Mozc has two different meanings:

  1. Internal code name of Google Japanese Input that is still commonly used inside Google.
  2. Project name to release a subset of Google Japanese Input in the form of source code under OSS license without any warranty nor user support.

In this repository, Mozc means the second definition unless otherwise noted.

Detailed differences between Google Japanese Input and Mozc are described in About Branding.

Build Instructions

Release Plan

tl;dr. There is no stable version.

As described in About Branding page, Google does not promise any official QA for OSS Mozc project. Because of this, Mozc does not have a concept of Stable Release. Instead we change version number every time when we introduce non-trivial change. If you are interested in packaging Mozc source code, or developing your own products based on Mozc, feel free to pick up any version. They should be equally stable (or equally unstable) in terms of no official QA process.

Release History page may have additional information and useful links about recent changes.

License

All Mozc code written by Google is released under The BSD 3-Clause License. For third party code under src/third_party directory, see each sub directory to find the copyright notice. Note also that outside src/third_party following directories contain third party code.

src/data/dictionary_oss/

Mixed. See src/data/dictionary_oss/README.txt

src/data/test/dictionary/

The same to src/data/dictionary_oss/. See src/data/dictionary_oss/README.txt

src/data/test/stress_test/

Public Domain. See the comment in src/data/test/stress_test/sentences.txt

src/data/unicode/

UNICODE, INC. LICENSE AGREEMENT. See each file header for details.

Description
No description provided
Readme BSD-3-Clause 714 MiB
Languages
C++ 83.3%
Python 7.8%
Starlark 5.5%
Objective-C++ 1.7%
Emacs Lisp 0.6%
Other 1%