This is an automated email from the ASF dual-hosted git repository.

leginee pushed a commit to branch bazel-migration
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 285dc532fbf31ff8162b82d77eb84f08e0f5ec44
Author: Peter Kovacs <[email protected]>
AuthorDate: Fri Jul 24 12:04:59 2026 +0200

    build/win64: CPPU_ENV global + bridge alias + x64 staging wiring [P5]
    
    Inject CPPU_ENV via the toolchain arch_defines (x86 msci / x64 mscx) and
    strip the per-module "CPPU_ENV=msci" literal from 93 BUILD files -- same
    lever as P2's _X86_/INTEL.  The env name (cppu lbnames.h) selects the
    C++/UNO bridge DLL each module loads at runtime; the hardcoded msci made
    every x64 UNO DLL/tool request msci_uno.dll (mismatch surfaced as
    "cannot get uno environments!" once i18npool's saxparser exec tool ran).
    
    Add //main/bridges:cpp_uno_bridge, an arch-selecting alias (mscx on x64,
    msci on x86, resolved in the consumer's config), so exec-config codegen
    tools (i18npool saxparser) never pull the x86-only msci_uno into the x64
    exec config; stage the bridge under its real basename in
    localedata_pipeline.
    
    Staging: select() the runtime bridge (mscx/msci) plus an amd64 CRT
    application manifest (soffice.exe/bin.manifest) on x64 -- an x86
    processorArchitecture manifest is rejected against the amd64 msvcr90.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    (cherry picked from commit b724bcdaf3285da573804956eaa3bed34a0c5ab2)
---
 build/rules/localedata_pipeline.bzl          | 18 ++++++++++++++----
 build/toolchain/BUILD.bazel                  | 12 ++++++++++--
 main/UnoControls/BUILD.bazel                 |  1 -
 main/accessibility/BUILD.bazel               |  1 -
 main/animations/BUILD.bazel                  |  1 -
 main/avmedia/BUILD.bazel                     |  1 -
 main/basctl/BUILD.bazel                      |  1 -
 main/basebmp/BUILD.bazel                     |  1 -
 main/basegfx/BUILD.bazel                     |  1 -
 main/basic/BUILD.bazel                       |  1 -
 main/binaryurp/BUILD.bazel                   |  1 -
 main/bridges/BUILD.bazel                     | 16 +++++++++++++++-
 main/canvas/BUILD.bazel                      |  1 -
 main/chart2/BUILD.bazel                      |  1 -
 main/codemaker/BUILD.bazel                   |  1 -
 main/comphelper/BUILD.bazel                  |  1 -
 main/configmgr/BUILD.bazel                   |  1 -
 main/connectivity/BUILD.bazel                |  1 -
 main/cppcanvas/BUILD.bazel                   |  1 -
 main/cppu/BUILD.bazel                        |  1 -
 main/cppuhelper/BUILD.bazel                  |  1 -
 main/cpputools/BUILD.bazel                   |  1 -
 main/cui/BUILD.bazel                         |  1 -
 main/dbaccess/BUILD.bazel                    |  1 -
 main/desktop/BUILD.bazel                     |  7 ++++++-
 main/desktop/util/amd64/soffice.exe.manifest | 15 +++++++++++++++
 main/drawinglayer/BUILD.bazel                |  1 -
 main/dtrans/BUILD.bazel                      |  1 -
 main/editeng/BUILD.bazel                     |  1 -
 main/embeddedobj/BUILD.bazel                 |  1 -
 main/embedserv/BUILD.bazel                   |  1 -
 main/eventattacher/BUILD.bazel               |  1 -
 main/extensions/BUILD.bazel                  |  1 -
 main/fileaccess/BUILD.bazel                  |  1 -
 main/filter/BUILD.bazel                      |  1 -
 main/forms/BUILD.bazel                       |  1 -
 main/formula/BUILD.bazel                     |  1 -
 main/fpicker/BUILD.bazel                     |  1 -
 main/framework/BUILD.bazel                   |  1 -
 main/i18npool/BUILD.bazel                    |  1 -
 main/i18nutil/BUILD.bazel                    |  1 -
 main/idl/BUILD.bazel                         |  1 -
 main/idlc/BUILD.bazel                        |  1 -
 main/io/BUILD.bazel                          |  1 -
 main/javaunohelper/BUILD.bazel               |  1 -
 main/jvmaccess/BUILD.bazel                   |  1 -
 main/jvmfwk/BUILD.bazel                      |  1 -
 main/l10ntools/BUILD.bazel                   |  1 -
 main/lingucomponent/BUILD.bazel              |  1 -
 main/linguistic/BUILD.bazel                  |  1 -
 main/mysqlc/BUILD.bazel                      |  1 -
 main/oox/BUILD.bazel                         |  1 -
 main/package/BUILD.bazel                     |  1 -
 main/pyuno/BUILD.bazel                       |  1 -
 main/rdbmaker/BUILD.bazel                    |  1 -
 main/registry/BUILD.bazel                    |  1 -
 main/remotebridges/BUILD.bazel               |  1 -
 main/reportdesign/BUILD.bazel                |  1 -
 main/rsc/BUILD.bazel                         |  1 -
 main/sal/BUILD.bazel                         |  1 -
 main/salhelper/BUILD.bazel                   |  1 -
 main/sax/BUILD.bazel                         |  1 -
 main/sc/BUILD.bazel                          |  1 -
 main/scaddins/BUILD.bazel                    |  1 -
 main/sccomp/BUILD.bazel                      |  1 -
 main/scripting/BUILD.bazel                   |  1 -
 main/sd/BUILD.bazel                          |  1 -
 main/sdext/BUILD.bazel                       |  1 -
 main/sfx2/BUILD.bazel                        |  1 -
 main/shell/BUILD.bazel                       |  1 -
 main/slideshow/BUILD.bazel                   |  1 -
 main/sot/BUILD.bazel                         |  1 -
 main/staging/BUILD.bazel                     | 14 ++++++++++++--
 main/starmath/BUILD.bazel                    |  1 -
 main/stoc/BUILD.bazel                        |  1 -
 main/store/BUILD.bazel                       |  1 -
 main/svgio/BUILD.bazel                       |  1 -
 main/svl/BUILD.bazel                         |  1 -
 main/svtools/BUILD.bazel                     |  1 -
 main/svx/BUILD.bazel                         |  1 -
 main/sw/BUILD.bazel                          |  1 -
 main/test/BUILD.bazel                        |  1 -
 main/toolkit/BUILD.bazel                     |  1 -
 main/tools/BUILD.bazel                       |  2 --
 main/ucb/BUILD.bazel                         |  1 -
 main/ucbhelper/BUILD.bazel                   |  1 -
 main/unotools/BUILD.bazel                    |  1 -
 main/unoxml/BUILD.bazel                      |  1 -
 main/uui/BUILD.bazel                         |  1 -
 main/vbahelper/BUILD.bazel                   |  1 -
 main/vcl/BUILD.bazel                         |  1 -
 main/winaccessibility/BUILD.bazel            |  1 -
 main/writerfilter/BUILD.bazel                |  1 -
 main/xmlhelp/BUILD.bazel                     |  1 -
 main/xmloff/BUILD.bazel                      |  1 -
 main/xmlreader/BUILD.bazel                   |  1 -
 main/xmlscript/BUILD.bazel                   |  1 -
 main/xmlsecurity/BUILD.bazel                 |  1 -
 98 files changed, 72 insertions(+), 103 deletions(-)

diff --git a/build/rules/localedata_pipeline.bzl 
b/build/rules/localedata_pipeline.bzl
index cac14b7f83..5d54832ecc 100644
--- a/build/rules/localedata_pipeline.bzl
+++ b/build/rules/localedata_pipeline.bzl
@@ -46,11 +46,14 @@ _DLL_RENAME = [
     # bootstrap.uno's simpleregistry/textualservices parses the XML components
     # rdb via xmlreader.dll.
     ("_xmlreader_dll",  "xmlreader.dll"),
-    # Binary UNO bridge (msci C++ <=> UNO) — loaded by name to map interfaces
-    # across the saxparser <-> expwrap component boundary.
-    ("_msci_uno_dll",   "msci_uno.dll"),
 ]
 
+# Binary UNO bridge (C++ <=> UNO) — loaded by name (msci_uno.dll on x86,
+# mscx_uno.dll on x64) to map interfaces across the saxparser <-> expwrap
+# component boundary.  Staged under its real basename so the arch-selected DLL
+# keeps its own name (the name saxparser's CPPU_ENV asks the loader for).
+_BRIDGE_ATTR = "_cpp_uno_bridge"
+
 def _localedata_gen_impl(ctx):
     saxparser    = ctx.executable._saxparser
     # services_rdb emits both the .rdb and its .input list; keep the .rdb only.
@@ -69,6 +72,9 @@ def _localedata_gen_impl(ctx):
     for attr, runtime in _DLL_RENAME:
         rename[getattr(ctx.file, attr)] = runtime
     dll_files = [getattr(ctx.file, attr) for attr, _ in _DLL_RENAME]
+    # C++/UNO bridge: stage under its real basename (msci_uno.dll / 
mscx_uno.dll).
+    bridge_dll = getattr(ctx.file, _BRIDGE_ATTR)
+    dll_files.append(bridge_dll)
 
     # ── Stage saxparser.exe + DLLs + CRT into one flat tools dir 
──────────────
     all_to_stage = [saxparser] + dll_files + crt_files
@@ -153,7 +159,11 @@ localedata_gen = rule(
         "_expwrap_dll":    attr.label(default = "//main/sax:expwrap",          
    allow_single_file = True, cfg = "exec"),
         "_bootstrap_uno":  attr.label(default = "//main/stoc:bootstrap.uno",   
    allow_single_file = True, cfg = "exec"),
         "_xmlreader_dll":  attr.label(default = "//main/xmlreader:xmlreader",  
     allow_single_file = True, cfg = "exec"),
-        "_msci_uno_dll":   attr.label(default = "//main/bridges:msci_uno",     
     allow_single_file = True, cfg = "exec"),
+        # C++/UNO bridge, cfg="exec" (built for the x64 host).  The alias 
selects
+        # msci_uno.dll (x86) / mscx_uno.dll (x64) in the exec config — so on 
this
+        # x64 host it resolves mscx_uno and never pulls the x86-only msci_uno 
into
+        # the exec config.  Staged under its real basename (see _DLL_RENAME).
+        "_cpp_uno_bridge": attr.label(default = 
"//main/bridges:cpp_uno_bridge",     allow_single_file = True, cfg = "exec"),
         "_crt_dlls": attr.label(
             default = "//main/external/msvcp90:msvcp90",
             allow_files = True,
diff --git a/build/toolchain/BUILD.bazel b/build/toolchain/BUILD.bazel
index 76c8cd8601..19fc963dd0 100644
--- a/build/toolchain/BUILD.bazel
+++ b/build/toolchain/BUILD.bazel
@@ -81,7 +81,11 @@ cc_toolchain_config(
     default_link_flags     = ["/MACHINE:X86"],
     # Per-arch CPU defines injected globally (Win64 Phase 2) so no module BUILD
     # carries an arch flag.  x86 → _X86_=1, INTEL.  WIN32 stays in the modules.
-    arch_defines           = ["_X86_=1", "INTEL"],
+    # CPPU_ENV (the C++/UNO environment name — lbnames.h picks the bridge DLL:
+    # msci_uno.dll here) is arch-dependent exactly like _X86_/_AMD64_, so it is
+    # injected globally too (mirrors solenv wntmsci*.mk); the per-module
+    # CPPU_ENV=msci literals were stripped (would override this on x64).
+    arch_defines           = ["_X86_=1", "INTEL", "CPPU_ENV=msci"],
     dbg_mode_debug_flag      = "",   # /Z7 embeds debug info in objects at 
compile; linker PDB (/DEBUG via --features=generate_pdb) uses the per-action 
mspdbsrv wrapper above for parallel links
     fastbuild_mode_debug_flag = "",  # same — /Z7 embeds, no compile-time PDB
     supports_parse_showincludes = False,
@@ -195,7 +199,11 @@ cc_toolchain_config(
     default_link_flags     = ["/MACHINE:X64"],
     # Per-arch CPU defines injected globally (Win64 Phase 2).  x64 → _AMD64_=1,
     # X86_64.  WIN32 stays in the modules; the x64 compiler auto-defines 
_WIN64.
-    arch_defines           = ["_AMD64_=1", "X86_64"],
+    # CPPU_ENV=mscx is the x64 C++/UNO environment name (lbnames.h → loads
+    # mscx_uno.dll); injected globally like the CPU defines so every UNO 
DLL/tool
+    # in the x64 build requests the mscx bridge consistently (the per-module
+    # CPPU_ENV=msci literals were stripped so they can't override this).
+    arch_defines           = ["_AMD64_=1", "X86_64", "CPPU_ENV=mscx"],
     # ml64 rejects the x86 /coff and /Cx flags — assemble with /c only.
     masm_flags             = ["/c"],
     # x64 has no SafeSEH — drop /SAFESEH:NO from the generate_pdb link.
diff --git a/main/UnoControls/BUILD.bazel b/main/UnoControls/BUILD.bazel
index f3d4fc4a8b..b60e041fef 100644
--- a/main/UnoControls/BUILD.bazel
+++ b/main/UnoControls/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
 ]
diff --git a/main/accessibility/BUILD.bazel b/main/accessibility/BUILD.bazel
index eef4336722..4f7a01b40f 100644
--- a/main/accessibility/BUILD.bazel
+++ b/main/accessibility/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "ACCESSIBILITY_DLLIMPLEMENTATION",
diff --git a/main/animations/BUILD.bazel b/main/animations/BUILD.bazel
index 9c438eaa8d..0ec76bb370 100644
--- a/main/animations/BUILD.bazel
+++ b/main/animations/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/avmedia/BUILD.bazel b/main/avmedia/BUILD.bazel
index ea72c76789..66e5d1c54e 100644
--- a/main/avmedia/BUILD.bazel
+++ b/main/avmedia/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/basctl/BUILD.bazel b/main/basctl/BUILD.bazel
index 63af557944..f0ff782935 100644
--- a/main/basctl/BUILD.bazel
+++ b/main/basctl/BUILD.bazel
@@ -7,7 +7,6 @@ load("//build/rules:sdi_target.bzl", "sdi_target")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "SUPD=680",
diff --git a/main/basebmp/BUILD.bazel b/main/basebmp/BUILD.bazel
index 08ba7d042e..87220255c1 100644
--- a/main/basebmp/BUILD.bazel
+++ b/main/basebmp/BUILD.bazel
@@ -3,7 +3,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "BASEBMP_DLLIMPLEMENTATION",
diff --git a/main/basegfx/BUILD.bazel b/main/basegfx/BUILD.bazel
index d047db8d6d..dc7cc021d0 100644
--- a/main/basegfx/BUILD.bazel
+++ b/main/basegfx/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "BASEGFX_DLLIMPLEMENTATION",
diff --git a/main/basic/BUILD.bazel b/main/basic/BUILD.bazel
index 3f11f1978c..f4701e57d4 100644
--- a/main/basic/BUILD.bazel
+++ b/main/basic/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/binaryurp/BUILD.bazel b/main/binaryurp/BUILD.bazel
index 5022b59ac3..200abefe66 100644
--- a/main/binaryurp/BUILD.bazel
+++ b/main/binaryurp/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
 ]
diff --git a/main/bridges/BUILD.bazel b/main/bridges/BUILD.bazel
index e9ed08c788..4c4a83cea1 100644
--- a/main/bridges/BUILD.bazel
+++ b/main/bridges/BUILD.bazel
@@ -19,7 +19,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     # Needed by vtablefactory.cxx for the Windows code path
     "LEAK_STATIC_DATA",
@@ -172,6 +171,21 @@ filegroup(
     visibility = ["//visibility:public"],
 )
 
+# ── cpp_uno_bridge — arch-selecting alias for the C++/UNO bridge DLL 
──────────
+# Resolves to msci_uno.dll (x86) or mscx_uno.dll (x64) IN THE CONSUMER'S 
CONFIG.
+# This is what exec-config codegen tools (e.g. i18npool saxparser) depend on: 
the
+# select keys off the exec platform (x86_64 host), so it picks the compatible
+# mscx_uno and never pulls the x86-only msci_uno into an x64 exec config.  
Runtime
+# staging (target config) can also use it instead of a hand-written select().
+alias(
+    name = "cpp_uno_bridge",
+    actual = select({
+        "//build:arch_x64": ":mscx_uno",
+        "//conditions:default": ":msci_uno",
+    }),
+    visibility = ["//visibility:public"],
+)
+
 # ── java_uno bridge (Java↔C++ UNO bridge) ────────────────────────────────
 # Two cooperating artifacts:
 #   • java_uno.dll  — native JNI bridge (this cc_binary)
diff --git a/main/canvas/BUILD.bazel b/main/canvas/BUILD.bazel
index 5602bd1cb5..c5168b182b 100644
--- a/main/canvas/BUILD.bazel
+++ b/main/canvas/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/chart2/BUILD.bazel b/main/chart2/BUILD.bazel
index 59d574819e..5d6de66d1a 100644
--- a/main/chart2/BUILD.bazel
+++ b/main/chart2/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rename_file", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/codemaker/BUILD.bazel b/main/codemaker/BUILD.bazel
index 0690824abd..e653659218 100644
--- a/main/codemaker/BUILD.bazel
+++ b/main/codemaker/BUILD.bazel
@@ -11,7 +11,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/comphelper/BUILD.bazel b/main/comphelper/BUILD.bazel
index 4c6fc29291..cd188f0fa1 100644
--- a/main/comphelper/BUILD.bazel
+++ b/main/comphelper/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:gtest_test.bzl", "gtest_test")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "COMPHELPER_DLLIMPLEMENTATION",
diff --git a/main/configmgr/BUILD.bazel b/main/configmgr/BUILD.bazel
index 977d76921b..a2f120cc91 100644
--- a/main/configmgr/BUILD.bazel
+++ b/main/configmgr/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
 ]
diff --git a/main/connectivity/BUILD.bazel b/main/connectivity/BUILD.bazel
index efe38df92c..41c43cc9ba 100644
--- a/main/connectivity/BUILD.bazel
+++ b/main/connectivity/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/cppcanvas/BUILD.bazel b/main/cppcanvas/BUILD.bazel
index de4771d7ed..2638dd41eb 100644
--- a/main/cppcanvas/BUILD.bazel
+++ b/main/cppcanvas/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/cppu/BUILD.bazel b/main/cppu/BUILD.bazel
index 8d9cd217cb..a210cae309 100644
--- a/main/cppu/BUILD.bazel
+++ b/main/cppu/BUILD.bazel
@@ -14,7 +14,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32", "_MT",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/cppuhelper/BUILD.bazel b/main/cppuhelper/BUILD.bazel
index 15b32d4614..4cab9c74fa 100644
--- a/main/cppuhelper/BUILD.bazel
+++ b/main/cppuhelper/BUILD.bazel
@@ -15,7 +15,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/cpputools/BUILD.bazel b/main/cpputools/BUILD.bazel
index 36544449b6..dd4ccd5537 100644
--- a/main/cpputools/BUILD.bazel
+++ b/main/cpputools/BUILD.bazel
@@ -3,7 +3,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/cui/BUILD.bazel b/main/cui/BUILD.bazel
index 79f4a663ee..6a4a394887 100644
--- a/main/cui/BUILD.bazel
+++ b/main/cui/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "SUPD=680",
diff --git a/main/dbaccess/BUILD.bazel b/main/dbaccess/BUILD.bazel
index e727afaf86..f8c7d1efd8 100644
--- a/main/dbaccess/BUILD.bazel
+++ b/main/dbaccess/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rename_file", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/desktop/BUILD.bazel b/main/desktop/BUILD.bazel
index 976c15248a..1f96cab28d 100644
--- a/main/desktop/BUILD.bazel
+++ b/main/desktop/BUILD.bazel
@@ -7,7 +7,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
@@ -1146,4 +1145,10 @@ rsc_res(
 
 exports_files(glob(["**/*.component"]))
 exports_files(["util/soffice.exe.manifest", "util/soffice.bin.manifest"])
+# amd64 (x64) release app manifest — same as util/soffice.exe.manifest but with
+# processorArchitecture="amd64" in the assemblyIdentity + Microsoft.VC90.CRT /
+# Common-Controls deps.  On x64 the loader rejects an x86 CRT manifest against
+# the amd64 msvcr90.dll (see project_win64_source_fixes #4), so staging selects
+# this variant.  Same basename so it still stages as soffice.exe/bin.manifest.
+exports_files(["util/amd64/soffice.exe.manifest"])
 
diff --git a/main/desktop/util/amd64/soffice.exe.manifest 
b/main/desktop/util/amd64/soffice.exe.manifest
new file mode 100644
index 0000000000..f0498fb410
--- /dev/null
+++ b/main/desktop/util/amd64/soffice.exe.manifest
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+  <assemblyIdentity version="1.0.0.0" processorArchitecture="amd64" 
name="OpenOffice" type="win32" />
+  <description>http://www.openoffice.org</description>
+  <dependency>
+    <dependentAssembly>
+      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" 
version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" 
processorArchitecture="amd64"/>
+    </dependentAssembly>
+  </dependency>
+  <dependency>
+    <dependentAssembly>
+      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" 
version="9.0.30729.1" processorArchitecture="amd64" 
publicKeyToken="1fc8b3b9a1e18e3b"/>
+    </dependentAssembly>
+  </dependency>
+</assembly>
diff --git a/main/drawinglayer/BUILD.bazel b/main/drawinglayer/BUILD.bazel
index 639630532b..9df6794120 100644
--- a/main/drawinglayer/BUILD.bazel
+++ b/main/drawinglayer/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/dtrans/BUILD.bazel b/main/dtrans/BUILD.bazel
index f49fc35c73..3b6c77e2c0 100644
--- a/main/dtrans/BUILD.bazel
+++ b/main/dtrans/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
 ]
 
diff --git a/main/editeng/BUILD.bazel b/main/editeng/BUILD.bazel
index 8ee31a4651..42514b19ed 100644
--- a/main/editeng/BUILD.bazel
+++ b/main/editeng/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/embeddedobj/BUILD.bazel b/main/embeddedobj/BUILD.bazel
index a80056765c..59726208f6 100644
--- a/main/embeddedobj/BUILD.bazel
+++ b/main/embeddedobj/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/embedserv/BUILD.bazel b/main/embedserv/BUILD.bazel
index 99386e9cab..6915f7c234 100644
--- a/main/embedserv/BUILD.bazel
+++ b/main/embedserv/BUILD.bazel
@@ -16,7 +16,6 @@ _ATL_REQUIRED = select({
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/eventattacher/BUILD.bazel b/main/eventattacher/BUILD.bazel
index 88d3b3c4cc..732e2af9bb 100644
--- a/main/eventattacher/BUILD.bazel
+++ b/main/eventattacher/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
 ]
diff --git a/main/extensions/BUILD.bazel b/main/extensions/BUILD.bazel
index 2e31ad3c25..99d2d7571c 100644
--- a/main/extensions/BUILD.bazel
+++ b/main/extensions/BUILD.bazel
@@ -30,7 +30,6 @@ filegroup(
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/fileaccess/BUILD.bazel b/main/fileaccess/BUILD.bazel
index 3e6f3a7c78..d21e6a9ceb 100644
--- a/main/fileaccess/BUILD.bazel
+++ b/main/fileaccess/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "FILEACCESS_DLLIMPLEMENTATION",
diff --git a/main/filter/BUILD.bazel b/main/filter/BUILD.bazel
index 7006f0f478..c6d88e296d 100644
--- a/main/filter/BUILD.bazel
+++ b/main/filter/BUILD.bazel
@@ -7,7 +7,6 @@ load("//main/filter:filter_rules.bzl", "FILTER_COPTS", 
"FILTER_HDR_DEPS", "graph
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/forms/BUILD.bazel b/main/forms/BUILD.bazel
index 5b9981004d..f16531f2af 100644
--- a/main/forms/BUILD.bazel
+++ b/main/forms/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/formula/BUILD.bazel b/main/formula/BUILD.bazel
index 790efc230a..2b2ebbb86b 100644
--- a/main/formula/BUILD.bazel
+++ b/main/formula/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/fpicker/BUILD.bazel b/main/fpicker/BUILD.bazel
index bf5de2a007..5511159628 100644
--- a/main/fpicker/BUILD.bazel
+++ b/main/fpicker/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
 ]
 
diff --git a/main/framework/BUILD.bazel b/main/framework/BUILD.bazel
index a77a229f9c..4dc6dbb126 100644
--- a/main/framework/BUILD.bazel
+++ b/main/framework/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/i18npool/BUILD.bazel b/main/i18npool/BUILD.bazel
index de215f5543..ab34362ce8 100644
--- a/main/i18npool/BUILD.bazel
+++ b/main/i18npool/BUILD.bazel
@@ -7,7 +7,6 @@ load("//build/rules:localedata_pipeline.bzl", "localedata_gen")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "I18NPOOL_DLLIMPLEMENTATION",
diff --git a/main/i18nutil/BUILD.bazel b/main/i18nutil/BUILD.bazel
index d2c867ca37..b7080d7a3a 100644
--- a/main/i18nutil/BUILD.bazel
+++ b/main/i18nutil/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "I18NUTIL_DLLIMPLEMENTATION",
diff --git a/main/idl/BUILD.bazel b/main/idl/BUILD.bazel
index 1c6c2dc8b5..5eda904d3d 100644
--- a/main/idl/BUILD.bazel
+++ b/main/idl/BUILD.bazel
@@ -4,7 +4,6 @@ load("//build/rules:sdi_target.bzl", "svidl_bundle")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "snprintf=_snprintf",
     "IDL_COMPILER",
 ]
diff --git a/main/idlc/BUILD.bazel b/main/idlc/BUILD.bazel
index 51e77991d6..aef6218ee5 100644
--- a/main/idlc/BUILD.bazel
+++ b/main/idlc/BUILD.bazel
@@ -16,7 +16,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32", "_MT",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/io/BUILD.bazel b/main/io/BUILD.bazel
index 009fabfe32..5a0028b366 100644
--- a/main/io/BUILD.bazel
+++ b/main/io/BUILD.bazel
@@ -15,7 +15,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
 ]
diff --git a/main/javaunohelper/BUILD.bazel b/main/javaunohelper/BUILD.bazel
index 62b5034c6f..2281c9ec49 100644
--- a/main/javaunohelper/BUILD.bazel
+++ b/main/javaunohelper/BUILD.bazel
@@ -14,7 +14,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "SHAREDLIB", "_DLL_",
     "SOLAR_JAVA",
 ]
diff --git a/main/jvmaccess/BUILD.bazel b/main/jvmaccess/BUILD.bazel
index cde6c14b02..61dc53faf3 100644
--- a/main/jvmaccess/BUILD.bazel
+++ b/main/jvmaccess/BUILD.bazel
@@ -11,7 +11,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "SOLAR_JAVA",
diff --git a/main/jvmfwk/BUILD.bazel b/main/jvmfwk/BUILD.bazel
index 394f6024f8..7a3f29ba91 100644
--- a/main/jvmfwk/BUILD.bazel
+++ b/main/jvmfwk/BUILD.bazel
@@ -17,7 +17,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "JVMFWK_DLLIMPLEMENTATION",
diff --git a/main/l10ntools/BUILD.bazel b/main/l10ntools/BUILD.bazel
index 698d33b174..0a4c70da47 100644
--- a/main/l10ntools/BUILD.bazel
+++ b/main/l10ntools/BUILD.bazel
@@ -9,7 +9,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "snprintf=_snprintf",
     "YY_NEVER_INTERACTIVE=1",   # suppress flex interactive-mode check
diff --git a/main/lingucomponent/BUILD.bazel b/main/lingucomponent/BUILD.bazel
index d826ee57e7..1eef5615d5 100644
--- a/main/lingucomponent/BUILD.bazel
+++ b/main/lingucomponent/BUILD.bazel
@@ -7,7 +7,6 @@ _DEFINES = [
     "GUI",
     "WIN32",
     "_WINDOWS",
-    "CPPU_ENV=msci",
     "snprintf=_snprintf",
     "SUPD=680",
 ]
diff --git a/main/linguistic/BUILD.bazel b/main/linguistic/BUILD.bazel
index 9b21c55f35..6a53ef672f 100644
--- a/main/linguistic/BUILD.bazel
+++ b/main/linguistic/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/mysqlc/BUILD.bazel b/main/mysqlc/BUILD.bazel
index 8d297380b6..6b7d8ef8bb 100644
--- a/main/mysqlc/BUILD.bazel
+++ b/main/mysqlc/BUILD.bazel
@@ -10,7 +10,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "SUPD=680",
diff --git a/main/oox/BUILD.bazel b/main/oox/BUILD.bazel
index 5034bdcc02..db226abe37 100644
--- a/main/oox/BUILD.bazel
+++ b/main/oox/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/package/BUILD.bazel b/main/package/BUILD.bazel
index 6cae000e1b..b261a204e6 100644
--- a/main/package/BUILD.bazel
+++ b/main/package/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "PACKAGE_DLLIMPLEMENTATION",
diff --git a/main/pyuno/BUILD.bazel b/main/pyuno/BUILD.bazel
index 76d8131009..8fa9924547 100644
--- a/main/pyuno/BUILD.bazel
+++ b/main/pyuno/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
 ]
diff --git a/main/rdbmaker/BUILD.bazel b/main/rdbmaker/BUILD.bazel
index d7e335013d..df853100ba 100644
--- a/main/rdbmaker/BUILD.bazel
+++ b/main/rdbmaker/BUILD.bazel
@@ -14,7 +14,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/registry/BUILD.bazel b/main/registry/BUILD.bazel
index d52ce725f4..7d678858da 100644
--- a/main/registry/BUILD.bazel
+++ b/main/registry/BUILD.bazel
@@ -12,7 +12,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32", "_MT",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/remotebridges/BUILD.bazel b/main/remotebridges/BUILD.bazel
index 54ebea9607..ce1ccb360a 100644
--- a/main/remotebridges/BUILD.bazel
+++ b/main/remotebridges/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
 ]
diff --git a/main/reportdesign/BUILD.bazel b/main/reportdesign/BUILD.bazel
index c734a8e09f..10afb43f31 100644
--- a/main/reportdesign/BUILD.bazel
+++ b/main/reportdesign/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "REPORTDESIGN_DLLIMPLEMENTATION",
diff --git a/main/rsc/BUILD.bazel b/main/rsc/BUILD.bazel
index bdf20e9c69..5c9bf6a379 100644
--- a/main/rsc/BUILD.bazel
+++ b/main/rsc/BUILD.bazel
@@ -13,7 +13,6 @@ cc_library(
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "snprintf=_snprintf",
 ]
diff --git a/main/sal/BUILD.bazel b/main/sal/BUILD.bazel
index bb7255e3a6..f471f2f380 100644
--- a/main/sal/BUILD.bazel
+++ b/main/sal/BUILD.bazel
@@ -15,7 +15,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32", "_MT",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/salhelper/BUILD.bazel b/main/salhelper/BUILD.bazel
index b9770a4d30..c18e6218aa 100644
--- a/main/salhelper/BUILD.bazel
+++ b/main/salhelper/BUILD.bazel
@@ -12,7 +12,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32", "_MT",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/sax/BUILD.bazel b/main/sax/BUILD.bazel
index c4edef0901..bcb30ed4d6 100644
--- a/main/sax/BUILD.bazel
+++ b/main/sax/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:gtest_test.bzl", "gtest_test")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
 ]
diff --git a/main/sc/BUILD.bazel b/main/sc/BUILD.bazel
index b05addfe4a..2623ee76fb 100644
--- a/main/sc/BUILD.bazel
+++ b/main/sc/BUILD.bazel
@@ -7,7 +7,6 @@ load("//build/rules:sdi_target.bzl", "sdi_target")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/scaddins/BUILD.bazel b/main/scaddins/BUILD.bazel
index d00a0d1037..9cd2fb02bf 100644
--- a/main/scaddins/BUILD.bazel
+++ b/main/scaddins/BUILD.bazel
@@ -7,7 +7,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "SUPD=680",
diff --git a/main/sccomp/BUILD.bazel b/main/sccomp/BUILD.bazel
index 36f07d3a45..38b5ecf955 100644
--- a/main/sccomp/BUILD.bazel
+++ b/main/sccomp/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "SUPD=680",
diff --git a/main/scripting/BUILD.bazel b/main/scripting/BUILD.bazel
index 8bb262450d..8ceb3e20fc 100644
--- a/main/scripting/BUILD.bazel
+++ b/main/scripting/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/sd/BUILD.bazel b/main/sd/BUILD.bazel
index 31dce90a68..097e04782c 100644
--- a/main/sd/BUILD.bazel
+++ b/main/sd/BUILD.bazel
@@ -7,7 +7,6 @@ load("//build/rules:sdi_target.bzl", "sdi_target")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/sdext/BUILD.bazel b/main/sdext/BUILD.bazel
index 61dad4adc2..86b40380d2 100644
--- a/main/sdext/BUILD.bazel
+++ b/main/sdext/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/sfx2/BUILD.bazel b/main/sfx2/BUILD.bazel
index 5003b4fb42..43df0687f3 100644
--- a/main/sfx2/BUILD.bazel
+++ b/main/sfx2/BUILD.bazel
@@ -7,7 +7,6 @@ load("//build/rules:sdi_target.bzl", "sdi_package", 
"sdi_target")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/shell/BUILD.bazel b/main/shell/BUILD.bazel
index 0e999bec7c..2c7055de0d 100644
--- a/main/shell/BUILD.bazel
+++ b/main/shell/BUILD.bazel
@@ -38,7 +38,6 @@ _SHLXT_COPTS = [
 _UNO_DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
diff --git a/main/slideshow/BUILD.bazel b/main/slideshow/BUILD.bazel
index ce9fe9f193..020c8e8afa 100644
--- a/main/slideshow/BUILD.bazel
+++ b/main/slideshow/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/sot/BUILD.bazel b/main/sot/BUILD.bazel
index 1e669c7c3e..bd556bb3e7 100644
--- a/main/sot/BUILD.bazel
+++ b/main/sot/BUILD.bazel
@@ -3,7 +3,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "SOT_DLLIMPLEMENTATION",
diff --git a/main/staging/BUILD.bazel b/main/staging/BUILD.bazel
index 5cd65a96bd..615c7956df 100644
--- a/main/staging/BUILD.bazel
+++ b/main/staging/BUILD.bazel
@@ -41,7 +41,12 @@ filegroup(
 # collect_outputs.deps does not accept raw source files.
 filegroup(
     name = "soffice_app_manifest",
-    srcs = ["//main/desktop:util/soffice.exe.manifest"],
+    srcs = select({
+        # x64 needs an amd64 CRT/assembly manifest — the loader rejects an x86
+        # processorArchitecture manifest against the amd64 msvcr90.dll 
(0xC000007B).
+        "//build:arch_x64": ["//main/desktop:util/amd64/soffice.exe.manifest"],
+        "//conditions:default": ["//main/desktop:util/soffice.exe.manifest"],
+    }),
 )
 
 # ── Flat program/ files (DLLs, EXEs, RDBs, ZIPs, .py scripts, .ini) ─────────
@@ -71,7 +76,6 @@ collect_outputs(
         "//main/stoc:namingservice.uno",
         "//main/stoc:proxyfac.uno",
         "//main/binaryurp:binaryurp",
-        "//main/bridges:msci_uno",
         # Native JNI bridge (java_uno.dll). Loaded by jurt's NativeThreadPool 
via
         # System.loadLibrary("java_uno") once Java is enabled. The Java side
         # (java_uno.jar) needs the program/classes/ classpath staging, which 
does
@@ -368,6 +372,12 @@ collect_outputs(
         "//conditions:default": [
             ":soffice_app_manifest",
         ],
+    }) + select({
+        # C++/UNO bridge, loaded by name from CPPU_ENV: msci_uno.dll on x86,
+        # mscx_uno.dll on x64.  Each target is target_compatible_with its own
+        # arch, so the unused one must not appear in the other arch's deps.
+        "//build:arch_x64": ["//main/bridges:mscx_uno"],
+        "//conditions:default": ["//main/bridges:msci_uno"],
     }),
 )
 
diff --git a/main/starmath/BUILD.bazel b/main/starmath/BUILD.bazel
index 08b9efe50a..02a71517c3 100644
--- a/main/starmath/BUILD.bazel
+++ b/main/starmath/BUILD.bazel
@@ -7,7 +7,6 @@ load("//build/rules:sdi_target.bzl", "sdi_target")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/stoc/BUILD.bazel b/main/stoc/BUILD.bazel
index f9478655a6..14998bc85e 100644
--- a/main/stoc/BUILD.bazel
+++ b/main/stoc/BUILD.bazel
@@ -18,7 +18,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
 ]
diff --git a/main/store/BUILD.bazel b/main/store/BUILD.bazel
index 5c8d8f2042..9999eabb50 100644
--- a/main/store/BUILD.bazel
+++ b/main/store/BUILD.bazel
@@ -12,7 +12,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32", "_MT",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/svgio/BUILD.bazel b/main/svgio/BUILD.bazel
index d2113e5e2e..73f4b259a5 100644
--- a/main/svgio/BUILD.bazel
+++ b/main/svgio/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/svl/BUILD.bazel b/main/svl/BUILD.bazel
index 376a2d005c..e6c39278f1 100644
--- a/main/svl/BUILD.bazel
+++ b/main/svl/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/svtools/BUILD.bazel b/main/svtools/BUILD.bazel
index 3e0fe4ea95..0dce111fa1 100644
--- a/main/svtools/BUILD.bazel
+++ b/main/svtools/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "_HAS_ITERATOR_DEBUGGING=0",
diff --git a/main/svx/BUILD.bazel b/main/svx/BUILD.bazel
index 729072a18e..29cb72bc25 100644
--- a/main/svx/BUILD.bazel
+++ b/main/svx/BUILD.bazel
@@ -7,7 +7,6 @@ load("//build/rules:sdi_target.bzl", "sdi_package", 
"sdi_target")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/sw/BUILD.bazel b/main/sw/BUILD.bazel
index 29cd183efb..cb8d873536 100644
--- a/main/sw/BUILD.bazel
+++ b/main/sw/BUILD.bazel
@@ -7,7 +7,6 @@ load("//build/rules:sdi_target.bzl", "sdi_target")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/test/BUILD.bazel b/main/test/BUILD.bazel
index fb1f1f06ff..0eb2079979 100644
--- a/main/test/BUILD.bazel
+++ b/main/test/BUILD.bazel
@@ -13,7 +13,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "SHAREDLIB", "_DLL_",
     "OOO_DLLIMPLEMENTATION_TEST",
     "snprintf=_snprintf",
diff --git a/main/toolkit/BUILD.bazel b/main/toolkit/BUILD.bazel
index 5d80d70a3a..e5b06cb0a5 100644
--- a/main/toolkit/BUILD.bazel
+++ b/main/toolkit/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/tools/BUILD.bazel b/main/tools/BUILD.bazel
index 7fe0f964a6..76b60b1862 100644
--- a/main/tools/BUILD.bazel
+++ b/main/tools/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:gtest_test.bzl", "gtest_test")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "TOOLS_DLLIMPLEMENTATION",
@@ -251,7 +250,6 @@ gtest_test(
     defines = [
         "WNT", "GUI", "WIN32",
         "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-        "CPPU_ENV=msci", 
         "snprintf=_snprintf",
     ],
     deps = [
diff --git a/main/ucb/BUILD.bazel b/main/ucb/BUILD.bazel
index 8eed1dd828..45c1cfcccc 100644
--- a/main/ucb/BUILD.bazel
+++ b/main/ucb/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/ucbhelper/BUILD.bazel b/main/ucbhelper/BUILD.bazel
index 8a752965b2..66e236a167 100644
--- a/main/ucbhelper/BUILD.bazel
+++ b/main/ucbhelper/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "UCBHELPER_DLLIMPLEMENTATION",
diff --git a/main/unotools/BUILD.bazel b/main/unotools/BUILD.bazel
index 6622bc0dd2..11b235f2e1 100644
--- a/main/unotools/BUILD.bazel
+++ b/main/unotools/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "UNOTOOLS_DLLIMPLEMENTATION",
diff --git a/main/unoxml/BUILD.bazel b/main/unoxml/BUILD.bazel
index 7e1f2e5606..36d26ecab4 100644
--- a/main/unoxml/BUILD.bazel
+++ b/main/unoxml/BUILD.bazel
@@ -3,7 +3,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/uui/BUILD.bazel b/main/uui/BUILD.bazel
index 8c8fc92333..3b26524b13 100644
--- a/main/uui/BUILD.bazel
+++ b/main/uui/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/vbahelper/BUILD.bazel b/main/vbahelper/BUILD.bazel
index 400db0f8f9..509f5bd761 100644
--- a/main/vbahelper/BUILD.bazel
+++ b/main/vbahelper/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/vcl/BUILD.bazel b/main/vcl/BUILD.bazel
index 2887a03f9c..3bcf7e3ef8 100644
--- a/main/vcl/BUILD.bazel
+++ b/main/vcl/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/winaccessibility/BUILD.bazel 
b/main/winaccessibility/BUILD.bazel
index 17b495bd9c..d67adc3f30 100644
--- a/main/winaccessibility/BUILD.bazel
+++ b/main/winaccessibility/BUILD.bazel
@@ -13,7 +13,6 @@ _ATL_REQUIRED = select({
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/writerfilter/BUILD.bazel b/main/writerfilter/BUILD.bazel
index 61e1c4d7a6..20a6ca71da 100644
--- a/main/writerfilter/BUILD.bazel
+++ b/main/writerfilter/BUILD.bazel
@@ -8,7 +8,6 @@ load(":ooxml_ns_rules.bzl", "OOXML_NS", 
"ooxml_ns_factory_rules")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
     "snwprintf=_snwprintf",
diff --git a/main/xmlhelp/BUILD.bazel b/main/xmlhelp/BUILD.bazel
index 438d14c38f..2775041fe1 100644
--- a/main/xmlhelp/BUILD.bazel
+++ b/main/xmlhelp/BUILD.bazel
@@ -16,7 +16,6 @@ exports_files(glob([
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/xmloff/BUILD.bazel b/main/xmloff/BUILD.bazel
index 8d934155e4..c80cd1c419 100644
--- a/main/xmloff/BUILD.bazel
+++ b/main/xmloff/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]
diff --git a/main/xmlreader/BUILD.bazel b/main/xmlreader/BUILD.bazel
index c38b4d0445..0212a9cd42 100644
--- a/main/xmlreader/BUILD.bazel
+++ b/main/xmlreader/BUILD.bazel
@@ -12,7 +12,6 @@ _COPTS = [
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
 ]
 
diff --git a/main/xmlscript/BUILD.bazel b/main/xmlscript/BUILD.bazel
index ba6338f446..59cda1d1dd 100644
--- a/main/xmlscript/BUILD.bazel
+++ b/main/xmlscript/BUILD.bazel
@@ -5,7 +5,6 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK",
     "SHAREDLIB", "_DLL_",
     "XCR_DLLIMPLEMENTATION",
diff --git a/main/xmlsecurity/BUILD.bazel b/main/xmlsecurity/BUILD.bazel
index fee63d9325..2189c059df 100644
--- a/main/xmlsecurity/BUILD.bazel
+++ b/main/xmlsecurity/BUILD.bazel
@@ -6,7 +6,6 @@ load("//build/rules:rsc_pipeline.bzl", "rsc_res")
 _DEFINES = [
     "WNT", "GUI", "WIN32",
     "WINVER=0x0500", "_WIN32_WINNT=0x0500", "_WIN32_IE=0x0500",
-    "CPPU_ENV=msci", 
     "FULL_DESK", "SHAREDLIB", "_DLL_",
     "snprintf=_snprintf",
 ]

Reply via email to