Skip to content

Commit

Permalink
Merge branch 'google:master' into ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
phoepsilonix committed May 12, 2024
2 parents e4d6437 + 07c5f89 commit 7257d66
Show file tree
Hide file tree
Showing 29 changed files with 140 additions and 348 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yaml
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: build
working-directory: ./src
run: |
bazel build --config oss_android package
bazel build --config oss_android package -c opt
- name: upload artifacts
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux.yaml
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: bazel build
working-directory: ./src
run: |
bazel build --config oss_linux package
bazel build --config oss_linux package -c opt
- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -71,4 +71,4 @@ jobs:
- name: bazel test
working-directory: ./src
run: |
bazel test ... --config oss_linux --build_tests_only
bazel test ... --config oss_linux --build_tests_only -c dbg
8 changes: 4 additions & 4 deletions .github/workflows/macos.yaml
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: bazel build
working-directory: ./src
run: |
bazel build --config oss_macos package --macos_cpus=arm64
bazel build --config oss_macos package --macos_cpus=arm64 -c opt
- name: upload artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
- name: bazel build
working-directory: ./src
run: |
bazel build --config oss_macos package --macos_cpus=x86_64
bazel build --config oss_macos package --macos_cpus=x86_64 -c opt
- name: upload artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
- name: bazel build
working-directory: ./src
run: |
bazel build --config oss_macos package --macos_cpus=x86_64,arm64
bazel build --config oss_macos package --macos_cpus=x86_64,arm64 -c opt
- name: upload artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- name: bazel test
working-directory: ./src
run: |
bazel test ... --config oss_macos --build_tests_only
bazel test ... --config oss_macos --build_tests_only -c dbg
# actions/cache works without this job, but having this would increase the likelihood of cache hit
# in other jobs. Another approach would be to use "needs:".
Expand Down
4 changes: 2 additions & 2 deletions src/BUILD.bazel
Expand Up @@ -36,7 +36,7 @@ load(
"mozc_select",
"mozc_select_enable_neural_language_model",
"mozc_select_enable_session_watchdog",
"mozc_select_enable_spellchecker",
"mozc_select_enable_supplemental_model",
"mozc_select_enable_usage_rewriter",
)
load("//bazel:stubs.bzl", "bzl_library")
Expand Down Expand Up @@ -105,7 +105,7 @@ cc_library(
],
) + mozc_select_enable_session_watchdog(
off = ["MOZC_DISABLE_SESSION_WATCHDOG"],
) + mozc_select_enable_spellchecker([
) + mozc_select_enable_supplemental_model([
]) + mozc_select_enable_usage_rewriter(
off = ["NO_USAGE_REWRITER"],
) + mozc_select_enable_neural_language_model([
Expand Down
8 changes: 7 additions & 1 deletion src/android/jni/BUILD.bazel
Expand Up @@ -34,7 +34,13 @@
# Usage:
# % blaze --blazerc android/blazerc build --config=android_arm android/jni:libmozc.so

load("//:build_defs.bzl", "MOZC_TAGS", "mozc_cc_library", "mozc_py_binary", "mozc_select")
load(
"//:build_defs.bzl",
"MOZC_TAGS",
"mozc_cc_library",
"mozc_py_binary",
"mozc_select",
)

mozc_cc_library(
name = "mozcjni",
Expand Down
14 changes: 3 additions & 11 deletions src/base/vlog.cc
Expand Up @@ -33,21 +33,13 @@
#include <atomic>

#include "absl/base/attributes.h"
#include "absl/flags/flag.h"

// Note that abseil HEAD has ABSL_LTS_RELEASE_VERSION undefined.
#if !defined(ABSL_LTS_RELEASE_VERSION) || ABSL_LTS_RELEASE_VERSION >= 20240116
#include "absl/flags/declare.h"
#include "absl/flags/flag.h"
#include "absl/log/flags.h" // IWYU pragma: keep
#endif // ABSL_LTS_RELEASE_VERSION >= 20240116

#if !defined(ABSL_LTS_RELEASE_VERSION) || ABSL_LTS_RELEASE_VERSION >= 20240116
// Newer version of abseil defines --v flag. We rely on it to avoid symbol
// name collision (though not recommended).
// Abseil defines --v flag. We rely on it to avoid symbol name collision (though
// not recommended).
ABSL_DECLARE_FLAG(int, v);
#else // ABSL_LTS_RELEASE_VERSION >= 20240116
ABSL_FLAG(int, v, 0, "Show all VLOG(m) messages for m <= this.");
#endif // ABSL_LTS_RELEASE_VERSION < 20240116

namespace mozc::internal {

Expand Down
2 changes: 1 addition & 1 deletion src/build_defs.bzl
Expand Up @@ -428,7 +428,7 @@ def mozc_select_enable_session_watchdog(on = [], off = []):
"//conditions:default": off,
})

def mozc_select_enable_spellchecker(on = [], off = []):
def mozc_select_enable_supplemental_model(on = [], off = []):
return select({
"//:enable_spellchecker": on,
"//conditions:default": off,
Expand Down
1 change: 0 additions & 1 deletion src/composer/BUILD.bazel
Expand Up @@ -61,7 +61,6 @@ mozc_cc_library(
"//composer/internal:transliterators",
"//config:character_form_manager",
"//config:config_handler",
"//engine:spellchecker_interface",
"//protocol:commands_cc_proto",
"//protocol:config_cc_proto",
"//testing:friend_test",
Expand Down
6 changes: 0 additions & 6 deletions src/composer/internal/BUILD.bazel
Expand Up @@ -32,18 +32,12 @@ load(
"mozc_cc_binary",
"mozc_cc_library",
"mozc_cc_test",
"mozc_py_binary",
)

package(default_visibility = [
"//:__subpackages__",
])

mozc_py_binary(
name = "gen_typing_model",
srcs = ["gen_typing_model.py"],
)

mozc_cc_library(
name = "transliterator_interface",
hdrs = ["transliterator_interface.h"],
Expand Down
234 changes: 0 additions & 234 deletions src/composer/internal/gen_typing_model.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/converter/BUILD.bazel
Expand Up @@ -34,7 +34,7 @@ load(
"mozc_cc_test",
"mozc_py_binary",
"mozc_select_enable_neural_language_model",
"mozc_select_enable_spellchecker",
"mozc_select_enable_supplemental_model",
)
load("//bazel:stubs.bzl", "bzl_library")

Expand Down

0 comments on commit 7257d66

Please sign in to comment.