Skip to content

Commit 2e477af

Browse files
committed
Merge remote-tracking branch 'upstream/main' into copilot/fix-issue-5103-tests
# Conflicts: # docs/ReleaseNotes.md
2 parents 2fcaf36 + bb168c9 commit 2e477af

245 files changed

Lines changed: 7600 additions & 8272 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/clang-format-checker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3838
with:
3939
repository: microsoft/DirectXShaderCompiler
40-
ref: ${{ github.base_ref }}
40+
ref: ${{ github.event.repository.default_branch }}
4141
sparse-checkout: |
4242
utils/git/requirements_formatting.txt
4343
utils/git/code-format-helper.py
@@ -82,7 +82,7 @@ jobs:
8282
--end-rev $END_REV \
8383
--changed-files "$CHANGED_FILES"
8484
apply_diff:
85-
if: ${{ github.event_name == 'issue_comment' && endsWith(github.event.comment.body, '- [x] Check this box to apply formatting changes to this branch.') }}
85+
if: ${{ github.event_name == 'issue_comment' && github.event.comment.user.login == 'github-actions[bot]' && endsWith(github.event.comment.body, '- [x] Check this box to apply formatting changes to this branch.') }}
8686
runs-on: ubuntu-latest
8787
env:
8888
TMP_DIFF_FILE: /tmp/diff.patch
@@ -113,7 +113,7 @@ jobs:
113113
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
114114
with:
115115
repository: microsoft/DirectXShaderCompiler
116-
ref: ${{ github.base_ref }}
116+
ref: ${{ github.event.repository.default_branch }}
117117
sparse-checkout: |
118118
utils/git/requirements_formatting.txt
119119
utils/git/code-format-helper.py

azure-pipelines.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ stages:
7878

7979
variables:
8080
macOS: macOS-latest
81-
linux: Ubuntu-22.04 # FIXME: #7364, DXC does not build correctly with GCC 13+
81+
linux: Ubuntu-24.04
8282

8383
strategy:
8484
matrix:
@@ -99,13 +99,13 @@ stages:
9999
Linux_Gcc_Release:
100100
image: ${{ variables.linux }}
101101
configuration: Release
102-
CC: gcc-9
103-
CXX: g++-9
102+
CC: gcc
103+
CXX: g++
104104
Linux_Gcc_Debug:
105105
image: ${{ variables.linux }}
106106
configuration: Debug
107-
CC: gcc-9
108-
CXX: g++-9
107+
CC: gcc
108+
CXX: g++
109109
CMAKE_OPTS: -DLLVM_USE_SPLIT_DWARF=On
110110
MacOS_Clang_Release:
111111
image: ${{ variables.macOS }}
@@ -144,11 +144,6 @@ stages:
144144
displayName: 'Installing dependencies'
145145
condition: eq(variables['image'], variables['linux'])
146146
147-
- bash: |
148-
sudo apt-get install g++-9 -y
149-
displayName: 'Installing g++-9'
150-
condition: and(eq(variables['CXX'], 'g++-9'), eq(variables['image'], variables['linux']))
151-
152147
- bash: |
153148
brew update
154149
brew install ninja

cmake/config-ix.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ string(REPLACE " " ";" LLVM_BINDINGS_LIST "${LLVM_BINDINGS}")
573573

574574
# HLSL Change Begin - Metal IR Converter
575575
find_package(MetalIRConverter)
576-
if (METAL_IRCONVERTER_FOUND)
576+
if (MetalIRConverter_FOUND)
577577
set(ENABLE_METAL_CODEGEN On)
578578
message(STATUS "Enabling Metal Support")
579579
add_definitions(-DENABLE_METAL_CODEGEN)
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
find_path(METAL_IRCONVERTER_INCLUDE_DIR metal_irconverter.h
1+
find_path(MetalIRConverter_INCLUDE_DIR metal_irconverter.h
22
HINTS /usr/local/include/metal_irconverter
33
DOC "Path to metal IR converter headers"
44
)
55

6-
find_library(METAL_IRCONVERTER_LIB NAMES metalirconverter
6+
find_library(MetalIRConverter_LIB NAMES metalirconverter
77
PATH_SUFFIXES lib
88
)
99

1010
include(FindPackageHandleStandardArgs)
11-
FIND_PACKAGE_HANDLE_STANDARD_ARGS(METAL_IRCONVERTER
12-
REQUIRED_VARS METAL_IRCONVERTER_LIB METAL_IRCONVERTER_INCLUDE_DIR)
11+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MetalIRConverter
12+
REQUIRED_VARS MetalIRConverter_LIB MetalIRConverter_INCLUDE_DIR)
1313

14-
message(STATUS "Metal IR Converter Include Dir: ${METAL_IRCONVERTER_INCLUDE_DIR}")
15-
message(STATUS "Metal IR Converter Library: ${METAL_IRCONVERTER_LIB}")
16-
mark_as_advanced(METAL_IRCONVERTER_LIB METAL_IRCONVERTER_INCLUDE_DIR)
14+
message(STATUS "Metal IR Converter Include Dir: ${MetalIRConverter_INCLUDE_DIR}")
15+
message(STATUS "Metal IR Converter Library: ${MetalIRConverter_LIB}")
16+
mark_as_advanced(MetalIRConverter_LIB MetalIRConverter_INCLUDE_DIR)

cmake/modules/HCT.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ function(add_hlsl_hctgen mode)
6767
${opcodes_json})
6868

6969
get_filename_component(output_extension ${full_output} LAST_EXT)
70+
string(SUBSTRING ${output_extension} 1 -1 output_extension_no_dot)
71+
set(target_name "${mode}_${output_extension_no_dot}")
7072

7173
if (CLANG_FORMAT_EXE AND output_extension MATCHES "\.h|\.cpp|\.inl")
7274
set(format_cmd COMMAND ${CLANG_FORMAT_EXE} -i ${temp_output})
@@ -132,8 +134,8 @@ function(add_hlsl_hctgen mode)
132134
DEPENDS ${output}
133135
COMMENT "Verifying clang-format results...")
134136

135-
add_custom_target(${mode}
137+
add_custom_target(${target_name}
136138
DEPENDS ${temp_output}.stamp)
137139

138-
add_dependencies(HCTGen ${mode})
140+
add_dependencies(HCTGen ${target_name})
139141
endfunction()

cmake/modules/HandleLLVMOptions.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ if(NOT LLVM_FORCE_USE_OLD_TOOLCHAIN)
1616
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
1717
message(FATAL_ERROR "Host GCC version must be at least 4.7!")
1818
endif()
19+
# GCC 13 has a known miscompilation bug in -funswitch-loops
20+
# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109934) that causes
21+
# widespread test failures at -O3. Disable -funswitch-loops for GCC 13.
22+
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0 AND
23+
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
24+
add_compile_options(-fno-unswitch-loops)
25+
message(STATUS "Disabling -funswitch-loops due to GCC 13 miscompilation bug (PR109934)")
26+
endif()
1927
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
2028
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
2129
message(FATAL_ERROR "Host Clang version must be at least 3.1!")

docs/CommandGuide/FileCheck.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ OPTIONS
6060
-verify``. With this option FileCheck will verify that input does not contain
6161
warnings not covered by any ``CHECK:`` patterns.
6262

63+
.. option:: -D<VAR=VALUE>
64+
65+
Sets a filecheck variable ``VAR`` with value ``VALUE`` that can be used in
66+
``CHECK:`` lines.
67+
6368
.. option:: -version
6469

6570
Show the version number of this program.

0 commit comments

Comments
 (0)