Skip to content

Commit

Permalink
Add visibility and features to mozc_win_build_target.
Browse files Browse the repository at this point in the history
* Support pdb file generation.

#codehealth

PiperOrigin-RevId: 707779301
  • Loading branch information
hiroyuki-komatsu committed Dec 19, 2024
1 parent 8d20ea6 commit 6b2694e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,14 @@ def mozc_win32_cc_prod_binary(
executable_name_map = {}, # @unused
srcs = [],
deps = [],
features = None,
linkopts = [],
cpu = CPU.X64,
static_crt = False,
tags = MOZC_TAGS.WIN_ONLY,
win_def_file = None,
target_compatible_with = ["@platforms//os:windows"],
visibility = ["//visibility:public"],
visibility = None,
**kwargs):
"""A rule to build production binaries for Windows.
Expand All @@ -359,6 +360,7 @@ def mozc_win32_cc_prod_binary(
executable_name_map: a map from the branding name to the executable name.
srcs: .cc files to build the executable.
deps: deps to build the executable.
features: features to be passed to mozc_cc_binary.
linkopts: linker options to build the executable.
cpu: optional. The target CPU architecture.
static_crt: optional. True if the target should be built with static CRT.
Expand All @@ -372,23 +374,25 @@ def mozc_win32_cc_prod_binary(
mozc_cc_binary(
name = target_name,
srcs = srcs,
deps = deps,
features = features,
linkopts = linkopts,
linkshared = static_crt,
tags = tags,
target_compatible_with = target_compatible_with,
visibility = visibility,
win_def_file = win_def_file,
deps = deps,
**kwargs
)

mozc_win_build_target(
name = name,
target = target_name,
cpu = cpu,
static_crt = static_crt,
target_compatible_with = target_compatible_with,
tags = tags,
target = target_name,
target_compatible_with = target_compatible_with,
visibility = visibility,
**kwargs
)

Expand Down
5 changes: 5 additions & 0 deletions src/win32/tip/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ mozc_win32_cc_prod_binary(
"Mozc": "mozc_tip64.dll",
"GoogleJapaneseInput": "GoogleIMEJaTIP64.dll",
},
features = ["generate_pdb_file"],
linkopts = [
"/DEBUG:FULL",
"/PDBALTPATH:%_PDB%",
],
static_crt = True,
tags = MOZC_TAGS.WIN_ONLY,
target_compatible_with = ["@platforms//os:windows"],
Expand Down

0 comments on commit 6b2694e

Please sign in to comment.