Skip to content

Commit d8ad66e

Browse files
committed
update main to microsoft
2 parents 47f3137 + 2168dcb commit d8ad66e

File tree

718 files changed

+10740
-4351
lines changed

Some content is hidden

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

718 files changed

+10740
-4351
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Generate a coverage report and publish it to GitHub pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["main"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow one concurrent deployment
18+
concurrency:
19+
group: "pages"
20+
21+
jobs:
22+
# Build job
23+
build:
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 240
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v3
29+
with:
30+
submodules: true
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v2
33+
- name: Install dependencies
34+
run: sudo apt install -y ninja-build
35+
- name: Configure
36+
run: cmake -B build -G Ninja -DLLVM_PARALLEL_LINK_JOBS=1 -DLLVM_USE_LINKER=lld -DCMAKE_BUILD_TYPE=Release -DDXC_USE_LIT=On -DDXC_COVERAGE=On -C ${{github.workspace}}/cmake/caches/PredefinedParams.cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ${{github.workspace}}
37+
- name: Build
38+
run: ninja -C build test-depends
39+
- name: Test
40+
run: ninja -C build check-all
41+
- name: Generate Report
42+
run: ninja -C build generate-coverage-report
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v1
45+
with:
46+
path: ${{github.workspace}}/build/report
47+
48+
49+
# Deployment job
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
runs-on: ubuntu-latest
55+
needs: build
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v1

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*.dmp
2525
# Visual Studio Code directory.
2626
.vscode
27-
# Visual Studio 2017
27+
# Visual Studio
2828
.vs/
2929
# Test outputs
3030
*.ll.converted

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
[submodule "external/effcee"]
1414
path = external/effcee
1515
url = https://github.com/google/effcee
16+
[submodule "external/DirectX-Headers"]
17+
path = external/DirectX-Headers
18+
url = https://github.com/microsoft/DirectX-Headers.git

CMakeLists.txt

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# See docs/CMake.html for instructions about how to build LLVM with CMake.
2-
cmake_minimum_required(VERSION 2.8.12.2)
2+
cmake_minimum_required(VERSION 3.10) # HLSL Change - Require CMake 3.10.
33

44
if (NOT "${DXC_CMAKE_BEGINS_INCLUDE}" STREQUAL "")
55
include(${DXC_CMAKE_BEGINS_INCLUDE})
@@ -102,7 +102,7 @@ if ( HLSL_SUPPORT_QUERY_GIT_COMMIT_INFO )
102102
endif()
103103

104104
# adjust link option to enable debugging from kernel mode; not compatible with incremental linking
105-
if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND WIN32)
105+
if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND WIN32 AND NOT CMAKE_C_COMPILER_ARCHITECTURE_ID STREQUAL "ARM64EC")
106106
add_link_options(/DEBUGTYPE:CV,FIXUP,PDATA /INCREMENTAL:NO)
107107
endif()
108108

@@ -408,6 +408,21 @@ if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND LLVM_ENABLE_ASSERTIONS))
408408
set(LLVM_USE_HOST_TOOLS ON)
409409
endif()
410410

411+
if (LLVM_BUILD_INSTRUMENTED OR LLVM_BUILD_INSTRUMENTED_COVERAGE)
412+
if(NOT LLVM_PROFILE_MERGE_POOL_SIZE)
413+
# A pool size of 1-2 is probably sufficient on a SSD. 3-4 should be fine
414+
# for spining disks. Anything higher may only help on slower mediums.
415+
set(LLVM_PROFILE_MERGE_POOL_SIZE "4")
416+
endif()
417+
if(NOT LLVM_PROFILE_FILE_PATTERN)
418+
if(NOT LLVM_PROFILE_DATA_DIR)
419+
set(LLVM_PROFILE_FILE_PATTERN "%${LLVM_PROFILE_MERGE_POOL_SIZE}m.profraw")
420+
else()
421+
file(TO_NATIVE_PATH "${LLVM_PROFILE_DATA_DIR}/%${LLVM_PROFILE_MERGE_POOL_SIZE}m.profraw" LLVM_PROFILE_FILE_PATTERN)
422+
endif()
423+
endif()
424+
endif()
425+
411426
# All options referred to from HandleLLVMOptions have to be specified
412427
# BEFORE this include, otherwise options will not be correctly set on
413428
# first cmake run
@@ -647,6 +662,12 @@ add_subdirectory(include/dxc)
647662
# This over-specifies the dependency graph, but since generating these doesn't
648663
# really depend on anything else in the build it is safe.
649664
list(APPEND LLVM_COMMON_DEPENDS HCTGen)
665+
666+
if(EXISTS "${LLVM_MAIN_SRC_DIR}/external")
667+
add_subdirectory(external) # SPIRV change
668+
endif()
669+
include_directories(AFTER ${DIRECTX_HEADER_INCLUDE_DIR}/directx ${DIRECTX_HEADER_INCLUDE_DIR}/wsl/stubs)
670+
650671
# HLSL - Change End
651672

652673
add_subdirectory(lib)
@@ -687,10 +708,6 @@ if(WITH_POLLY)
687708
endif()
688709
endif(WITH_POLLY)
689710

690-
if(EXISTS "${LLVM_MAIN_SRC_DIR}/external")
691-
add_subdirectory(external) # SPIRV change
692-
endif()
693-
694711
if( LLVM_INCLUDE_TOOLS )
695712
add_subdirectory(tools)
696713
endif()
@@ -722,6 +739,7 @@ if( LLVM_INCLUDE_TESTS )
722739
DEPENDS ${LLVM_LIT_DEPENDS}
723740
ARGS ${LLVM_LIT_EXTRA_ARGS}
724741
)
742+
add_custom_target(test-depends DEPENDS ${LLVM_LIT_DEPENDS}) # HLSL Change
725743
endif()
726744

727745
if (LLVM_INCLUDE_DOCS)
@@ -768,6 +786,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
768786
endif()
769787
endif()
770788

789+
include(CoverageReport)
790+
771791
# Disable regeneration target for official builds as they always fun a full clean build.
772792
# This should eliminate the race-condition issue with "Cannot restore timestamp".
773793
if (HLSL_OFFICIAL_BUILD)

0 commit comments

Comments
 (0)