Skip to content

Commit

Permalink
Fix build error on Windows.
Browse files Browse the repository at this point in the history
* Follow-up to cl/704201709 and PR#1109.
* google#1109
  • Loading branch information
hiroyuki-komatsu committed Dec 18, 2024
1 parent 399f5d1 commit 6fbdd1a
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,15 @@ def mozc_win_build_target(
def mozc_win32_cc_prod_binary(
name,
executable_name_map = {}, # @unused
srcs = [], # @unused
deps = [], # @unused
linkopts = [], # @unused
srcs = [],
deps = [],
linkopts = [],
cpu = CPU.X64,
static_crt = False,
tags = MOZC_TAGS.WIN_ONLY,
win_def_file = None, # @unused
target_compatible_with = ["@platforms//os:windows"],
visibility = ["//visibility:public"], # @unused
visibility = ["//visibility:public"],
**kwargs):
"""A rule to build production binaries for Windows.
Expand All @@ -368,9 +368,22 @@ def mozc_win32_cc_prod_binary(
visibility: optional. The visibility of the target.
**kwargs: other arguments passed to mozc_cc_binary.
"""
target_name = name + "_cc_binary"
mozc_cc_binary(
name = target_name,
srcs = srcs,
deps = deps,
linkopts = linkopts,
win_def_file = win_def_file,
tags = tags,
target_compatible_with = target_compatible_with,
visibility = visibility,
**kwargs
)

mozc_win_build_target(
name = name,
target = "//data/prod:prod_binary",
target = target_name,
cpu = cpu,
static_crt = static_crt,
target_compatible_with = target_compatible_with,
Expand Down

0 comments on commit 6fbdd1a

Please sign in to comment.