[BUILD] add clang-cl to CMakeSettings (#5596)

This is for enable clang-cl build.
The change will fix build error when use clang_cl_x64_x64 with
CMakeSettings.

Still many warnings and other issue to fix.
This commit is contained in:
Xiang Li 2023-08-28 16:13:06 -04:00 коммит произвёл GitHub
Родитель d369be5685
Коммит 6a97408eb3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 40 добавлений и 8 удалений

Просмотреть файл

@ -22,6 +22,28 @@
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ]
},
{
"name": "x64-clang-cl-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-C ${projectDir}\\cmake\\caches\\PredefinedParams.cmake -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_LIT_ARGS=\"-v\"",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64_x64" ]
},
{
"name": "x64-clang-cl-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-C ${projectDir}\\cmake\\caches\\PredefinedParams.cmake -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_LIT_ARGS=\"-v\"",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64_x64" ]
},
{
"name": "x86-Release",
"generator": "Ninja",

Просмотреть файл

@ -6807,7 +6807,8 @@ Value *DxbcConverter::CastDxbcValue(Value *pValue, const CompType &SrcType, cons
return m_pBuilder->CreateBitCast(m_pBuilder->CreateSExt(pValue, Type::getInt16Ty(m_Ctx)), Type::getHalfTy(m_Ctx));
case CompType::Kind::F32:
return m_pBuilder->CreateBitCast(m_pBuilder->CreateSExt(pValue, Type::getInt32Ty(m_Ctx)), Type::getFloatTy(m_Ctx));
default: LLVM_FALLTHROUGH;
default:
break;
}
break;
@ -6831,7 +6832,8 @@ Value *DxbcConverter::CastDxbcValue(Value *pValue, const CompType &SrcType, cons
pValue = m_pBuilder->CreateSExt(pValue, Type::getInt32Ty(m_Ctx));
return CreateBitCast(pValue, CompType::getI32(), CompType::getF32());
}
default: LLVM_FALLTHROUGH;
default:
break;
}
break;
@ -6855,7 +6857,8 @@ Value *DxbcConverter::CastDxbcValue(Value *pValue, const CompType &SrcType, cons
pValue = m_pBuilder->CreateZExt(pValue, Type::getInt32Ty(m_Ctx));
return CreateBitCast(pValue, CompType::getI32(), CompType::getF32());
}
default: LLVM_FALLTHROUGH;
default:
break;
}
break;
@ -6877,7 +6880,8 @@ Value *DxbcConverter::CastDxbcValue(Value *pValue, const CompType &SrcType, cons
}
case CompType::Kind::F32:
return CreateBitCast(pValue, CompType::getI32(), CompType::getF32());
default: LLVM_FALLTHROUGH;
default:
break;
}
break;
@ -6897,7 +6901,8 @@ Value *DxbcConverter::CastDxbcValue(Value *pValue, const CompType &SrcType, cons
}
case CompType::Kind::F32:
return m_pBuilder->CreateFPExt(pValue, Type::getFloatTy(m_Ctx));
default: LLVM_FALLTHROUGH;
default:
break;
}
break;
@ -6917,11 +6922,13 @@ Value *DxbcConverter::CastDxbcValue(Value *pValue, const CompType &SrcType, cons
return CreateBitCast(pValue, CompType::getF32(), CompType::getI32());
case CompType::Kind::F16:
return m_pBuilder->CreateFPTrunc(pValue, Type::getHalfTy(m_Ctx));
default: LLVM_FALLTHROUGH;
default:
break;
}
break;
default: LLVM_FALLTHROUGH;
default:
break;
}
DXASSERT(false, "unsupported cast combination");
@ -7084,7 +7091,8 @@ CompType DxbcConverter::InferOperandType(const D3D10ShaderBinary::CInstruction &
}
}
default: LLVM_FALLTHROUGH;
default:
break;
}
}

Просмотреть файл

@ -825,6 +825,8 @@ DXIL::PrimitiveTopology GetPrimitiveTopology(D3D10_SB_PRIMITIVE_TOPOLOGY Topolog
case D3D10_SB_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ: LLVM_FALLTHROUGH;
case D3D10_SB_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ: LLVM_FALLTHROUGH;
case D3D10_SB_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ: LLVM_FALLTHROUGH;
default:
break;
}
IFTBOOL(false, DXC_E_INCORRECT_DXBC);