diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5b0c5d3791..c4f7195066 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -78,7 +78,7 @@ stages: variables: macOS: macOS-latest - linux: Ubuntu-22.04 # FIXME: #7364, DXC does not build correctly with GCC 13+ + linux: Ubuntu-24.04 strategy: matrix: @@ -99,13 +99,13 @@ stages: Linux_Gcc_Release: image: ${{ variables.linux }} configuration: Release - CC: gcc-9 - CXX: g++-9 + CC: gcc + CXX: g++ Linux_Gcc_Debug: image: ${{ variables.linux }} configuration: Debug - CC: gcc-9 - CXX: g++-9 + CC: gcc + CXX: g++ CMAKE_OPTS: -DLLVM_USE_SPLIT_DWARF=On MacOS_Clang_Release: image: ${{ variables.macOS }} @@ -144,11 +144,6 @@ stages: displayName: 'Installing dependencies' condition: eq(variables['image'], variables['linux']) - - bash: | - sudo apt-get install g++-9 -y - displayName: 'Installing g++-9' - condition: and(eq(variables['CXX'], 'g++-9'), eq(variables['image'], variables['linux'])) - - bash: | brew update brew install ninja diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index f838acccf5..d5769abce7 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -16,6 +16,14 @@ if(NOT LLVM_FORCE_USE_OLD_TOOLCHAIN) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) message(FATAL_ERROR "Host GCC version must be at least 4.7!") endif() + # GCC 13 has a known miscompilation bug in -funswitch-loops + # (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109934) that causes + # widespread test failures at -O3. Disable -funswitch-loops for GCC 13. + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0 AND + CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0) + add_compile_options(-fno-unswitch-loops) + message(STATUS "Disabling -funswitch-loops due to GCC 13 miscompilation bug (PR109934)") + endif() elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1) message(FATAL_ERROR "Host Clang version must be at least 3.1!")