Skip to content

Commit 6b8f678

Browse files
damyanpgithub-actions[bot]bognerserge-sans-paille-qb
authored
Cherry-picks to fix builds with changes to build images (#7847)
Since we last built this branch there have been various changes to the compilers and build images we use that require code updates to allow this to continue building. These changes impact our testing / building, or guide type checking in the compiler, and so are NFC as far as the product is concerned. ### Workaround broken ARM64X / MSVC_BUILD_AS_X builds (#7827) (cherry picked from commit ea7e910) ### Use WARP from nuget by default (#7427) (cherry picked from commit 33dd542) Manually moved changes from HlslExecTestUtils.h into ExecutionTest.cpp ### Add hctbuild.cmd parameter to specify the nuget config file (#7785) (cherry picked from commit 06dcb00) ### Change type of DiagnosticHandlerTy (cherry picked from commit b05a11a) ### Type safe version of MachinePassRegistry (cherry picked from commit 4ddee81) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Justin Bogner <[email protected]> Co-authored-by: Serge Guelton <[email protected]>
1 parent 0352ada commit 6b8f678

24 files changed

Lines changed: 310 additions & 423 deletions

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ stages:
4444
displayName: 'DXIL Tests'
4545
- script: |
4646
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
47-
call utils\hct\hcttest.cmd -$(configuration) exec-warp
48-
displayName: 'DXIL Execution Tests (Nuget WARP)'
47+
call utils\hct\hcttest.cmd -$(configuration) exec
48+
displayName: 'DXIL Execution Tests'
4949
5050
- job: Nix
5151
timeoutInMinutes: 120

cmake/modules/AddLLVM.cmake

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,35 @@ function(set_output_directory target bindir libdir)
222222
set(moddir ${libdir})
223223
endif()
224224
if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
225+
# HLSL change begin: work around broken MSVC_BUILD_AS_X
226+
get_target_property(target_type ${target} TYPE)
227+
if(target_type STREQUAL "SHARED_LIBRARY" AND MSVC_BUILD_AS_X EQUAL 1)
228+
set(arm64x_workaround 1)
229+
message(NOTICE "Working around ARM64X / MSVC_BUILD_AS_X bug for ${target}")
230+
else()
231+
set(arm64x_workaround 0)
232+
endif()
233+
# HLSL change end
234+
225235
foreach(build_mode ${CMAKE_CONFIGURATION_TYPES})
226236
string(TOUPPER "${build_mode}" CONFIG_SUFFIX)
227237
string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} bi ${bindir})
228238
string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} li ${libdir})
229239
string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} mi ${moddir})
240+
241+
# HLSL change begin: work around broken MSVC_BUILD_AS_X
242+
#
243+
# MSVC_BUILD_AS_X generates a vcxproj that builds for both ARM64 and
244+
# ARM64EC, but these two platforms are only visible in msbuild. It also
245+
# currently configures the import libraries to all be output to the same
246+
# location, which means it's a race for if we get the ARM64 or ARM64X
247+
# version there. The appended $(PLATFORM) is evaluated by msbuild at
248+
# build time to separate the ARM64EC from ARM64 builds.
249+
if(arm64x_workaround EQUAL 1)
250+
string(APPEND li "/$(PLATFORM)")
251+
endif()
252+
# HLSL change end
253+
230254
set_target_properties(${target} PROPERTIES "RUNTIME_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${bi})
231255
set_target_properties(${target} PROPERTIES "ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${li})
232256
set_target_properties(${target} PROPERTIES "LIBRARY_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${mi})

cmake/modules/Nuget.cmake

Lines changed: 0 additions & 233 deletions
This file was deleted.

include/dxc/DxilValidation/DxilValidation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class PrintDiagnosticContext {
8181
bool HasWarnings() const;
8282
void Handle(const llvm::DiagnosticInfo &DI);
8383

84-
static void PrintDiagnosticHandler(const llvm::DiagnosticInfo &DI,
84+
static void PrintDiagnosticHandler(const llvm::DiagnosticInfo *DI,
8585
void *Context);
8686
};
8787

0 commit comments

Comments
 (0)