Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 3a396c7

Browse files
committed
Update llpc from commit c78d3da1
lgc: Report unfolded original threadgroup size when overrideThreadGroupSize is set [CMake] Add header files to Lgc CMake file [NFC] Rename class PatchNullFragShader to GenerateNullFragmentShader Add module data cache to vkCreateShaderModule Replace CreateGEP with CreateInBoundsGEP Make decodeInOutMetaRecursively() as a utility function [Continuations] Improve error message [Continuations] Remove invalid assert [Continuations] Remove continuation state argument from 'lgc.cps' functions lgc/shaderdbg: patch the relocation table according to the mapping table from SDL lgc: Mark applicable LgcDialect and Builder ops as NoDivergenceSource Fix CTS issues of optimizing PointSize write [Continuations] Write CFG to Dot [LowerBufferOperations] Check for uniform buffer pointers for s_buffer_load Add GL state into per-stage hash [compilerutils] Make ensureUnifiedReturn() as a utility function lgc: Allow rayGen local resource to be uniform [Continuations] Use UTC_AVOID on custom lit tests. [LGC] Emit readfirstlane intrinsic for the uniform argument of the image Heuristically determine uniform image descriptor/sampler [NFC] Change pass StringRef name [RT] Revamp hit attribute handling [LGC] Optimize Output Export Calls by Eliminating Redundant Bitcasts for 32-bit Floats [lgc] Fix tests with shared libs Fix InsertPosition deprecation warnings Update checks of two lgc tests for build errors Adjust the layout of tessellation input LDS [Continuations] Cleanup 'CleanupContinuations' pass Import the shader option viewIndexFromDeviceIndex [Continuations] Clean up lgc.cps branching in 'LowerRaytracingPipeline' llvmraytracing: Rename ShaderStageMetadata to RtShaderStageMetadata lgc: call setUserDataSpillUsage if option forceUserDataSpill is set Clean up macros and build options [NFC] Rename pass PatchPeepholeOpt to PeepholeOptimization. Remove traces of LLPC_ENABLE_EXCEPTION Split CPS Stack Lowering from Entry Point Mutate [Continuations] Propagate llpc_version interface compile definitions to lit config Remove old LLVM_MAIN_REVISION checks [LowerBufferOperations] Fix invalid read of descriptor info [NFC] Rename file Patch to LgcLower in the LGC stage Promote llvm-dialects submodule [NFC] Rename pass PatchPreparePipelineAbi to PreparePipelineAbi Fix a NGG culling regression [llvmraytracing] Fix unused variable warnings in release builds [NFC] Rename pass PatchReadFirstLane to LowerReadFirstLane. Avoid "hides overloaded virtual function" warning [lgc/test] Add tests for uniform strided buffers [LowerBufferOperations] Do not add stride to buffer descriptors if we generate s_buffer_loads [NFC] Rename pass PatchResourceCollect to CollectResourceUsage [llvmraytracing] Improve replacement of lgc.cps.jump in 'CpsStackLowering' Some minor fixes of GS message [Continuations] Utility for writing module to a file lgc: add contract flag on adjustIj [cmake] Update cmake/macro options names Fix fragment outputs for graphics pipeline library [llvmraytracing] Linter: Check for await calls Refactor multi-threaded compiles, add parallelForWithContext lgc: Error on leftover dialect ops on debug build Use overload of CreateIntrinsic with implicit mangling [llvmraytracing] Unfold struct argument for resume functions Move ModuleBunch into compilerutils [llvmraytracing] Fix unused variable warning [llvmraytracing] Add getStartFunc helper Move MbStandardInstrumentations into compilerutils rt: fix multi-threaded compiles Preserve afn flag for gl_Position lgc: update comments of the descriptor argument in CreateImage* interface [LGC] Fix the build error for sparse matrix [NFC] Rename pass PatchWorkarounds to ApplyWorkarounds. [Continuations] Remove legacy await handling from 'SpecializeDriverShaders' Fix lgc test runtime error: FDot2Gfx1010.lgc [Continuations] Return 'void' from shaders. Fix amdllpc shadertest error: standalone.rmiss [Continuations] Cache replaced intrinsics lgc: support column major int4 cooperative matrix on gfx11 ImageBuilder: re-add the flag check for enforceReadfirstlane Update tests for new LLVM upstream
1 parent b36b68f commit 3a396c7

File tree

486 files changed

+8989
-31086
lines changed

Some content is hidden

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

486 files changed

+8989
-31086
lines changed

CMakeLists.txt

Lines changed: 34 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -25,112 +25,60 @@
2525

2626
cmake_minimum_required(VERSION 3.21)
2727

28-
project(VKGC LANGUAGES C CXX)
28+
project(LLPCrepo LANGUAGES C CXX)
2929

3030
### Standalone LLPC build handling
3131
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
3232
include(cmake/CompilerStandalone.cmake)
3333
set(LLPC_IS_STANDALONE ON)
3434
endif()
3535

36+
### Find LLVM (needed by llpc_version.cmake).
37+
include("cmake/findllvm.cmake")
38+
3639
### Version info ###
3740
include(cmake/llpc_version.cmake)
38-
if(NOT ICD_BUILD_LLPC)
39-
set(DISABLE_LLPC_VERSION_USES_LLVM ON)
40-
endif()
4141

4242
add_llpc_version_projects()
4343

44-
### Top-level VKGC Interface ###
45-
add_library(vkgc INTERFACE)
46-
47-
### VKGC header-only library ###
48-
add_library(vkgc_headers INTERFACE)
49-
50-
target_link_libraries(vkgc_headers INTERFACE llpc_version)
51-
5244
### Cached Project Options #############################################################################################
5345
option(LLPC_BUILD_TOOLS "LLPC build all tools" OFF)
54-
### Options that affect the headers ####################################################################################
55-
#if VKI_BUILD_GFX11
56-
if(LLPC_BUILD_GFX11)
57-
target_compile_definitions(vkgc_headers INTERFACE VKI_BUILD_GFX11)
58-
endif()
59-
#endif
60-
61-
if(VKI_RAY_TRACING)
62-
if(NOT LLPC_IS_STANDALONE)
63-
target_compile_definitions(vkgc_headers INTERFACE HAVE_GPURT_SHIM)
64-
endif()
65-
66-
target_compile_definitions(vkgc_headers INTERFACE VKI_RAY_TRACING)
67-
target_compile_definitions(vkgc_headers INTERFACE GPURT_CLIENT_INTERFACE_MAJOR_VERSION=${GPURT_CLIENT_INTERFACE_MAJOR_VERSION})
68-
endif()
6946

70-
target_link_libraries(vkgc INTERFACE vkgc_headers)
47+
#if LLPC_RAY_TRACING
48+
option(LLPC_RAY_TRACING "Enable raytracing" OFF)
49+
#endif
50+
#if LLPC_AMD_YUV_IMAGE
51+
option(LLPC_AMD_YUV_IMAGE "Build with AMD_YUV_IMAGE" OFF)
52+
#endif
53+
#if LLPC_AMD_LVR_INTEROP
54+
option(LLPC_AMD_LVR_INTEROP "Build with AMD_LVR_INTEROP" OFF)
55+
#endif
7156

72-
### Expose header files ################################################################################################
73-
target_include_directories(vkgc_headers
74-
INTERFACE
75-
${PROJECT_SOURCE_DIR}/include
57+
### VKGC aspects ###################################################################
58+
# For drivers that use VKGC, as the interface to the LLPC front-end
59+
if (FALSE
60+
OR ICD_BUILD_LLPC
7661
)
77-
78-
### external SPIRV headers #########################################################
79-
if (NOT SPIRV_HEADERS_PATH)
80-
if(EXISTS ${PROJECT_SOURCE_DIR}/../SPIRV-Headers)
81-
set(SPIRV_HEADERS_PATH ${PROJECT_SOURCE_DIR}/../SPIRV-Headers CACHE PATH "The path of SPIRV headers.")
82-
elseif(EXISTS ${PROJECT_SOURCE_DIR}/../../../../SPIRV-Headers)
83-
set(SPIRV_HEADERS_PATH ${PROJECT_SOURCE_DIR}/../../../../SPIRV-Headers CACHE PATH "The path of SPIRV headers.")
84-
endif()
62+
include("cmake/vkgc.cmake")
8563
endif()
8664

87-
### Interface Target ###################################################################################################
88-
### SPIRV Interface ###
89-
add_library(khronos_spirv_interface INTERFACE)
90-
91-
if(EXISTS ${SPIRV_HEADERS_PATH})
92-
target_include_directories(khronos_spirv_interface
93-
INTERFACE
94-
${SPIRV_HEADERS_PATH}/include
95-
${PROJECT_SOURCE_DIR}/include/khronos
96-
)
97-
if (NOT SPIRV_HEADERS_PATH_INTERNAL)
98-
target_compile_definitions(khronos_spirv_interface
99-
INTERFACE
100-
EXTERNAL_SPIRV_HEADERS=1
101-
)
102-
endif()
103-
else()
104-
target_include_directories(khronos_spirv_interface
105-
INTERFACE
106-
${PROJECT_SOURCE_DIR}/include/khronos
107-
)
108-
endif()
109-
110-
if(LLPC_BUILD_TOOLS)
111-
# SPVGEN
112-
if(EXISTS ${PROJECT_SOURCE_DIR}/../spvgen)
113-
set(XGL_SPVGEN_PATH ${PROJECT_SOURCE_DIR}/../spvgen CACHE PATH "Specify the path to SPVGEN.")
114-
elseif(EXISTS ${PROJECT_SOURCE_DIR}/../xgl/tools/spvgen)
115-
set(XGL_SPVGEN_PATH ${PROJECT_SOURCE_DIR}/../xgl/tools/spvgen CACHE PATH "Specify the path to SPVGEN.")
116-
else()
117-
set(XGL_SPVGEN_PATH ${PROJECT_SOURCE_DIR}/../../../tools/spvgen CACHE PATH "Specify the path to SPVGEN.")
65+
### LGC for LLPC ###################################################################
66+
if (ICD_BUILD_LLPC)
67+
# Add LGC and its dependencies as LLVM external projects for LLPC to use.
68+
include("cmake/lgc.cmake")
69+
add_lgc_projects()
11870
endif()
11971

120-
if(EXISTS ${XGL_SPVGEN_PATH})
121-
set(XGL_SPVGEN_BUILD_PATH ${CMAKE_BINARY_DIR}/spvgen)
122-
add_subdirectory(${XGL_SPVGEN_PATH} ${XGL_SPVGEN_BUILD_PATH} EXCLUDE_FROM_ALL)
123-
endif()
124-
125-
endif(LLPC_BUILD_TOOLS)
126-
127-
if(ICD_BUILD_LLPC)
128-
# Generate Strings for LLPC standalone tool and vkgc_gpurtshim
129-
add_subdirectory(util ${PROJECT_BINARY_DIR}/util)
130-
add_subdirectory(gfxruntime ${PROJECT_BINARY_DIR}/gfxruntime)
72+
### LLVM ###########################################################################
73+
if (LLVM_EXTERNAL_PROJECTS)
74+
if (ICD_BUILD_LLPC AND LLPC_BUILD_TESTS)
75+
set(LLVM_INCLUDE_TESTS ON CACHE BOOL "Force enable LLVM_INCLUDE_TESTS to include gmock" FORCE)
76+
endif()
77+
# Build LLVM.
78+
include("cmake/llvm.cmake")
13179
endif()
13280

133-
### VKGC build LLPC ################################################################
81+
### Build LLPC #####################################################################
13482
if(ICD_BUILD_LLPC)
13583
include("cmake/compilerutils.cmake")
13684
add_compilerutils_projects()
@@ -144,7 +92,6 @@ if(ICD_BUILD_LLPC)
14492
add_subdirectory(llpc ${PROJECT_BINARY_DIR}/llpc)
14593

14694
if(LLPC_BUILD_TESTS)
147-
set(LLVM_INCLUDE_TESTS ON CACHE BOOL "Force enable LLVM_INCLUDE_TESTS to include gmock" FORCE)
14895
add_subdirectory(test)
14996
endif()
15097

@@ -179,9 +126,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
179126
if(ICD_BUILD_LLPC)
180127
set_property(TARGET llpc PROPERTY FOLDER Compiler)
181128
set_property(TARGET llpcinternal PROPERTY FOLDER Compiler)
182-
if(VKI_RAY_TRACING AND NOT LLPC_IS_STANDALONE)
129+
#if LLPC_RAY_TRACING
130+
if(LLPC_RAY_TRACING AND NOT LLPC_IS_STANDALONE)
183131
set_property(TARGET vkgc_gpurtshim PROPERTY FOLDER Compiler)
184132
endif()
133+
#endif
185134
set_property(TARGET vkgc_util PROPERTY FOLDER Compiler)
186135
if (LLPC_BUILD_TOOLS)
187136
set_property(TARGET amdllpc PROPERTY FOLDER Compiler)

cmake/CompilerFlags.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function(set_compiler_options PROJECT_NAME ENABLE_WERROR)
1111
target_compile_options("${PROJECT_NAME}" PRIVATE
1212
-Werror
1313
-Wno-error=deprecated-declarations
14+
-Wno-error=unknown-attributes
1415
)
1516
endif()
1617

@@ -74,7 +75,7 @@ function(set_compiler_options PROJECT_NAME ENABLE_WERROR)
7475
-Wno-gnu-anonymous-struct
7576
-Wno-nested-anon-types
7677
)
77-
if(XGL_ENABLE_LTO)
78+
if(LLPC_ENABLE_LTO)
7879
target_link_libraries("${PROJECT_NAME}" PRIVATE -flto=thin)
7980
endif()
8081
endif()

cmake/findllvm.cmake

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
##
2+
#######################################################################################################################
3+
#
4+
# Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved.
5+
#
6+
# Permission is hereby granted, free of charge, to any person obtaining a copy
7+
# of this software and associated documentation files (the "Software"), to
8+
# deal in the Software without restriction, including without limitation the
9+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10+
# sell copies of the Software, and to permit persons to whom the Software is
11+
# furnished to do so, subject to the following conditions:
12+
#
13+
# The above copyright notice and this permission notice shall be included in all
14+
# copies or substantial portions of the Software.
15+
#
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22+
# IN THE SOFTWARE.
23+
#
24+
#######################################################################################################################
25+
26+
if (NOT LLPC_LLVM_SRC_PATH)
27+
# Find LLVM source. Allow client driver to override using its own name for overlay builds.
28+
set(DEFAULT_LLPC_LLVM_SRC_PATH ${XGL_LLVM_SRC_PATH})
29+
if (NOT DEFAULT_LLPC_LLVM_SRC_PATH)
30+
if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../../imported/llvm-project/llvm)
31+
set(DEFAULT_LLPC_LLVM_SRC_PATH ${CMAKE_CURRENT_LIST_DIR}/../../../imported/llvm-project/llvm)
32+
elseif(EXISTS ${CMAKE_CURRENT_LIST_DIR}/../../llvm-project/llvm)
33+
set(DEFAULT_LLPC_LLVM_SRC_PATH ${CMAKE_CURRENT_LIST_DIR}/../../llvm-project/llvm)
34+
endif()
35+
endif()
36+
set(LLPC_LLVM_SRC_PATH ${DEFAULT_LLPC_LLVM_SRC_PATH} CACHE PATH "Specify the path to LLVM.")
37+
endif()

cmake/llpc_version.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
set(LLPC_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/..")
2727

28+
include("${LLPC_SOURCE_DIR}/cmake/findllvm.cmake")
29+
2830
macro(add_llpc_version_projects)
2931
if (NOT TARGET llpc_version)
3032
# Force the binary directory to account for the possibility that LLPC is

cmake/llvm.cmake

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
##
2+
#######################################################################################################################
3+
#
4+
# Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved.
5+
#
6+
# Permission is hereby granted, free of charge, to any person obtaining a copy
7+
# of this software and associated documentation files (the "Software"), to
8+
# deal in the Software without restriction, including without limitation the
9+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10+
# sell copies of the Software, and to permit persons to whom the Software is
11+
# furnished to do so, subject to the following conditions:
12+
#
13+
# The above copyright notice and this permission notice shall be included in all
14+
# copies or substantial portions of the Software.
15+
#
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22+
# IN THE SOFTWARE.
23+
#
24+
#######################################################################################################################
25+
26+
# Build LLVM, using previously set up LLVM_EXTERNAL_PROJECTS and LLVM_EXTERNAL_*_SOURCE_DIR.
27+
# Relies on findllvm.cmake being run first.
28+
29+
if (NOT LLPC_LLVM_SRC_PATH)
30+
message(FATAL_ERROR "No LLPC_LLVM_SRC_PATH specified")
31+
endif()
32+
33+
# Set cached options.
34+
set(LLVMRAYTRACING_BUILD_TESTS ${LLPC_BUILD_TESTS})
35+
set(LLVM_TARGETS_TO_BUILD AMDGPU CACHE STRING "LLVM targets to build")
36+
set(LLVM_BUILD_TESTS OFF CACHE BOOL "LLVM build tests")
37+
set(LLVM_BUILD_TOOLS ${LLPC_BUILD_LLVM_TOOLS} CACHE BOOL "LLVM build tools")
38+
set(LLVM_BUILD_UTILS OFF CACHE BOOL "LLVM build utils")
39+
set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "LLVM include docs")
40+
set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "LLVM include examples")
41+
set(LLVM_INCLUDE_GO_TESTS OFF CACHE BOOL "LLVM include go tests")
42+
set(LLVM_INCLUDE_TESTS ${LLPC_BUILD_TESTS} CACHE BOOL "LLVM include tests")
43+
set(LLVM_INCLUDE_TOOLS ON CACHE BOOL "LLVM include tools")
44+
set(LLVM_INCLUDE_UTILS ON CACHE BOOL "LLVM include utils")
45+
set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "LLVM enable terminfo")
46+
set(LLVM_RAM_PER_TABLEGEN_JOB 4000 CACHE STRING "LLVM RAM per tablegen job")
47+
set(LLVM_RAM_PER_LINK_JOB 5000 CACHE STRING "LLVM RAM per link job")
48+
if(CMAKE_BUILD_TYPE_DEBUG)
49+
# Build optimized version of llvm-tblgen even in debug builds, for faster build times.
50+
set(LLVM_OPTIMIZED_TABLEGEN ON CACHE BOOL "Build optimized llvm-tblgen")
51+
#if _WIN32
52+
if(LLVM_OPTIMIZED_TABLEGEN AND WIN32 AND (CMAKE_GENERATOR MATCHES "Ninja"))
53+
# LLVM implements the Release build of llvm-tblgen as a cross-compile target, which fails to find
54+
# our DK-based toolchain (created with amd_generate_msvc_toolchain). However, we can inject the toolchain
55+
# argument into LLVM's add_custom_target that sets up this cross-compile build.
56+
# See: llvm-project/llvm/cmake/modules/CrossCompile.cmake
57+
set(CROSS_TOOLCHAIN_FLAGS_NATIVE "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" CACHE STRING
58+
"Toolchain flags for native build" FORCE)
59+
endif()
60+
#endif
61+
endif()
62+
63+
# This will greatly speed up debug builds because we won't be listing all the symbols with llvm-nm.
64+
set(LLVM_BUILD_LLVM_C_DYLIB OFF CACHE BOOL "LLVM build LLVM-C dylib")
65+
66+
# Remove /nologo from CMAKE_RC_FLAGS to avoid getting an error from specifying it twice in LLVM.
67+
if (CMAKE_RC_FLAGS)
68+
string(REPLACE "/nologo" "" CMAKE_RC_FLAGS ${CMAKE_RC_FLAGS})
69+
endif()
70+
71+
# Build LLVM.
72+
if (NOT LLPC_LLVM_BUILD_PATH)
73+
set(LLPC_LLVM_BUILD_PATH ${PROJECT_BINARY_DIR}/llvm)
74+
endif()
75+
if (ICD_BUILD_LLPC)
76+
add_subdirectory(${LLPC_LLVM_SRC_PATH} ${LLPC_LLVM_BUILD_PATH})
77+
else()
78+
add_subdirectory(${LLPC_LLVM_SRC_PATH} ${LLPC_LLVM_BUILD_PATH} EXCLUDE_FROM_ALL)
79+
endif()
80+
81+
# Get LLVMConfig onto cmake path.
82+
list(APPEND CMAKE_MODULE_PATH
83+
"${LLPC_LLVM_BUILD_PATH}/lib/cmake/llvm"
84+
"${LLPC_LLVM_BUILD_PATH}/${CMAKE_CFG_INTDIR}/lib/cmake/llvm" # Workaround for VS generator with older LLVM.
85+
)
86+
87+
# Export LLVM build path for client driver.
88+
# TODO: Change uses to LLPC_LLVM_BUILD_PATH.
89+
set(XGL_LLVM_BUILD_PATH ${LLPC_LLVM_BUILD_PATH} PARENT_SCOPE)
90+
91+
# Extract LLVM revision number for code outside the LLPC repository to use.
92+
file(READ "${LLPC_LLVM_SRC_PATH}/include/llvm/Config/llvm-config.h.cmake" LLVM_CONFIG_HEADER)
93+
string(REGEX MATCH "#define LLVM_MAIN_REVISION ([0-9]+)" "\\1" _ "${LLVM_CONFIG_HEADER}")
94+
set(LLVM_MAIN_REVISION "${CMAKE_MATCH_1}")
95+
set(LLVM_MAIN_REVISION ${LLVM_MAIN_REVISION} PARENT_SCOPE)
96+
97+
# Some of the games using old versions of the tcmalloc lib are crashing
98+
# when allocating aligned memory. C++17 enables aligned new by default,
99+
# so we need to disable it to prevent those crashes.
100+
if (ICD_BUILD_LLPC AND NOT WIN32)
101+
llvm_map_components_to_libnames(llvm_libs
102+
AMDGPUAsmParser
103+
AMDGPUCodeGen
104+
AMDGPUDisassembler
105+
AMDGPUInfo
106+
Analysis
107+
BinaryFormat
108+
Core
109+
Coroutines
110+
BitReader
111+
BitWriter
112+
CodeGen
113+
InstCombine
114+
ipo
115+
IRPrinter
116+
IRReader
117+
Linker
118+
LTO
119+
MC
120+
Passes
121+
ScalarOpts
122+
Support
123+
Target
124+
TransformUtils
125+
)
126+
foreach (lib ${llvm_libs})
127+
target_compile_options(${lib} PRIVATE "-fno-aligned-new")
128+
endforeach()
129+
endif()

0 commit comments

Comments
 (0)