Skip to content

Commit 90b2935

Browse files
authored
Workarounds for arm64ec build (#4808)
I encountered two issues building arm64ec. First CMake and/or link.exe seem to have a disagreement about flag ordering and how to handle `/INCREMENTAL`. This change results in disabling kernel-mode debugging on arm64ec builds, but it means we can build... so that's a win. The other issue is that libClangSema has some files that have gotten too big, so we need `/bigobj` for Sema.
1 parent eb1b3ac commit 90b2935

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ if ( HLSL_SUPPORT_QUERY_GIT_COMMIT_INFO )
102102
endif()
103103

104104
# adjust link option to enable debugging from kernel mode; not compatible with incremental linking
105-
if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND WIN32)
105+
if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND WIN32 AND NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64EC")
106106
add_link_options(/DEBUGTYPE:CV,FIXUP,PDATA /INCREMENTAL:NO)
107107
endif()
108108

tools/clang/lib/Sema/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,11 @@ add_clang_library(clangSema
6666
clangEdit
6767
clangLex
6868
)
69+
70+
# HLSL Change Begin
71+
# Sema got too big for debug builds on arm64ec, which means it will hit
72+
# other targets too eventually.
73+
if(WIN32)
74+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
75+
endif(WIN32)
76+
# HLSL Change End

0 commit comments

Comments
 (0)