Skip to content

Commit de383e0

Browse files
Enforce x64 compiler in native NMAKE builds (#780)
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 <noreply@anthropic.com>
1 parent e58af68 commit de383e0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Bld/_init.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ CL_OPTS=$(CL_OPTS) /MD
174174
# JohnT: /EHa is required so that our code that converts C exceptions (access violation, div by zero)
175175
# into C++ ThrowableSd exceptions, and catches them at interface boundaries, can work
176176
# reliably. The October 1999 edition of Bugslayer in MSDN has a fuller explanation.
177-
CL_OPTS=$(CL_OPTS) /W4 /WX /Fd"$(INT_DIR)/" /EHa /GR /GF /Zm400 /D_WIN32_WINNT=0x0500
177+
CL_OPTS=$(CL_OPTS) /options:strict /favor:AMD64 /W4 /WX /Fd"$(INT_DIR)/" /EHa /GR /GF /Zm400 /D_WIN32_WINNT=0x0500
178178

179179
PREPROCESS_OPTS=/E
180180

Lib/src/graphite2/graphite2.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GR2_LIB=$(OUT_DIR)\graphite2.lib
2222
INCLUDE=$(INCLUDE);$(GR2_SRC);$(GR2_INC)
2323

2424
DEFS=/DGRAPHITE2_STATIC /DWIN32
25-
CL_OPTS=/EHsc /Zi
25+
CL_OPTS=/options:strict /EHsc /WX /Zi /favor:AMD64
2626

2727
!IF "$(BUILD_TYPE)"=="d"
2828
CL_OPTS=$(CL_OPTS) /MDd /Od

0 commit comments

Comments
 (0)