From 853922b2a8b85d2672be9ead87f17a785e1639c3 Mon Sep 17 00:00:00 2001 From: Jason Naylor Date: Mon, 23 Mar 2026 14:52:15 -0700 Subject: [PATCH] Enforce x64 compiler in native NMAKE builds Add /options:strict and /favor:AMD64 to CL_OPTS so that if an x86 cl.exe is on the PATH (e.g. from stale MSBuild node reuse), the build fails immediately with error D8043 instead of silently producing x86 binaries. Co-Authored-By: Claude Opus 4.6 --- Bld/_init.mak | 2 +- Lib/src/graphite2/graphite2.mak | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Bld/_init.mak b/Bld/_init.mak index bc341112e6..c09f58aada 100644 --- a/Bld/_init.mak +++ b/Bld/_init.mak @@ -174,7 +174,7 @@ CL_OPTS=$(CL_OPTS) /MD # JohnT: /EHa is required so that our code that converts C exceptions (access violation, div by zero) # into C++ ThrowableSd exceptions, and catches them at interface boundaries, can work # reliably. The October 1999 edition of Bugslayer in MSDN has a fuller explanation. -CL_OPTS=$(CL_OPTS) /W4 /WX /Fd"$(INT_DIR)/" /EHa /GR /GF /Zm400 /D_WIN32_WINNT=0x0500 +CL_OPTS=$(CL_OPTS) /options:strict /favor:AMD64 /W4 /WX /Fd"$(INT_DIR)/" /EHa /GR /GF /Zm400 /D_WIN32_WINNT=0x0500 PREPROCESS_OPTS=/E diff --git a/Lib/src/graphite2/graphite2.mak b/Lib/src/graphite2/graphite2.mak index eb1cc3b923..6ba3a49549 100644 --- a/Lib/src/graphite2/graphite2.mak +++ b/Lib/src/graphite2/graphite2.mak @@ -22,7 +22,7 @@ GR2_LIB=$(OUT_DIR)\graphite2.lib INCLUDE=$(INCLUDE);$(GR2_SRC);$(GR2_INC) DEFS=/DGRAPHITE2_STATIC /DWIN32 -CL_OPTS=/EHsc /Zi +CL_OPTS=/options:strict /EHsc /WX /Zi /favor:AMD64 !IF "$(BUILD_TYPE)"=="d" CL_OPTS=$(CL_OPTS) /MDd /Od