Skip to content

Commit

Permalink
Propagate linkshared as appropriate
Browse files Browse the repository at this point in the history
This follows up to our previous commit [1] that was to simplicy google#1109
but accidentally removed 'linkshared' from Mozc's TIP DLL targets. While
a subsequent commit [2] addressed the immediate issue by passing
'static_crt' to 'linkshared', strictly speaking they are two orthogonal
concepts. Let's decouple them to avoid future confusions.

There must be no immediate change in the final artifacts with this
commit right now.

 [1]: bc546b2
 [2]: 8d20ea6
  • Loading branch information
yukawa committed Dec 23, 2024
1 parent b7faa84 commit 3a3d404
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ def mozc_win32_cc_prod_binary(
deps = [],
features = None,
linkopts = [],
linkshared = False,
cpu = CPU.X64,
static_crt = False,
tags = MOZC_TAGS.WIN_ONLY,
Expand All @@ -362,6 +363,7 @@ def mozc_win32_cc_prod_binary(
deps: deps to build the executable.
features: features to be passed to mozc_cc_binary.
linkopts: linker options to build the executable.
linkshared: True if the target is a shared library (DLL).
cpu: optional. The target CPU architecture.
static_crt: optional. True if the target should be built with static CRT.
tags: optional. Tags for both the library and unit test targets.
Expand All @@ -377,7 +379,7 @@ def mozc_win32_cc_prod_binary(
deps = deps,
features = features,
linkopts = linkopts,
linkshared = static_crt,
linkshared = linkshared,
tags = tags,
target_compatible_with = target_compatible_with,
visibility = visibility,
Expand Down
1 change: 1 addition & 0 deletions src/win32/custom_action/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ mozc_win32_cc_prod_binary(
"Mozc": "mozc_installer_helper.dll",
"GoogleJapaneseInput": "GoogleIMEJaInstallerHelper.dll",
},
linkshared = True,
static_crt = True,
tags = MOZC_TAGS.WIN_ONLY,
target_compatible_with = ["@platforms//os:windows"],
Expand Down
2 changes: 2 additions & 0 deletions src/win32/tip/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ mozc_win32_cc_prod_binary(
"Mozc": "mozc_tip32.dll",
"GoogleJapaneseInput": "GoogleIMEJaTIP32.dll",
},
linkshared = True,
static_crt = True,
tags = MOZC_TAGS.WIN_ONLY,
target_compatible_with = ["@platforms//os:windows"],
Expand All @@ -96,6 +97,7 @@ mozc_win32_cc_prod_binary(
"/DEBUG:FULL",
"/PDBALTPATH:%_PDB%",
],
linkshared = True,
static_crt = True,
tags = MOZC_TAGS.WIN_ONLY,
target_compatible_with = ["@platforms//os:windows"],
Expand Down

0 comments on commit 3a3d404

Please sign in to comment.