This is the first part towards removing the dependency on Docker from
our build instructions for Linux desktop and Android (#1181).
This commit makes it clear that you can build 'libmozc.so' on both Linux
and macOS by the same Bazel command with actually demonstrating it in
.github/workflows/android.yaml
that 'libmozc.so' can be built on both Linux and macOS GitHub Actions
runners.
With above our 'Dockerfile' can stop setting up Android NDK since
'build_mozc_in_docker.md' does not mention Android any more.
This commit is only about the build instructions of 'libmozc.so' for
Android. There must be no difference in the final artifacts.
PiperOrigin-RevId: 729468755
As we are about to complete bzlmod migration (#1002), let's also update
the build instructions to make it clear that "MODULE.bazel" will be the
file to be customized depending on differences in Linux distributions
and packagers' needs.
PiperOrigin-RevId: 680748113
This is a relatively large update with several breaking changes.
- Most of the code in `//base:logging` is now removed.
- Logging calls are now handled by `@com_google_absl//absl/log`. This means:
- Log message formats will change.
- Important: If you have existing log files and run non-release builds (more precisely `!defined(MOZC_NO_LOGGING)`), your files will contain mixed formats after this commit. You may want to remove or rename the existing one.
- Flag deprecations
- `--colored_log`: they're not supported by Abseil.
- `--logtostderr`: this flag had a inconsistent behavior with a google-internal flag of the same name (nor it doesn't make sense for mozc to consolidate the semantics), and is not provided by Abseil.
- Note: There's no longer a way to disable log files in debug builds. A configuration option might be added later if this proves problematic.
The Abseil logging library is packed with many features. It provides out-of-box integration with the Windows debugger and allows you to adjust the verbosity of your logs using command-line flags (e.g., `--stderrthreshold=0` to see all INFO level logs and above). For a full list of features, take a look at their documentation and source code.
PiperOrigin-RevId: 610006013
By setting 'configure = True' to 'repository_rule' when defining an
external repository, the repository will be re-evaluated by running the
following command [1].
bazel sync --configure
Hopefully this command can fix most of mysterious build failures due to
stale external repositories and/or build toolchanins, which cannot be
simply fixed by 'bazel clean'.
[1]: 80edda5b7b/site/en/extending/repo.md (L156-L168)
PiperOrigin-RevId: 580265652
This is a follow up to my previous commit [1], which aimed to build
'libmozc.so' for relevant architectures.
Although in the above commit I believe I followed exactly the same step
explained in the Bazel document [2], it seems that artifact files are
not ready to run on the actual Android devices. Perhaps it might be
because the above approach is for those who want to build native
libraries for Android without building an APK, which is somewhat
not-a-major use case and may not be well maintained. This is why I
ended up building a temporary fat APK only to extract native libraries
from it.
Basically what this commit does are:
1. Build a fat APK, which depends on 'mozcjni' cc_library target.
2. Extract native libraries from the APK and zip it as native_libs.zip
The temporary APK used here is completely empty and used only for
building purpose.
The 'package' meta target is updated to point to the native library
build target, which is 'android/jni:native_libs'.
bazel build --config oss_android package
ls bazel-bin/android/jni/native_libs.zip
'.bazelrc' is also updated because Android build starts using the
following options instead.
* --android_crosstool_top=@androidndk//:toolchain
* --fat_apk_cpu=armeabi-v7a,arm64-v8a,x86,x86_64
Dockerfile is also updated because now Android build requires not only
Android NDK but also Android SDK.
This commit only affects Android build target. Other build target
should continue to success without installing Android SDK/NDK.
Closes#840.
[1]: 5a6e457b72
[2]: https://bazel.build/docs/android-ndk#cclibrary-android
[3]: https://bazel.build/docs/android-ndk
PiperOrigin-RevId: 578420951
With this commit, Linux build starts linking to Qt6.
Here are things needed to use Qt6 in Ubuntu 22.04.
* Qt6 uses 'libexec' rather than 'bin' to host tools like 'uic'.
* Qt6 requires 'libgl-dev' in Ubuntu 22.04.
* Ubuntu 22.04 uses Qt 6.2.4, where you cannot use pkg-config for Qt6
due to QTBUG-86080 [1]. This commit works around it by injecting
files like Qt6Core.pc files with 'PKG_CONFIG_PATH' environment
variable.
[1]: https://bugreports.qt.io/browse/QTBUG-86080
PiperOrigin-RevId: 558016590
This follows up to bb52df2437.
With this commit we use Ubuntu 22.04 as the reference build environment
for Mozc for Linux and Android.
This commit also updates NDK version from 'r21b' to 'r25c' as otherwise
Android build fails.
Also the default Clang version in Ubuntu 22.04 is '14' thus we do not
need to explicitly set them in 'CC' and 'CXX'.
This is also a preparation of Qt6 migration (#775), as Ubuntu 20.04 does
not have Qt6 in their official repository.
Closes#763.
PiperOrigin-RevId: 552728127
* local_repository uses googletest's WORKSPACE and treats googletest as a separate repository.
* new_local_repository treats googletest as a part of Mozc's respository.
* We no longer need to specify "-- -thired_party/..." for unit tests to avoid errors.
#codehaalth
PiperOrigin-RevId: 531765928
This is a follow up to my c04a115f9c for #729.
With `--build_tests_only`, we can tell bazel to build targets that are only necessary to run tests, which drastically saves time.
https://bazel.build/docs/user-manual#build-tests-only
#codehealth
PiperOrigin-RevId: 527581234
With this CL, --qtver configure option will be removed and Mozc no
longer supports to be built with Qt 4.
BUG=#327
TEST=
REF_BUG=26887740
REF_CL=141386550
REF_TIME=2016-12-08T11:43:38+09:00
REF_TIME_RAW=1481165018 +0900
This CL renames doc to docs/ on GitHub, just in case in future we want
to expose web pages on GitHub Pages [1].
[1]: https://github.com/blog/2228-simpler-github-pages-publishing
BUG=
TEST=
REF_BUG=
REF_CL=130706872
REF_TIME=2016-08-18T18:22:05-07:00
REF_TIME_RAW=1471569725 -0700