Skip to content

Commit

Permalink
[ClangCL] exception related fix for ClangCL (#5496)
Browse files Browse the repository at this point in the history
Enable Exception for ClangCL.
Disable the DivByZero exception test for ClangCL.

This is for turn on ClangCL build.
  • Loading branch information
python3kgae authored Aug 21, 2023
1 parent fc63907 commit d2a0baf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function(llvm_update_compile_flags name)

# LLVM_REQUIRES_EH is an internal flag that individual
# targets can use to force EH
if((LLVM_REQUIRES_EH OR LLVM_ENABLE_EH) AND NOT CLANG_CL)
if(LLVM_REQUIRES_EH OR LLVM_ENABLE_EH) # HLSL Change - allow CLANG_CL to use EH.
if(NOT (LLVM_REQUIRES_RTTI OR LLVM_ENABLE_RTTI))
message(AUTHOR_WARNING "Exception handling requires RTTI. Enabling RTTI for ${name}")
set(LLVM_REQUIRES_RTTI ON)
Expand Down
3 changes: 2 additions & 1 deletion tools/clang/unittests/HLSL/CompilerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3764,7 +3764,8 @@ TEST_F(CompilerTest, CompileHlsl2022ThenFail) {
CheckOperationResultMsgs(pResult, &pErrorMsg, 1, false, false);
}

#if defined(_WIN32) && !(defined(_M_ARM64) || defined(_M_ARM64EC)) // this test has issues on ARM64; disable until we figure out what it going on
// this test has issues on ARM64 and clang_cl, disable until we figure out what it going on
#if defined(_WIN32) && !(defined(_M_ARM64) || defined(_M_ARM64EC) || defined(__clang__))

#pragma fenv_access(on)
#pragma optimize("", off)
Expand Down

0 comments on commit d2a0baf

Please sign in to comment.