Redesign Win32 build transition rules #1109
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This reworks my previous commits, which aimed to make it configurable on which executable should be built with what build configurations (e.g. CRT link type, target CPU architecture).
One thing we need to further consider is the debug symbol name embedded in each artifact executable as noted in 0377ddd.
To generate debug symbols one can use
generate_pdb_file
feature. The issue is that the pdb filename is not configurable inrules_cc
. For instance, if the target name ismozc_tip32
, thenrules_cc
assumes that the output pdb file is alwaysmozc_tip32.pdb
. To make itmozc_tip32.dll.pdb
, the target name must bemozc_tip32.dll.dll
. This is why I had do rework Win32 build transition rules.Implementation note:
mozc_win32_cc_prod_binary
needs to be introduced is because the final executable name needs to be available as an input ofmozc_cc_binary
.mozc_cc_win32_library
also needs to be reworked so thatgenerate_pdb_file
feature will not be applied to it.There must be no observable change in GYP build and non-Windows bazel builds.
Closes #1108.
Issue IDs
mozc_tip32.dll
built with Bazel ismozc_tip.pdb
rather thanmozc_tip32.dll.pdb
#1108Steps to test new behaviors (if any)
bazel --bazelrc=windows.bazelrc build --config oss_windows --config release_build //win32/tip:mozc_tip32
cp bazel-bin\win32\tip\mozc_tip32.dll .
dumpbin /headers mozc_tip32.dll | findstr cv
mozc_tip32.dll.pdb
is in the output.