From 074cd79f75c60135ce33f4e40983afb610c4be41 Mon Sep 17 00:00:00 2001 From: Chris B Date: Mon, 27 Nov 2023 22:27:08 -0600 Subject: [PATCH] Workaround non-conformant C++ in 1.8 preview (#74) This works around the DXC 1.8 preview build having non-conforant code by passing `-fpermissive` to gcc. Fixes #73 --- misc/build-dxc.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 misc/build-dxc.sh diff --git a/misc/build-dxc.sh b/misc/build-dxc.sh old mode 100644 new mode 100755 index 6a98b08..212a136 --- a/misc/build-dxc.sh +++ b/misc/build-dxc.sh @@ -16,6 +16,7 @@ URL=https://github.com/microsoft/DirectXShaderCompiler FULLNAME=dxc-${VERSION}.tar.xz OUTPUT=${ROOT}/${FULLNAME} S3OUTPUT= +EXTRA_CMAKE_ARGS= if [[ $2 =~ ^s3:// ]]; then S3OUTPUT=$2 else @@ -38,6 +39,10 @@ if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then exit fi +if [[ "${VERSION}" == "1.8.2306-preview" ]]; then + EXTRA_CMAKE_ARGS="-DCMAKE_CXX_FLAGS=-fpermissive" +fi + BUILD_DIR=$(pwd)/dxc/build DIR=$(pwd)/dxc export PATH=${PATH}:/cmake/bin @@ -45,7 +50,7 @@ git clone --recurse-submodules --depth 1 -b ${BRANCH} ${URL} ${DIR} cd ${DIR} mkdir -p ${BUILD_DIR} -cmake -S . -B ${BUILD_DIR} -G Ninja -DCMAKE_BUILD_TYPE=Release -C ./cmake/caches/PredefinedParams.cmake +cmake -S . -B ${BUILD_DIR} -G Ninja -DCMAKE_BUILD_TYPE=Release -C ./cmake/caches/PredefinedParams.cmake $EXTRA_CMAKE_ARGS cmake --build ${BUILD_DIR} export XZ_DEFAULTS="-T 0"