From 90fb8f860d77d5145a235d239e9bd72323dd85a6 Mon Sep 17 00:00:00 2001 From: Emma Haruka Iwao Date: Wed, 1 Mar 2023 11:09:45 +0900 Subject: [PATCH] winmain: Force the Windows subsystem The source file has a pragma comment for msvc, but it doesn't work for other compilers. All targets that depend on this winmain library will have the linkopt. PiperOrigin-RevId: 513093371 --- src/base/win32/BUILD.bazel | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/base/win32/BUILD.bazel b/src/base/win32/BUILD.bazel index 3e835f814..62ef10274 100644 --- a/src/base/win32/BUILD.bazel +++ b/src/base/win32/BUILD.bazel @@ -169,6 +169,8 @@ mozc_cc_binary( mozc_cc_library( name = "winmain", hdrs = ["winmain.h"], + # Force the Windows subsystem + linkopts = ["/SUBSYSTEM:WINDOWS"], tags = MOZC_TAGS.WIN_ONLY, target_compatible_with = ["@platforms//os:windows"], visibility = [