Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 1 | # Copyright 2023 The Dawn & Tint Authors |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 2 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 3 | # Redistribution and use in source and binary forms, with or without |
| 4 | # modification, are permitted provided that the following conditions are met: |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 5 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 6 | # 1. Redistributions of source code must retain the above copyright notice, this |
| 7 | # list of conditions and the following disclaimer. |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 8 | # |
Austin Eng | cc2516a | 2023-10-17 20:57:54 +0000 | [diff] [blame] | 9 | # 2. Redistributions in binary form must reproduce the above copyright notice, |
| 10 | # this list of conditions and the following disclaimer in the documentation |
| 11 | # and/or other materials provided with the distribution. |
| 12 | # |
| 13 | # 3. Neither the name of the copyright holder nor the names of its |
| 14 | # contributors may be used to endorse or promote products derived from |
| 15 | # this software without specific prior written permission. |
| 16 | # |
| 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 20 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 21 | # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 22 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 23 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 24 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 25 | # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 27 | |
| 28 | import("../../../scripts/dawn_overrides_with_defaults.gni") |
| 29 | |
Antonio Maiorano | 2d123d0 | 2023-10-24 15:39:38 +0000 | [diff] [blame] | 30 | if (is_win) { |
| 31 | import("//build/config/win/visual_studio_version.gni") |
| 32 | } |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 33 | import("${dawn_root}/scripts/dawn_features.gni") |
| 34 | |
| 35 | import("build/add_hlsl_hctgen.gni") |
| 36 | import("build/built_target_action.gni") |
| 37 | import("build/cmake_configure_file.gni") |
| 38 | import("build/generate_version_include.gni") |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 39 | import("build/message_compiler.gni") |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 40 | |
| 41 | dawn_dxc_gn_dir = "$dawn_dxc_dir/../gn" |
| 42 | llvm_target_triple = "dxil-ms-dx" # Force target triple |
| 43 | llvm_version_major = 3 |
| 44 | llvm_version_minor = 7 |
| 45 | llvm_version_patch = 0 |
| 46 | llvm_version = "$llvm_version_major.$llvm_version_minor.$llvm_version_patch" |
| 47 | |
| 48 | declare_args() { |
Antonio Maiorano | c5c7480 | 2024-08-08 14:45:08 +0000 | [diff] [blame] | 49 | # Enable DXC asserts in non-debug builds |
| 50 | dawn_dxc_enable_asserts_in_ndebug = true |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 51 | } |
| 52 | |
Corentin Wallez | 6ab748f | 2023-09-26 18:02:48 +0000 | [diff] [blame] | 53 | # Native ARCH values can be found in LLVM's llvm/cmake/config-ix.cmake |
| 54 | # Components of the triple can be found in LLVM's llvm/TargetParser/Triple.h and it's .cpp |
| 55 | if (target_cpu == "x86") { |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 56 | native_target = "X86" |
Corentin Wallez | 6ab748f | 2023-09-26 18:02:48 +0000 | [diff] [blame] | 57 | llvm_triple_arch = "x86" |
| 58 | } else if (target_cpu == "x64") { |
| 59 | native_target = "X86" |
| 60 | llvm_triple_arch = "x86_64" |
| 61 | } else if (target_cpu == "arm") { |
| 62 | native_target = "ARM" |
| 63 | llvm_triple_arch = "arm" |
| 64 | } else if (target_cpu == "arm64") { |
| 65 | native_target = "AArch64" |
| 66 | llvm_triple_arch = "aarch64" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 67 | } else { |
| 68 | assert( |
| 69 | false, |
Corentin Wallez | 6ab748f | 2023-09-26 18:02:48 +0000 | [diff] [blame] | 70 | "define 'native_target' and 'llvm_triple_arch' for target_cpu: $target_cpu") |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 71 | } |
| 72 | |
Corentin Wallez | 6ab748f | 2023-09-26 18:02:48 +0000 | [diff] [blame] | 73 | if (target_os == "win") { |
| 74 | llvm_triple_env = "pc" |
| 75 | llvm_triple_os = "win32" |
| 76 | } else if (target_os == "linux") { |
| 77 | llvm_triple_env = "unknown" |
| 78 | llvm_triple_os = "linux" |
| 79 | } else if (target_os == "mac") { |
| 80 | llvm_triple_env = "unknown" |
| 81 | llvm_triple_os = "macosx" |
| 82 | } else { |
| 83 | assert( |
| 84 | false, |
| 85 | "define 'llvm_triple_env' and 'llvm_triple_os' for target_os: $target_os") |
| 86 | } |
| 87 | |
| 88 | llvm_triple = "${llvm_triple_arch}-${llvm_triple_env}-${llvm_triple_os}" |
| 89 | |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 90 | ####################################################################### |
| 91 | ## CMake config targets |
| 92 | ####################################################################### |
| 93 | |
| 94 | cmake_configure_file("config-header") { |
| 95 | input = "$dawn_dxc_dir/include/llvm/Config/config.h.cmake" |
| 96 | output = "$target_gen_dir/include/llvm/Config/config.h" |
| 97 | values = [ |
| 98 | # TODO(amaiorano): Many of the flags set here are duplicated for the "llvm-config-header" target below. |
| 99 | # Factor this out somehow (template?). |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 100 | "LLVM_ENABLE_THREADS=1", |
| 101 | "LLVM_HAS_ATOMICS=1", |
| 102 | "HAVE_INTTYPES_H=1", |
| 103 | "HAVE_STDINT_H=1", |
| 104 | "HAVE_UINT64_T=1", |
| 105 | "HAVE_U_INT64_T=", |
| 106 | "LLVM_BINDIR=", |
| 107 | "LLVM_CONFIGTIME=", |
| 108 | "LLVM_DATADIR=", |
| 109 | "LLVM_DEFAULT_TARGET_TRIPLE=$llvm_target_triple", |
| 110 | "LLVM_DOCSDIR=", |
| 111 | "LLVM_ETCDIR=", |
Corentin Wallez | 6ab748f | 2023-09-26 18:02:48 +0000 | [diff] [blame] | 112 | "LLVM_HOST_TRIPLE=$llvm_triple", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 113 | "LLVM_INCLUDEDIR=", |
| 114 | "LLVM_INFODIR=", |
| 115 | "LLVM_MANDIR=", |
| 116 | "LLVM_NATIVE_ARCH=$native_target", |
| 117 | "LLVM_NATIVE_ASMPARSER=", |
| 118 | "LLVM_NATIVE_ASMPRINTER=", |
| 119 | "LLVM_NATIVE_DISASSEMBLER=", |
| 120 | "LLVM_NATIVE_TARGET=", |
| 121 | "LLVM_NATIVE_TARGETINFO=", |
| 122 | "LLVM_NATIVE_TARGETMC=", |
| 123 | "LLVM_PREFIX=/usr/local", |
| 124 | "LLVM_VERSION_MAJOR=$llvm_version_major", |
| 125 | "LLVM_VERSION_MINOR=$llvm_version_minor", |
| 126 | "LLVM_VERSION_PATCH=$llvm_version_patch", |
| 127 | "PACKAGE_VERSION=${llvm_version}git", |
| 128 | "PACKAGE_BUGREPORT=http://llvm.org/bugs/", |
| 129 | "PACKAGE_NAME=LLVM", |
| 130 | "PACKAGE_STRING=LLVM ${llvm_version}git", |
| 131 | "strdup=_strdup", |
| 132 | "stricmp=_stricmp", |
| 133 | "strtoll=", |
| 134 | "strtoull=", |
| 135 | |
| 136 | # TODO(amaiorano): Revisit variables below. Most are just unset for now. |
| 137 | "ENABLE_BACKTRACES=1", |
| 138 | "ENABLE_CRASH_OVERRIDES=1", |
| 139 | "DISABLE_LLVM_DYLIB_ATEXIT=1", |
| 140 | "ENABLE_PIC=1", |
| 141 | "HAVE_ISATTY=", |
| 142 | "LLVM_ENABLE_ZLIB=", |
| 143 | "LLVM_USE_INTEL_JITEVENTS=", |
| 144 | "LLVM_USE_OPROFILE=", |
| 145 | "LINK_POLLY_INTO_TOOLS=", |
| 146 | "BUG_REPORT_URL=http://llvm.org/bugs/", |
| 147 | "ENABLE_TIMESTAMPS=1", |
| 148 | "HAVE____CHKSTK_MS=", |
| 149 | "HAVE____CHKSTK=", |
| 150 | "HAVE___ALLOCA=", |
| 151 | "HAVE___ASHLDI3=", |
| 152 | "HAVE___ASHRDI3=", |
| 153 | "HAVE___CHKSTK_MS=", |
| 154 | "HAVE___CHKSTK=1", |
| 155 | "HAVE___CMPDI2=", |
| 156 | "HAVE___DIVDI3=", |
| 157 | "HAVE___FIXDFDI=", |
| 158 | "HAVE___FIXSFDI=", |
| 159 | "HAVE___FLOATDIDF=", |
| 160 | "HAVE___LSHRDI3=", |
| 161 | "HAVE___MAIN=", |
| 162 | "HAVE___MODDI3=", |
| 163 | "HAVE___UDIVDI3=", |
| 164 | "HAVE___UMODDI3=", |
| 165 | "HAVE__ALLOCA=", |
| 166 | "HAVE__CHSIZE_S=1", |
| 167 | "HAVE_BACKTRACE=", |
| 168 | "HAVE_CLOSEDIR=", |
| 169 | "HAVE_CXXABI_H=", |
| 170 | "HAVE_DECL_ARC4RANDOM=", |
| 171 | "HAVE_DIA_SDK=", |
| 172 | "HAVE_DLERROR=", |
| 173 | "HAVE_DLFCN_H=", |
| 174 | "HAVE_DLOPEN=", |
| 175 | "HAVE_ERRNO_H=1", |
| 176 | "HAVE_EXECINFO_H=", |
| 177 | "HAVE_FCNTL_H=1", |
| 178 | "HAVE_FENV_H=1", |
| 179 | "HAVE_FFI_CALL=", |
| 180 | "HAVE_FFI_FFI_H=", |
| 181 | "HAVE_FFI_H=", |
| 182 | "HAVE_FUTIMENS=", |
| 183 | "HAVE_GETCWD=", |
| 184 | "HAVE_GETRLIMIT=", |
| 185 | "HAVE_GETTIMEOFDAY=", |
| 186 | "HAVE_INT64_T=1", |
| 187 | "HAVE_LIBDL=", |
| 188 | "HAVE_LIBEDIT=", |
| 189 | "HAVE_LIBPSAPI=", |
| 190 | "HAVE_LIBPTHREAD=", |
| 191 | "HAVE_LIBSHELL32=", |
| 192 | "HAVE_LIBZ=", |
| 193 | "HAVE_LIMITS_H=1", |
| 194 | "HAVE_LINK_H=", |
| 195 | "HAVE_LONGJMP=", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 196 | "HAVE_MALLCTL=", |
| 197 | "HAVE_MALLINFO2=", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 198 | "HAVE_MKDTEMP=", |
| 199 | "HAVE_MKSTEMP=", |
| 200 | "HAVE_MKTEMP=", |
| 201 | "HAVE_NDIR_H=", |
| 202 | "HAVE_OPENDIR=", |
| 203 | "HAVE_POSIX_SPAWN=", |
| 204 | "HAVE_PREAD=", |
| 205 | "HAVE_PTHREAD_RWLOCK_INIT=", |
| 206 | "HAVE_RAND48=", |
| 207 | "HAVE_READDIR=", |
| 208 | "HAVE_REALPATH=", |
| 209 | "HAVE_SBRK=", |
| 210 | "HAVE_SETENV=", |
| 211 | "HAVE_SETJMP=", |
| 212 | "HAVE_SETRLIMIT=", |
| 213 | "HAVE_SIGLONGJMP=", |
| 214 | "HAVE_SIGNAL_H=1", |
| 215 | "HAVE_SIGSETJMP=", |
| 216 | "HAVE_STRDUP=", |
| 217 | "HAVE_STRERROR_R=", |
| 218 | "HAVE_STRERROR=1", |
| 219 | "HAVE_STRTOLL=1", |
| 220 | "HAVE_STRTOQ=", |
| 221 | "HAVE_SYS_DIR_H=", |
| 222 | "HAVE_SYS_IOCTL_H=", |
| 223 | |
| 224 | "HAVE_SYS_NDIR_H=", |
| 225 | "HAVE_SYS_STAT_H=1", |
| 226 | "HAVE_SYS_TYPES_H=", |
| 227 | "HAVE_SYS_UIO_H=", |
| 228 | "HAVE_SYS_WAIT_H=", |
| 229 | "HAVE_TERMINFO=", |
| 230 | "HAVE_TERMIOS_H=", |
| 231 | "HAVE_UTIME_H=", |
| 232 | "HAVE_VALGRIND_VALGRIND_H=", |
| 233 | "HAVE_WRITEV=", |
| 234 | "HAVE_ZLIB_H=", |
| 235 | "LTDL_DLOPEN_DEPLIBS=", |
| 236 | "LTDL_SHLIB_EXT=.dll", |
| 237 | "LTDL_SYSSEARCHPATH=", |
| 238 | "RETSIGTYPE=void", |
| 239 | "WIN32_ELMCB_PCSTR=PCSTR", |
| 240 | ] |
| 241 | |
| 242 | if (is_win) { |
| 243 | values += [ |
| 244 | "HAVE_DECL_STRERROR_S=1", |
| 245 | "HAVE_DIRENT_H=", |
| 246 | "HAVE_FUTIMES=", |
| 247 | "HAVE_GETPAGESIZE=", |
| 248 | "HAVE_GETRUSAGE=", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 249 | "HAVE_SYS_MMAN_H=", |
| 250 | "HAVE_SYS_PARAM_H=", |
| 251 | "HAVE_SYS_RESOURCE_H=", |
| 252 | "HAVE_SYS_TIME_H=", |
| 253 | "HAVE_UNISTD_H=", |
| 254 | "HAVE_PTHREAD_GETSPECIFIC=", |
| 255 | "HAVE_PTHREAD_H=", |
| 256 | "HAVE_PTHREAD_MUTEX_LOCK=", |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 257 | "HAVE_MACH_MACH_H=", |
| 258 | "HAVE_MACH_O_DYLD_H=", |
| 259 | "HAVE_MALLOC_H=1", |
Antonio Maiorano | 2d123d0 | 2023-10-24 15:39:38 +0000 | [diff] [blame] | 260 | "HAVE_MALLINFO=", |
| 261 | "HAVE_MALLOC_MALLOC_H=", |
| 262 | "HAVE_MALLOC_ZONE_STATISTICS=", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 263 | ] |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 264 | } else if (is_linux || is_mac) { |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 265 | values += [ |
| 266 | "HAVE_DECL_STRERROR_S=", |
| 267 | "HAVE_DIRENT_H=1", |
| 268 | "HAVE_FUTIMES=1", |
| 269 | "HAVE_GETPAGESIZE=1", |
| 270 | "HAVE_GETRUSAGE=1", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 271 | "HAVE_SYS_MMAN_H=1", |
| 272 | "HAVE_SYS_PARAM_H=1", |
| 273 | "HAVE_SYS_RESOURCE_H=1", |
| 274 | "HAVE_SYS_TIME_H=1", |
| 275 | "HAVE_UNISTD_H=1", |
| 276 | "HAVE_PTHREAD_GETSPECIFIC=1", |
| 277 | "HAVE_PTHREAD_H=1", |
| 278 | "HAVE_PTHREAD_MUTEX_LOCK=1", |
| 279 | ] |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 280 | if (is_linux) { |
| 281 | values += [ |
| 282 | "HAVE_MALLOC_H=1", |
| 283 | "HAVE_MALLINFO=1", |
| 284 | "HAVE_MACH_MACH_H=", |
| 285 | "HAVE_MACH_O_DYLD_H=", |
Antonio Maiorano | 2d123d0 | 2023-10-24 15:39:38 +0000 | [diff] [blame] | 286 | "HAVE_MALLOC_MALLOC_H=", |
| 287 | "HAVE_MALLOC_ZONE_STATISTICS=", |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 288 | ] |
| 289 | } else { |
| 290 | values += [ |
| 291 | "HAVE_MALLOC_H=", |
| 292 | "HAVE_MALLINFO=", |
| 293 | "HAVE_MACH_MACH_H=1", |
| 294 | "HAVE_MACH_O_DYLD_H=1", |
Antonio Maiorano | 2d123d0 | 2023-10-24 15:39:38 +0000 | [diff] [blame] | 295 | "HAVE_MALLOC_MALLOC_H=1", |
| 296 | "HAVE_MALLOC_ZONE_STATISTICS=1", |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 297 | ] |
| 298 | } |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 299 | } |
| 300 | if (is_win) { |
| 301 | values += [ |
| 302 | "LLVM_ON_UNIX=", |
| 303 | "LLVM_ON_WIN32=1", |
| 304 | ] |
| 305 | } else { |
| 306 | values += [ |
| 307 | "LLVM_ON_UNIX=1", |
| 308 | "LLVM_ON_WIN32=", |
| 309 | ] |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | cmake_configure_file("llvm-config-header") { |
| 314 | input = "$dawn_dxc_dir/include/llvm/Config/llvm-config.h.cmake" |
| 315 | output = "$target_gen_dir/include/llvm/Config/llvm-config.h" |
| 316 | values = [ |
| 317 | "LLVM_BINDIR=", |
| 318 | "LLVM_CONFIGTIME=", |
| 319 | "LLVM_DATADIR=", |
| 320 | "LLVM_DEFAULT_TARGET_TRIPLE=$llvm_target_triple", |
| 321 | "LLVM_DOCSDIR=", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 322 | "LLVM_ETCDIR=", |
| 323 | "LLVM_HAS_ATOMICS=1", |
Corentin Wallez | 6ab748f | 2023-09-26 18:02:48 +0000 | [diff] [blame] | 324 | "LLVM_HOST_TRIPLE=$llvm_triple", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 325 | "LLVM_INCLUDEDIR=", |
| 326 | "LLVM_INFODIR=", |
| 327 | "LLVM_MANDIR=", |
| 328 | "LLVM_NATIVE_ARCH=$native_target", |
| 329 | "LLVM_NATIVE_ASMPARSER=", |
| 330 | "LLVM_NATIVE_ASMPRINTER=", |
| 331 | "LLVM_NATIVE_DISASSEMBLER=", |
| 332 | "LLVM_NATIVE_TARGET=", |
| 333 | "LLVM_NATIVE_TARGETINFO=", |
| 334 | "LLVM_NATIVE_TARGETMC=", |
| 335 | "LLVM_PREFIX=/usr/local", |
| 336 | "LLVM_USE_INTEL_JITEVENTS=", |
| 337 | "LLVM_USE_OPROFILE=", |
| 338 | "LLVM_VERSION_MAJOR=$llvm_version_major", |
| 339 | "LLVM_VERSION_MINOR=$llvm_version_minor", |
| 340 | "LLVM_VERSION_PATCH=$llvm_version_patch", |
| 341 | "PACKAGE_VERSION=${llvm_version}git", |
| 342 | "LINK_POLLY_INTO_TOOLS=", |
| 343 | "LLVM_ENABLE_THREADS=1", |
| 344 | ] |
| 345 | if (is_win) { |
| 346 | values += [ |
| 347 | "LLVM_ON_UNIX=", |
| 348 | "LLVM_ON_WIN32=1", |
| 349 | ] |
| 350 | } else { |
| 351 | values += [ |
| 352 | "LLVM_ON_UNIX=1", |
| 353 | "LLVM_ON_WIN32=", |
| 354 | ] |
| 355 | } |
| 356 | } |
| 357 | |
Antonio Maiorano | ae8e37c | 2023-07-18 19:45:24 +0000 | [diff] [blame] | 358 | cmake_configure_file("abi-breaking-header") { |
| 359 | input = "$dawn_dxc_dir/include/llvm/Config/abi-breaking.h.cmake" |
| 360 | output = "$target_gen_dir/include/llvm/Config/abi-breaking.h" |
| 361 | values = [ "LLVM_ENABLE_ABI_BREAKING_CHECKS=" ] |
| 362 | } |
| 363 | |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 364 | cmake_configure_file("DataTypes-header") { |
| 365 | input = "$dawn_dxc_dir/include/llvm/Support/DataTypes.h.cmake" |
| 366 | output = "$target_gen_dir/include/llvm/Support/DataTypes.h" |
| 367 | values = [ |
| 368 | "HAVE_INTTYPES_H=1", |
| 369 | "HAVE_STDINT_H=1", |
| 370 | "HAVE_UINT64_T=1", |
| 371 | "HAVE_U_INT64_T=", |
| 372 | ] |
| 373 | } |
| 374 | |
| 375 | cmake_configure_file("Targets-def") { |
| 376 | input = "$dawn_dxc_dir/include/llvm/Config/Targets.def.in" |
| 377 | output = "$target_gen_dir/include/llvm/Config/Targets.def" |
| 378 | values = [ |
| 379 | # TODO(amaiorano): Should normally contain list of supported targets, |
| 380 | # which I think should be AMDGPU and NVPTX based on LLVM_ALL_TARGETS |
| 381 | # in the root CMakeLists.txt, but building with CMake, the generated |
| 382 | # TargetsDef.h has no value at all for this... |
| 383 | "LLVM_ENUM_TARGETS=", |
| 384 | ] |
| 385 | } |
| 386 | |
| 387 | cmake_configure_file("AsmPrinters-def") { |
| 388 | input = "$dawn_dxc_dir/include/llvm/Config/AsmPrinters.def.in" |
| 389 | output = "$target_gen_dir/include/llvm/Config/AsmPrinters.def" |
| 390 | values = [ "LLVM_ENUM_ASM_PRINTERS=" ] |
| 391 | } |
| 392 | |
| 393 | cmake_configure_file("AsmParsers-def") { |
| 394 | input = "$dawn_dxc_dir/include/llvm/Config/AsmParsers.def.in" |
| 395 | output = "$target_gen_dir/include/llvm/Config/AsmParsers.def" |
| 396 | values = [ "LLVM_ENUM_ASM_PARSERS=" ] |
| 397 | } |
| 398 | |
| 399 | cmake_configure_file("Disassemblers-def") { |
| 400 | input = "$dawn_dxc_dir/include/llvm/Config/Disassemblers.def.in" |
| 401 | output = "$target_gen_dir/include/llvm/Config/Disassemblers.def" |
| 402 | values = [ "LLVM_ENUM_DISASSEMBLERS=" ] |
| 403 | } |
| 404 | |
| 405 | cmake_configure_file("SharedLibAffix-h") { |
| 406 | input = "$dawn_dxc_dir/lib/DxcSupport/SharedLibAffix.inc" |
| 407 | output = "$target_gen_dir/include/dxc/Support/SharedLibAffix.h" |
Antonio Maiorano | 2d123d0 | 2023-10-24 15:39:38 +0000 | [diff] [blame] | 408 | shared_library_prefix = "" |
| 409 | if (is_linux) { |
| 410 | shared_library_prefix = "lib" |
| 411 | } |
| 412 | shared_library_suffix = "" |
| 413 | if (is_win) { |
| 414 | shared_library_suffix = ".dll" |
| 415 | } else { |
| 416 | shared_library_suffix = ".so" |
| 417 | } |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 418 | values = [ |
Antonio Maiorano | 2d123d0 | 2023-10-24 15:39:38 +0000 | [diff] [blame] | 419 | "CMAKE_SHARED_LIBRARY_PREFIX=${shared_library_prefix}", |
| 420 | "CMAKE_SHARED_LIBRARY_SUFFIX=${shared_library_suffix}", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 421 | ] |
| 422 | } |
| 423 | |
| 424 | cmake_configure_file("clang-basic-version-inc") { |
| 425 | input = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Version.inc.in" |
| 426 | output = "$target_gen_dir/tools/clang/include/clang/Basic/Version.inc" |
| 427 | values = [ |
| 428 | "CLANG_VERSION=$llvm_version", |
| 429 | "CLANG_VERSION_MAJOR=$llvm_version_major", |
| 430 | "CLANG_VERSION_MINOR=$llvm_version_minor", |
| 431 | "CLANG_VERSION_PATCHLEVEL=$llvm_version_patch", |
| 432 | "CLANG_HAS_VERSION_PATCHLEVEL=0", |
| 433 | ] |
| 434 | } |
| 435 | |
| 436 | cmake_configure_file("clang-config-h") { |
| 437 | input = "$dawn_dxc_dir/tools/clang/include/clang/Config/config.h.cmake" |
| 438 | output = "$target_gen_dir/tools/clang/include/clang/Config/config.h" |
| 439 | values = [ |
| 440 | "BUG_REPORT_URL=http://llvm.org/bugs/", |
| 441 | "CLANG_DEFAULT_OPENMP_RUNTIME=libgomp", |
| 442 | "CLANG_LIBDIR_SUFFIX=", |
| 443 | "CLANG_RESOURCE_DIR=", |
| 444 | "C_INCLUDE_DIRS=", |
| 445 | "DEFAULT_SYSROOT=", |
| 446 | "GCC_INSTALL_PREFIX=", |
| 447 | "CLANG_HAVE_LIBXML=", |
| 448 | "BACKEND_PACKAGE_STRING=", |
| 449 | "HOST_LINK_VERSION=", |
| 450 | ] |
| 451 | } |
| 452 | |
Antonio Maiorano | ae8e37c | 2023-07-18 19:45:24 +0000 | [diff] [blame] | 453 | cmake_configure_file("dxc-config-h") { |
| 454 | input = "$dawn_dxc_dir/include/dxc/config.h.cmake" |
| 455 | output = "$target_gen_dir/include/dxc/config.h" |
David Neto | 04d3cda | 2024-07-12 19:58:54 +0000 | [diff] [blame] | 456 | values = [ |
| 457 | "DXC_DISABLE_ALLOCATOR_OVERRIDES=1", |
| 458 | "DXC_CODEGEN_EXCEPTIONS_TRAP=1", |
| 459 | ] |
Antonio Maiorano | ae8e37c | 2023-07-18 19:45:24 +0000 | [diff] [blame] | 460 | } |
| 461 | |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 462 | ####################################################################### |
| 463 | ## Common config shared by all targets |
| 464 | ####################################################################### |
| 465 | |
| 466 | config("common_config") { |
| 467 | warning_flags = [] |
| 468 | if (is_clang) { |
| 469 | warning_flags += [ |
| 470 | "-Wno-error", # TODO(amaiorano): For now, allow warnings |
| 471 | "-Wno-unknown-pragmas", |
| 472 | "-Wno-shadow", |
| 473 | "-Wno-deprecated-declarations", |
| 474 | "-Wno-deprecated-enum-float-conversion", |
| 475 | "-Wno-extra-semi", |
| 476 | "-Wno-reorder-ctor", |
| 477 | "-Wno-implicit-fallthrough", |
| 478 | "-Wno-header-hygiene", |
| 479 | "-Wno-unused-const-variable", |
| 480 | "-Wno-implicit-fallthrough", |
| 481 | "-Wno-sign-compare", |
| 482 | "-Wno-unused-but-set-variable", |
| 483 | "-Wno-unreachable-code-return", |
| 484 | "-Wno-unreachable-code-break", |
| 485 | "-Wno-unused-function", |
| 486 | "-Wno-unused-local-typedef", |
| 487 | "-Wno-string-conversion", |
| 488 | "-Wno-macro-redefined", |
| 489 | "-Wno-unreachable-code", |
| 490 | "-Wno-switch", |
| 491 | "-Wno-constant-logical-operand", |
| 492 | "-Wno-microsoft-exception-spec", |
| 493 | "-Wno-inconsistent-missing-override", |
| 494 | "-Wno-enum-compare-conditional", |
| 495 | "-Wno-rtti", |
| 496 | "-Wno-microsoft-extra-qualification", |
| 497 | "-Wno-range-loop-bind-reference", |
| 498 | "-Wno-pessimizing-move", |
| 499 | "-Wno-unused-lambda-capture", |
| 500 | "-Wno-bool-conversion", |
| 501 | "-Wno-enum-compare", |
| 502 | "-Wno-deprecated-copy", |
| 503 | "-Wno-unused-variable", |
| 504 | "-Wno-microsoft-template", |
| 505 | "-Wno-unused-private-field", |
| 506 | "-Wno-deprecated-enum-enum-conversion", |
| 507 | "-Wno-deprecated-anon-enum-enum-conversion", |
| 508 | "-Wno-ambiguous-reversed-operator", |
| 509 | ] |
| 510 | } else { |
| 511 | # MSVC |
| 512 | warning_flags += [ |
| 513 | "/W0", # Suppress most warnings |
| 514 | "/wd4267", # conversion from 'size_t' to 'type', possible loss of data |
| 515 | "/wd4996", # std::iterator class template (used as a base class to |
| 516 | # provide typedefs) is deprecated in C++17 |
| 517 | ] |
| 518 | } |
| 519 | |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 520 | cflags_c = [] |
| 521 | cflags_cc = [] |
| 522 | |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 523 | if (is_win) { |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 524 | cflags_cc += [ |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 525 | "/EHsc", # DXC uses exceptions |
| 526 | "/Zc:__cplusplus", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 527 | "/Zc:sizedDealloc-", # Disable sized allocation |
| 528 | ] |
Hans Wennborg | 8e9cf72 | 2023-11-03 20:21:43 +0000 | [diff] [blame] | 529 | if (!is_clang) { |
| 530 | cflags_cc += [ |
| 531 | "/Zc:twoPhase-", # DXC source relies on MSVC's non-conforming |
| 532 | # two-phase lookup |
| 533 | ] |
| 534 | } |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 535 | |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 536 | cflags_c += [ |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 537 | "/EHsc", # DXC uses exceptions |
| 538 | ] |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 539 | } else if (is_linux || is_mac) { |
| 540 | cflags_cc += [ |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 541 | "-fcxx-exceptions", # DXC uses exceptions |
| 542 | "-fms-extensions", |
| 543 | "-frtti", # DXC uses RTTI |
| 544 | ] |
| 545 | } |
| 546 | |
| 547 | cflags_c += warning_flags |
| 548 | cflags_cc += warning_flags |
| 549 | |
| 550 | include_dirs = [ |
| 551 | "$dawn_dxc_dir/include", |
| 552 | "$dawn_dxc_dir/tools/clang/include", |
| 553 | "$dawn_dxc_dir/tools/clang/tools", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 554 | "${target_gen_dir}/include", # Generated files |
| 555 | ] |
| 556 | |
Ben Clayton | 7c391e8 | 2023-12-04 18:14:25 +0000 | [diff] [blame] | 557 | if (is_win) { |
| 558 | include_dirs += [ |
| 559 | # $dawn_dxc_dir/lib/Support/assert.cpp depends on a "assert.h" include for the windows path, |
| 560 | # but the other architectures include <assert.h>. The system include would be shadowed if this |
| 561 | # include directory is added. |
| 562 | "$dawn_dxc_dir/include/llvm/llvm_assert", |
| 563 | ] |
| 564 | } |
Antonio Maiorano | c5c7480 | 2024-08-08 14:45:08 +0000 | [diff] [blame] | 565 | } |
Ben Clayton | 7c391e8 | 2023-12-04 18:14:25 +0000 | [diff] [blame] | 566 | |
Antonio Maiorano | c5c7480 | 2024-08-08 14:45:08 +0000 | [diff] [blame] | 567 | # Template with common configs and defines used by all static_library and source_set targets. |
| 568 | # Do not use this for the top-level targets (executable, loadable_module) to avoid exposing |
| 569 | # includes and defines. |
| 570 | template("dxc_module") { |
| 571 | assert(defined(invoker.target_type), "must set target_type") |
| 572 | assert(invoker.target_type == "static_library" || |
| 573 | invoker.target_type == "source_set", |
| 574 | "do not use for top-level targets") |
| 575 | |
| 576 | target(invoker.target_type, target_name) { |
| 577 | forward_variables_from(invoker, "*") |
| 578 | if (!defined(defines)) { |
| 579 | defines = [] |
| 580 | } |
| 581 | |
| 582 | public_configs = [ ":common_config" ] |
| 583 | if (dawn_has_build) { |
| 584 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 585 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 586 | } |
| 587 | if (is_win) { |
| 588 | # DXC is built with multibyte character set, so it expects Win32 functions to map the ANSI ones, not the UNICODE ones. |
| 589 | configs -= [ "//build/config/win:unicode" ] |
| 590 | } |
| 591 | if (dawn_dxc_enable_asserts_in_ndebug && !is_debug) { |
| 592 | # Do as CMake option "LLVM_ENABLE_ASSERTIONS" does: undef NDEBUG and define _DEBUG |
| 593 | configs -= [ "//build/config:release" ] |
| 594 | if (!is_win) { |
| 595 | defines += [ "_DEBUG" ] |
| 596 | } |
| 597 | defines += [ |
| 598 | # Reduce binary size by dropping assertion strings |
| 599 | "LLVM_ASSERTIONS_NO_STRINGS", |
| 600 | |
| 601 | # Always trap on asserts for consistent crash logging |
| 602 | "LLVM_ASSERTIONS_TRAP", |
| 603 | ] |
| 604 | } |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 605 | } |
| 606 | } |
| 607 | |
| 608 | ####################################################################### |
| 609 | ## Support |
| 610 | ####################################################################### |
| 611 | |
| 612 | # Target shared by tbl-gen and dxc targets |
Antonio Maiorano | c5c7480 | 2024-08-08 14:45:08 +0000 | [diff] [blame] | 613 | dxc_module("Support") { |
| 614 | target_type = "static_library" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 615 | output_name = "LLVMSupport" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 616 | public_deps = [ |
| 617 | ":AsmParsers-def", |
| 618 | ":AsmPrinters-def", |
Antonio Maiorano | f56616d | 2023-11-20 18:33:22 +0000 | [diff] [blame] | 619 | ":DataTypes-header", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 620 | ":Disassemblers-def", |
| 621 | ":Targets-def", |
Antonio Maiorano | ae8e37c | 2023-07-18 19:45:24 +0000 | [diff] [blame] | 622 | ":abi-breaking-header", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 623 | ":config-header", |
Antonio Maiorano | ae8e37c | 2023-07-18 19:45:24 +0000 | [diff] [blame] | 624 | ":dxc-config-h", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 625 | ":llvm-config-header", |
| 626 | ] |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 627 | sources = [ |
| 628 | "$dawn_dxc_dir/lib/MSSupport/MSFileSystemImpl.cpp", |
| 629 | "$dawn_dxc_dir/lib/Support/APFloat.cpp", |
| 630 | "$dawn_dxc_dir/lib/Support/APInt.cpp", |
| 631 | "$dawn_dxc_dir/lib/Support/APSInt.cpp", |
| 632 | "$dawn_dxc_dir/lib/Support/ARMBuildAttrs.cpp", |
| 633 | "$dawn_dxc_dir/lib/Support/ARMWinEH.cpp", |
| 634 | "$dawn_dxc_dir/lib/Support/Allocator.cpp", |
| 635 | "$dawn_dxc_dir/lib/Support/Atomic.cpp", |
| 636 | "$dawn_dxc_dir/lib/Support/BlockFrequency.cpp", |
| 637 | "$dawn_dxc_dir/lib/Support/BranchProbability.cpp", |
| 638 | "$dawn_dxc_dir/lib/Support/COM.cpp", |
| 639 | "$dawn_dxc_dir/lib/Support/CommandLine.cpp", |
| 640 | "$dawn_dxc_dir/lib/Support/Compression.cpp", |
| 641 | "$dawn_dxc_dir/lib/Support/ConvertUTF.c", |
| 642 | "$dawn_dxc_dir/lib/Support/ConvertUTFWrapper.cpp", |
| 643 | "$dawn_dxc_dir/lib/Support/CrashRecoveryContext.cpp", |
| 644 | "$dawn_dxc_dir/lib/Support/DAGDeltaAlgorithm.cpp", |
| 645 | "$dawn_dxc_dir/lib/Support/DataExtractor.cpp", |
| 646 | "$dawn_dxc_dir/lib/Support/DataStream.cpp", |
| 647 | "$dawn_dxc_dir/lib/Support/Debug.cpp", |
| 648 | "$dawn_dxc_dir/lib/Support/DeltaAlgorithm.cpp", |
| 649 | "$dawn_dxc_dir/lib/Support/Dwarf.cpp", |
| 650 | "$dawn_dxc_dir/lib/Support/Errno.cpp", |
| 651 | "$dawn_dxc_dir/lib/Support/ErrorHandling.cpp", |
| 652 | "$dawn_dxc_dir/lib/Support/FileOutputBuffer.cpp", |
| 653 | "$dawn_dxc_dir/lib/Support/FileUtilities.cpp", |
| 654 | "$dawn_dxc_dir/lib/Support/FoldingSet.cpp", |
| 655 | "$dawn_dxc_dir/lib/Support/FormattedStream.cpp", |
| 656 | "$dawn_dxc_dir/lib/Support/GraphWriter.cpp", |
| 657 | "$dawn_dxc_dir/lib/Support/Hashing.cpp", |
| 658 | "$dawn_dxc_dir/lib/Support/Host.cpp", |
| 659 | "$dawn_dxc_dir/lib/Support/IntEqClasses.cpp", |
| 660 | "$dawn_dxc_dir/lib/Support/IntervalMap.cpp", |
| 661 | "$dawn_dxc_dir/lib/Support/IntrusiveRefCntPtr.cpp", |
| 662 | "$dawn_dxc_dir/lib/Support/LEB128.cpp", |
| 663 | "$dawn_dxc_dir/lib/Support/LineIterator.cpp", |
| 664 | "$dawn_dxc_dir/lib/Support/Locale.cpp", |
| 665 | "$dawn_dxc_dir/lib/Support/LockFileManager.cpp", |
| 666 | "$dawn_dxc_dir/lib/Support/MD5.cpp", |
| 667 | "$dawn_dxc_dir/lib/Support/MSFileSystemBasic.cpp", |
| 668 | "$dawn_dxc_dir/lib/Support/ManagedStatic.cpp", |
| 669 | "$dawn_dxc_dir/lib/Support/MathExtras.cpp", |
| 670 | "$dawn_dxc_dir/lib/Support/Memory.cpp", |
| 671 | "$dawn_dxc_dir/lib/Support/MemoryBuffer.cpp", |
| 672 | "$dawn_dxc_dir/lib/Support/MemoryObject.cpp", |
| 673 | "$dawn_dxc_dir/lib/Support/Mutex.cpp", |
| 674 | "$dawn_dxc_dir/lib/Support/Options.cpp", |
| 675 | "$dawn_dxc_dir/lib/Support/Path.cpp", |
| 676 | "$dawn_dxc_dir/lib/Support/PrettyStackTrace.cpp", |
| 677 | "$dawn_dxc_dir/lib/Support/Process.cpp", |
| 678 | "$dawn_dxc_dir/lib/Support/Program.cpp", |
| 679 | "$dawn_dxc_dir/lib/Support/RWMutex.cpp", |
| 680 | "$dawn_dxc_dir/lib/Support/RandomNumberGenerator.cpp", |
| 681 | "$dawn_dxc_dir/lib/Support/Regex.cpp", |
| 682 | "$dawn_dxc_dir/lib/Support/ScaledNumber.cpp", |
| 683 | "$dawn_dxc_dir/lib/Support/SearchForAddressOfSpecialSymbol.cpp", |
| 684 | "$dawn_dxc_dir/lib/Support/Signals.cpp", |
| 685 | "$dawn_dxc_dir/lib/Support/SmallPtrSet.cpp", |
| 686 | "$dawn_dxc_dir/lib/Support/SmallVector.cpp", |
| 687 | "$dawn_dxc_dir/lib/Support/SourceMgr.cpp", |
| 688 | "$dawn_dxc_dir/lib/Support/SpecialCaseList.cpp", |
| 689 | "$dawn_dxc_dir/lib/Support/Statistic.cpp", |
| 690 | "$dawn_dxc_dir/lib/Support/StreamingMemoryObject.cpp", |
| 691 | "$dawn_dxc_dir/lib/Support/StringExtras.cpp", |
| 692 | "$dawn_dxc_dir/lib/Support/StringMap.cpp", |
| 693 | "$dawn_dxc_dir/lib/Support/StringPool.cpp", |
| 694 | "$dawn_dxc_dir/lib/Support/StringRef.cpp", |
| 695 | "$dawn_dxc_dir/lib/Support/StringSaver.cpp", |
| 696 | "$dawn_dxc_dir/lib/Support/SystemUtils.cpp", |
| 697 | "$dawn_dxc_dir/lib/Support/TargetParser.cpp", |
| 698 | "$dawn_dxc_dir/lib/Support/TargetRegistry.cpp", |
| 699 | "$dawn_dxc_dir/lib/Support/ThreadLocal.cpp", |
| 700 | "$dawn_dxc_dir/lib/Support/Threading.cpp", |
| 701 | "$dawn_dxc_dir/lib/Support/TimeProfiler.cpp", |
| 702 | "$dawn_dxc_dir/lib/Support/TimeValue.cpp", |
| 703 | "$dawn_dxc_dir/lib/Support/Timer.cpp", |
| 704 | "$dawn_dxc_dir/lib/Support/ToolOutputFile.cpp", |
| 705 | "$dawn_dxc_dir/lib/Support/Triple.cpp", |
| 706 | "$dawn_dxc_dir/lib/Support/Twine.cpp", |
| 707 | "$dawn_dxc_dir/lib/Support/Unicode.cpp", |
| 708 | "$dawn_dxc_dir/lib/Support/Valgrind.cpp", |
| 709 | "$dawn_dxc_dir/lib/Support/Watchdog.cpp", |
| 710 | "$dawn_dxc_dir/lib/Support/YAMLParser.cpp", |
| 711 | "$dawn_dxc_dir/lib/Support/YAMLTraits.cpp", |
| 712 | "$dawn_dxc_dir/lib/Support/assert.cpp", |
| 713 | "$dawn_dxc_dir/lib/Support/circular_raw_ostream.cpp", |
| 714 | "$dawn_dxc_dir/lib/Support/raw_os_ostream.cpp", |
| 715 | "$dawn_dxc_dir/lib/Support/raw_ostream.cpp", |
| 716 | "$dawn_dxc_dir/lib/Support/regcomp.c", |
| 717 | "$dawn_dxc_dir/lib/Support/regerror.c", |
| 718 | "$dawn_dxc_dir/lib/Support/regexec.c", |
| 719 | "$dawn_dxc_dir/lib/Support/regfree.c", |
| 720 | "$dawn_dxc_dir/lib/Support/regmalloc.cpp", |
| 721 | "$dawn_dxc_dir/lib/Support/regstrlcpy.c", |
| 722 | ] |
| 723 | } |
| 724 | |
| 725 | ####################################################################### |
| 726 | ## llvm-tblgen and clang-tblgen executables and templates |
| 727 | ####################################################################### |
| 728 | |
| 729 | # Common code for both llvm-tblgen and clang-tblgen |
| 730 | source_set("TableGen") { |
Antonio Maiorano | f56616d | 2023-11-20 18:33:22 +0000 | [diff] [blame] | 731 | public_deps = [ ":Support" ] |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 732 | |
| 733 | sources = [ |
| 734 | "$dawn_dxc_dir/lib/TableGen/Error.cpp", |
| 735 | "$dawn_dxc_dir/lib/TableGen/Main.cpp", |
| 736 | "$dawn_dxc_dir/lib/TableGen/Record.cpp", |
| 737 | "$dawn_dxc_dir/lib/TableGen/SetTheory.cpp", |
| 738 | "$dawn_dxc_dir/lib/TableGen/StringMatcher.cpp", |
| 739 | "$dawn_dxc_dir/lib/TableGen/TGLexer.cpp", |
| 740 | "$dawn_dxc_dir/lib/TableGen/TGParser.cpp", |
| 741 | "$dawn_dxc_dir/lib/TableGen/TableGenBackend.cpp", |
| 742 | ] |
| 743 | } |
| 744 | |
| 745 | executable("llvm-tblgen") { |
| 746 | deps = [ ":TableGen" ] |
| 747 | |
| 748 | sources = [ |
| 749 | "$dawn_dxc_dir/utils/TableGen/AsmMatcherEmitter.cpp", |
| 750 | "$dawn_dxc_dir/utils/TableGen/AsmWriterEmitter.cpp", |
| 751 | "$dawn_dxc_dir/utils/TableGen/AsmWriterInst.cpp", |
| 752 | "$dawn_dxc_dir/utils/TableGen/CTagsEmitter.cpp", |
| 753 | "$dawn_dxc_dir/utils/TableGen/CallingConvEmitter.cpp", |
| 754 | "$dawn_dxc_dir/utils/TableGen/CodeEmitterGen.cpp", |
| 755 | "$dawn_dxc_dir/utils/TableGen/CodeGenDAGPatterns.cpp", |
| 756 | "$dawn_dxc_dir/utils/TableGen/CodeGenInstruction.cpp", |
| 757 | "$dawn_dxc_dir/utils/TableGen/CodeGenMapTable.cpp", |
| 758 | "$dawn_dxc_dir/utils/TableGen/CodeGenRegisters.cpp", |
| 759 | "$dawn_dxc_dir/utils/TableGen/CodeGenSchedule.cpp", |
| 760 | "$dawn_dxc_dir/utils/TableGen/CodeGenTarget.cpp", |
| 761 | "$dawn_dxc_dir/utils/TableGen/DAGISelEmitter.cpp", |
| 762 | "$dawn_dxc_dir/utils/TableGen/DAGISelMatcher.cpp", |
| 763 | "$dawn_dxc_dir/utils/TableGen/DAGISelMatcherEmitter.cpp", |
| 764 | "$dawn_dxc_dir/utils/TableGen/DAGISelMatcherGen.cpp", |
| 765 | "$dawn_dxc_dir/utils/TableGen/DAGISelMatcherOpt.cpp", |
| 766 | "$dawn_dxc_dir/utils/TableGen/DFAPacketizerEmitter.cpp", |
| 767 | "$dawn_dxc_dir/utils/TableGen/DisassemblerEmitter.cpp", |
| 768 | "$dawn_dxc_dir/utils/TableGen/FastISelEmitter.cpp", |
| 769 | "$dawn_dxc_dir/utils/TableGen/FixedLenDecoderEmitter.cpp", |
| 770 | "$dawn_dxc_dir/utils/TableGen/InstrInfoEmitter.cpp", |
| 771 | "$dawn_dxc_dir/utils/TableGen/IntrinsicEmitter.cpp", |
| 772 | "$dawn_dxc_dir/utils/TableGen/OptParserEmitter.cpp", |
| 773 | "$dawn_dxc_dir/utils/TableGen/PseudoLoweringEmitter.cpp", |
| 774 | "$dawn_dxc_dir/utils/TableGen/RegisterInfoEmitter.cpp", |
| 775 | "$dawn_dxc_dir/utils/TableGen/SubtargetEmitter.cpp", |
| 776 | "$dawn_dxc_dir/utils/TableGen/TableGen.cpp", |
| 777 | ] |
| 778 | } |
| 779 | |
| 780 | executable("clang-tblgen") { |
| 781 | deps = [ ":TableGen" ] |
| 782 | |
| 783 | sources = [ |
| 784 | "$dawn_dxc_dir/tools/clang/utils/TableGen/ClangASTNodesEmitter.cpp", |
| 785 | "$dawn_dxc_dir/tools/clang/utils/TableGen/ClangAttrEmitter.cpp", |
| 786 | "$dawn_dxc_dir/tools/clang/utils/TableGen/ClangCommentCommandInfoEmitter.cpp", |
| 787 | "$dawn_dxc_dir/tools/clang/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp", |
| 788 | "$dawn_dxc_dir/tools/clang/utils/TableGen/ClangCommentHTMLTagsEmitter.cpp", |
| 789 | "$dawn_dxc_dir/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp", |
| 790 | "$dawn_dxc_dir/tools/clang/utils/TableGen/ClangSACheckersEmitter.cpp", |
| 791 | "$dawn_dxc_dir/tools/clang/utils/TableGen/NeonEmitter.cpp", |
| 792 | "$dawn_dxc_dir/tools/clang/utils/TableGen/TableGen.cpp", |
| 793 | ] |
| 794 | } |
| 795 | |
| 796 | template("tblgen") { |
| 797 | assert(defined(invoker.args), "must set 'args'") |
| 798 | assert(defined(invoker.td_file), "must set 'td_file") |
| 799 | assert(defined(invoker.output_name), "must set 'output_name") |
| 800 | assert(defined(invoker.tblgen_target), "must set 'tblgen_target") |
| 801 | |
| 802 | built_target_action(target_name) { |
| 803 | td_file = invoker.td_file |
| 804 | target = invoker.tblgen_target |
| 805 | inputs = [ td_file ] |
| 806 | |
| 807 | # TODO(amaiorano): Maybe targets should provide full path |
| 808 | output_file = "$target_gen_dir/" + invoker.output_name |
| 809 | depfile = "$output_file.d" |
| 810 | td_file = rebase_path(td_file, root_build_dir) |
| 811 | |
| 812 | args = [ |
| 813 | "-I", |
| 814 | rebase_path("${invoker.dawn_dxc_dir}/include", root_build_dir), |
| 815 | "-I", |
| 816 | get_path_info(td_file, "dir"), |
| 817 | "-d", |
| 818 | rebase_path(depfile, root_build_dir), |
| 819 | "-o", |
| 820 | rebase_path(output_file, root_build_dir), |
| 821 | td_file, |
| 822 | ] + invoker.args |
| 823 | |
| 824 | outputs = [ output_file ] |
| 825 | } |
| 826 | } |
| 827 | |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 828 | template("llvm_tablegen") { |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 829 | tblgen(target_name) { |
| 830 | forward_variables_from(invoker, |
| 831 | [ |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 832 | "args", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 833 | "output_name", |
| 834 | "td_file", |
| 835 | "visibility", |
| 836 | ]) |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 837 | tblgen_target = ":llvm-tblgen($host_toolchain)" |
| 838 | } |
| 839 | } |
| 840 | |
| 841 | template("clang_tablegen") { |
| 842 | tblgen(target_name) { |
| 843 | forward_variables_from(invoker, |
| 844 | [ |
| 845 | "args", |
| 846 | "output_name", |
| 847 | "td_file", |
| 848 | "visibility", |
| 849 | ]) |
| 850 | tblgen_target = ":clang-tblgen($host_toolchain)" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 851 | } |
| 852 | } |
| 853 | |
| 854 | template("clang_diag_gen") { |
| 855 | clang_tablegen("Diagnostic${target_name}Kinds-inc") { |
| 856 | forward_variables_from(invoker, "*") |
| 857 | args = [ |
| 858 | "-gen-clang-diags-defs", |
| 859 | "-clang-component=${target_name}", |
| 860 | ] |
| 861 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Diagnostic.td" |
| 862 | output_name = |
| 863 | "/tools/clang/include/clang/Basic/Diagnostic${target_name}Kinds.inc" |
| 864 | } |
| 865 | } |
| 866 | |
| 867 | ####################################################################### |
| 868 | ## llvm-tblgen and clang-tblgen targets |
| 869 | ####################################################################### |
| 870 | |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 871 | llvm_tablegen("HLSLOptions-inc") { |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 872 | args = [ "-gen-opt-parser-defs" ] |
| 873 | td_file = "$dawn_dxc_dir/include/dxc/Support/HLSLOptions.td" |
| 874 | output_name = "include/dxc/Support/HLSLOptions.inc" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 875 | } |
| 876 | |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 877 | llvm_tablegen("Intrinsics-td") { |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 878 | args = [ "-gen-intrinsic" ] |
| 879 | td_file = "$dawn_dxc_dir/include/llvm/IR/Intrinsics.td" |
| 880 | output_name = "include/llvm/IR/Intrinsics.gen" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 881 | } |
| 882 | |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 883 | llvm_tablegen("clang-Driver-Options-inc") { |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 884 | args = [ "-gen-opt-parser-defs" ] |
| 885 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Driver/Options.td" |
| 886 | output_name = "tools/clang/include/clang/Driver/Options.inc" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 887 | } |
| 888 | |
| 889 | clang_diag_gen("Analysis") { |
| 890 | } |
| 891 | clang_diag_gen("AST") { |
| 892 | } |
| 893 | clang_diag_gen("Comment") { |
| 894 | } |
| 895 | clang_diag_gen("Common") { |
| 896 | } |
| 897 | clang_diag_gen("Driver") { |
| 898 | } |
| 899 | clang_diag_gen("Frontend") { |
| 900 | } |
| 901 | clang_diag_gen("Lex") { |
| 902 | } |
| 903 | clang_diag_gen("Parse") { |
| 904 | } |
| 905 | clang_diag_gen("Sema") { |
| 906 | } |
| 907 | clang_diag_gen("Serialization") { |
| 908 | } |
| 909 | clang_tablegen("DiagnosticGroups-inc") { |
| 910 | args = [ "-gen-clang-diag-groups" ] |
| 911 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Diagnostic.td" |
| 912 | output_name = "/tools/clang/include/clang/Basic/DiagnosticGroups.inc" |
| 913 | } |
| 914 | clang_tablegen("AttrList-inc") { |
| 915 | args = [ |
| 916 | "-gen-clang-attr-list", |
| 917 | "-I", |
| 918 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 919 | ] |
| 920 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 921 | output_name = "/tools/clang/include/clang/Basic/AttrList.inc" |
| 922 | } |
| 923 | clang_tablegen("AttrHasAttributeImpl-inc") { |
| 924 | args = [ |
| 925 | "-gen-clang-attr-has-attribute-impl", |
| 926 | "-I", |
| 927 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 928 | ] |
| 929 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 930 | output_name = "/tools/clang/include/clang/Basic/AttrHasAttributeImpl.inc" |
| 931 | } |
| 932 | ClangBasicDeps = [ |
| 933 | ":DiagnosticAnalysisKinds-inc", |
| 934 | ":DiagnosticASTKinds-inc", |
| 935 | ":DiagnosticCommentKinds-inc", |
| 936 | ":DiagnosticCommonKinds-inc", |
| 937 | ":DiagnosticDriverKinds-inc", |
| 938 | ":DiagnosticFrontendKinds-inc", |
| 939 | ":DiagnosticLexKinds-inc", |
| 940 | ":DiagnosticParseKinds-inc", |
| 941 | ":DiagnosticSemaKinds-inc", |
| 942 | ":DiagnosticSerializationKinds-inc", |
| 943 | ":DiagnosticGroups-inc", |
| 944 | ":AttrList-inc", |
| 945 | ":AttrHasAttributeImpl-inc", |
| 946 | ] |
| 947 | |
| 948 | clang_tablegen("Attrs-inc") { |
| 949 | args = [ |
| 950 | "-gen-clang-attr-classes", |
| 951 | "-I", |
| 952 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 953 | ] |
| 954 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 955 | output_name = "/tools/clang/include/clang/AST/Attrs.inc" |
| 956 | } |
| 957 | clang_tablegen("AttrImpl-inc") { |
| 958 | args = [ |
| 959 | "-gen-clang-attr-impl", |
| 960 | "-I", |
| 961 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 962 | ] |
| 963 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 964 | output_name = "/tools/clang/include/clang/AST/AttrImpl.inc" |
| 965 | } |
| 966 | clang_tablegen("AttrDump-inc") { |
| 967 | args = [ |
| 968 | "-gen-clang-attr-dump", |
| 969 | "-I", |
| 970 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 971 | ] |
| 972 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 973 | output_name = "/tools/clang/include/clang/AST/AttrDump.inc" |
| 974 | } |
| 975 | clang_tablegen("AttrVisitor-inc") { |
| 976 | args = [ |
| 977 | "-gen-clang-attr-ast-visitor", |
| 978 | "-I", |
| 979 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 980 | ] |
| 981 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 982 | output_name = "/tools/clang/include/clang/AST/AttrVisitor.inc" |
| 983 | } |
| 984 | clang_tablegen("StmtNodes-inc") { |
| 985 | args = [ "-gen-clang-stmt-nodes" ] |
| 986 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/StmtNodes.td" |
| 987 | output_name = "/tools/clang/include/clang/AST/StmtNodes.inc" |
| 988 | } |
| 989 | clang_tablegen("DeclNodes-inc") { |
| 990 | args = [ "-gen-clang-decl-nodes" ] |
| 991 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/DeclNodes.td" |
| 992 | output_name = "/tools/clang/include/clang/AST/DeclNodes.inc" |
| 993 | } |
| 994 | clang_tablegen("CommentNodes-inc") { |
| 995 | args = [ "-gen-clang-comment-nodes" ] |
| 996 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/CommentNodes.td" |
| 997 | output_name = "/tools/clang/include/clang/AST/CommentNodes.inc" |
| 998 | } |
| 999 | clang_tablegen("CommentHTMLTags-inc") { |
| 1000 | args = [ "-gen-clang-comment-html-tags" ] |
| 1001 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/AST/CommentHTMLTags.td" |
| 1002 | output_name = "/tools/clang/include/clang/AST/CommentHTMLTags.inc" |
| 1003 | } |
| 1004 | clang_tablegen("CommentHTMLTagsProperties-inc") { |
| 1005 | args = [ "-gen-clang-comment-html-tags-properties" ] |
| 1006 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/AST/CommentHTMLTags.td" |
| 1007 | output_name = "/tools/clang/include/clang/AST/CommentHTMLTagsProperties.inc" |
| 1008 | } |
| 1009 | clang_tablegen("CommentHTMLNamedCharacterReferences-inc") { |
| 1010 | args = [ "-gen-clang-comment-html-named-character-references" ] |
| 1011 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/AST/CommentHTMLNamedCharacterReferences.td" |
| 1012 | output_name = |
| 1013 | "/tools/clang/include/clang/AST/CommentHTMLNamedCharacterReferences.inc" |
| 1014 | } |
| 1015 | clang_tablegen("CommentCommandInfo-inc") { |
| 1016 | args = [ "-gen-clang-comment-command-info" ] |
| 1017 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/AST/CommentCommands.td" |
| 1018 | output_name = "/tools/clang/include/clang/AST/CommentCommandInfo.inc" |
| 1019 | } |
| 1020 | clang_tablegen("CommentCommandList-inc") { |
| 1021 | args = [ "-gen-clang-comment-command-list" ] |
| 1022 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/AST/CommentCommands.td" |
| 1023 | output_name = "/tools/clang/include/clang/AST/CommentCommandList.inc" |
| 1024 | } |
| 1025 | ClangASTDeps = [ |
| 1026 | ":Attrs-inc", |
| 1027 | ":AttrImpl-inc", |
| 1028 | ":AttrDump-inc", |
| 1029 | ":AttrVisitor-inc", |
| 1030 | ":StmtNodes-inc", |
| 1031 | ":DeclNodes-inc", |
| 1032 | ":CommentNodes-inc", |
| 1033 | ":CommentHTMLTags-inc", |
| 1034 | ":CommentHTMLTagsProperties-inc", |
| 1035 | ":CommentHTMLNamedCharacterReferences-inc", |
| 1036 | ":CommentCommandInfo-inc", |
| 1037 | ":CommentCommandList-inc", |
| 1038 | ] |
| 1039 | clang_tablegen("AttrTemplateInstantiate-inc") { |
| 1040 | args = [ |
| 1041 | "-gen-clang-attr-template-instantiate", |
| 1042 | "-I", |
| 1043 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 1044 | ] |
| 1045 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 1046 | output_name = "/tools/clang/include/clang/Sema/AttrTemplateInstantiate.inc" |
| 1047 | } |
| 1048 | clang_tablegen("AttrParsedAttrList-inc") { |
| 1049 | args = [ |
| 1050 | "-gen-clang-attr-parsed-attr-list", |
| 1051 | "-I", |
| 1052 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 1053 | ] |
| 1054 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 1055 | output_name = "/tools/clang/include/clang/Sema/AttrParsedAttrList.inc" |
| 1056 | } |
| 1057 | clang_tablegen("AttrParsedAttrKinds-inc") { |
| 1058 | args = [ |
| 1059 | "-gen-clang-attr-parsed-attr-kinds", |
| 1060 | "-I", |
| 1061 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 1062 | ] |
| 1063 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 1064 | output_name = "/tools/clang/include/clang/Sema/AttrParsedAttrKinds.inc" |
| 1065 | } |
| 1066 | clang_tablegen("AttrSpellingListIndex-inc") { |
| 1067 | args = [ |
| 1068 | "-gen-clang-attr-spelling-index", |
| 1069 | "-I", |
| 1070 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 1071 | ] |
| 1072 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 1073 | output_name = "/tools/clang/include/clang/Sema/AttrSpellingListIndex.inc" |
| 1074 | } |
| 1075 | clang_tablegen("AttrParsedAttrImpl-inc") { |
| 1076 | args = [ |
| 1077 | "-gen-clang-attr-parsed-attr-impl", |
| 1078 | "-I", |
| 1079 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 1080 | ] |
| 1081 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 1082 | output_name = "/tools/clang/include/clang/Sema/AttrParsedAttrImpl.inc" |
| 1083 | } |
| 1084 | ClangSemaDeps = [ |
| 1085 | ":AttrTemplateInstantiate-inc", |
| 1086 | ":AttrParsedAttrList-inc", |
| 1087 | ":AttrParsedAttrKinds-inc", |
| 1088 | ":AttrSpellingListIndex-inc", |
| 1089 | ":AttrParsedAttrImpl-inc", |
| 1090 | ] |
| 1091 | clang_tablegen("AttrParserStringSwitches-inc") { |
| 1092 | args = [ |
| 1093 | "-gen-clang-attr-parser-string-switches", |
| 1094 | "-I", |
| 1095 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 1096 | ] |
| 1097 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 1098 | output_name = "/tools/clang/include/clang/Parse/AttrParserStringSwitches.inc" |
| 1099 | } |
| 1100 | clang_tablegen("AttrPCHRead-inc") { |
| 1101 | args = [ |
| 1102 | "-gen-clang-attr-pch-read", |
| 1103 | "-I", |
| 1104 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 1105 | ] |
| 1106 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 1107 | output_name = "/tools/clang/include/clang/Serialization/AttrPCHRead.inc" |
| 1108 | } |
| 1109 | clang_tablegen("AttrPCHWrite-inc") { |
| 1110 | args = [ |
| 1111 | "-gen-clang-attr-pch-write", |
| 1112 | "-I", |
| 1113 | rebase_path("$dawn_dxc_dir/tools/clang/include", root_build_dir), |
| 1114 | ] |
| 1115 | td_file = "$dawn_dxc_dir/tools/clang/include/clang/Basic/Attr.td" |
| 1116 | output_name = "/tools/clang/include/clang/Serialization/AttrPCHWrite.inc" |
| 1117 | } |
| 1118 | |
| 1119 | ####################################################################### |
| 1120 | ## dxc generators (gen_version, hlsl_hctgen, etc.) |
| 1121 | ####################################################################### |
| 1122 | |
| 1123 | # Generates dxcetw.h used by dxcompiler |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 1124 | message_compiler("dxcetw-h") { |
| 1125 | sources = [ "$dawn_dxc_dir/include/dxc/Tracing/dxcetw.man" ] |
| 1126 | extra_args = [ |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1127 | "-p", |
| 1128 | "DxcEtw_", |
| 1129 | "-um", |
| 1130 | "-z", |
| 1131 | "dxcetw", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1132 | ] |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 1133 | output_dir = "$target_gen_dir/include/dxc/Tracing/dxcetw" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1134 | } |
| 1135 | |
| 1136 | generate_version_include("hlsl_dxcversion_autogen") { |
| 1137 | input_file = "$dawn_dxc_dir/utils/version/version.inc" |
| 1138 | output_file = "/utils/version/dxcversion.inc" |
| 1139 | } |
| 1140 | |
| 1141 | add_hlsl_hctgen("DxcDisassembler-inc") { |
| 1142 | mode = "DxcDisassembler" |
| 1143 | output = "/tools/clang/tools/dxcompiler/DxcDisassembler.inc" |
| 1144 | build_dir = true |
| 1145 | } |
| 1146 | add_hlsl_hctgen("DxilValidation-inc") { |
| 1147 | mode = "DxilValidationInc" |
Antonio Maiorano | def14f9 | 2024-08-14 17:39:08 +0000 | [diff] [blame] | 1148 | output = "/include/dxc/DxilValidation/DxilValidation.inc" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1149 | build_dir = true |
| 1150 | } |
| 1151 | add_hlsl_hctgen("DxcOptimizer-inc") { |
| 1152 | mode = "DxcOptimizer" |
| 1153 | output = "/lib/HLSL/DxcOptimizer.inc" |
| 1154 | build_dir = true |
| 1155 | } |
| 1156 | add_hlsl_hctgen("DxilValidationImpl-inc") { |
| 1157 | mode = "DxilValidation" |
Antonio Maiorano | def14f9 | 2024-08-14 17:39:08 +0000 | [diff] [blame] | 1158 | output = "/lib/DxilValidation/DxilValidationImpl.inc" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1159 | build_dir = true |
| 1160 | } |
| 1161 | add_hlsl_hctgen("gen_intrin_main_tables_15-h") { |
| 1162 | mode = "DxilIntrinsicTables" |
| 1163 | output = "/tools/clang/lib/Sema/gen_intrin_main_tables_15.h" |
| 1164 | build_dir = true |
| 1165 | } |
| 1166 | add_hlsl_hctgen("DxilPIXPasses-inc") { |
| 1167 | mode = "DxilPIXPasses" |
| 1168 | output = "/lib/DxilPIXPasses/DxilPIXPasses.inc" |
| 1169 | build_dir = true |
| 1170 | } |
| 1171 | |
| 1172 | ####################################################################### |
| 1173 | ## dxc and dxcompiler |
| 1174 | ####################################################################### |
| 1175 | |
| 1176 | # This target contains common code shared by both 'dxc' and 'dxcompiler' targets |
Antonio Maiorano | c5c7480 | 2024-08-08 14:45:08 +0000 | [diff] [blame] | 1177 | dxc_module("dxclib") { |
| 1178 | target_type = "static_library" |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1179 | public_deps = [ |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1180 | ":HLSLOptions-inc", |
| 1181 | ":Intrinsics-td", |
| 1182 | ":SharedLibAffix-h", |
| 1183 | ":Support", |
| 1184 | ] |
| 1185 | sources = [ |
| 1186 | "$dawn_dxc_dir/lib/DXIL/DxilCBuffer.cpp", |
| 1187 | "$dawn_dxc_dir/lib/DXIL/DxilCompType.cpp", |
| 1188 | "$dawn_dxc_dir/lib/DXIL/DxilCounters.cpp", |
| 1189 | "$dawn_dxc_dir/lib/DXIL/DxilInterpolationMode.cpp", |
| 1190 | "$dawn_dxc_dir/lib/DXIL/DxilMetadataHelper.cpp", |
| 1191 | "$dawn_dxc_dir/lib/DXIL/DxilModule.cpp", |
| 1192 | "$dawn_dxc_dir/lib/DXIL/DxilModuleHelper.cpp", |
Antonio Maiorano | f5003c0 | 2023-11-09 18:25:04 +0000 | [diff] [blame] | 1193 | "$dawn_dxc_dir/lib/DXIL/DxilNodeProps.cpp", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1194 | "$dawn_dxc_dir/lib/DXIL/DxilOperations.cpp", |
| 1195 | "$dawn_dxc_dir/lib/DXIL/DxilPDB.cpp", |
| 1196 | "$dawn_dxc_dir/lib/DXIL/DxilResource.cpp", |
| 1197 | "$dawn_dxc_dir/lib/DXIL/DxilResourceBase.cpp", |
| 1198 | "$dawn_dxc_dir/lib/DXIL/DxilResourceBinding.cpp", |
| 1199 | "$dawn_dxc_dir/lib/DXIL/DxilResourceProperties.cpp", |
| 1200 | "$dawn_dxc_dir/lib/DXIL/DxilSampler.cpp", |
| 1201 | "$dawn_dxc_dir/lib/DXIL/DxilSemantic.cpp", |
| 1202 | "$dawn_dxc_dir/lib/DXIL/DxilShaderFlags.cpp", |
| 1203 | "$dawn_dxc_dir/lib/DXIL/DxilShaderModel.cpp", |
| 1204 | "$dawn_dxc_dir/lib/DXIL/DxilSignature.cpp", |
| 1205 | "$dawn_dxc_dir/lib/DXIL/DxilSignatureElement.cpp", |
| 1206 | "$dawn_dxc_dir/lib/DXIL/DxilSubobject.cpp", |
| 1207 | "$dawn_dxc_dir/lib/DXIL/DxilTypeSystem.cpp", |
| 1208 | "$dawn_dxc_dir/lib/DXIL/DxilUtil.cpp", |
| 1209 | "$dawn_dxc_dir/lib/DXIL/DxilUtilDbgInfoAndMisc.cpp", |
| 1210 | "$dawn_dxc_dir/lib/DxcSupport/FileIOHelper.cpp", |
| 1211 | "$dawn_dxc_dir/lib/DxcSupport/Global.cpp", |
| 1212 | "$dawn_dxc_dir/lib/DxcSupport/HLSLOptions.cpp", |
| 1213 | "$dawn_dxc_dir/lib/DxcSupport/Unicode.cpp", |
| 1214 | "$dawn_dxc_dir/lib/DxcSupport/WinAdapter.cpp", |
| 1215 | "$dawn_dxc_dir/lib/DxcSupport/WinFunctions.cpp", |
Antonio Maiorano | ae8e37c | 2023-07-18 19:45:24 +0000 | [diff] [blame] | 1216 | "$dawn_dxc_dir/lib/DxcSupport/WinIncludes.cpp", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1217 | "$dawn_dxc_dir/lib/DxcSupport/dxcapi.use.cpp", |
| 1218 | "$dawn_dxc_dir/lib/DxcSupport/dxcmem.cpp", |
| 1219 | "$dawn_dxc_dir/lib/DxilContainer/DxcContainerBuilder.cpp", |
| 1220 | "$dawn_dxc_dir/lib/DxilContainer/DxilContainer.cpp", |
| 1221 | "$dawn_dxc_dir/lib/DxilContainer/DxilContainerAssembler.cpp", |
| 1222 | "$dawn_dxc_dir/lib/DxilContainer/DxilContainerReader.cpp", |
Antonio Maiorano | 489f4d3 | 2024-09-12 21:19:50 +0000 | [diff] [blame] | 1223 | "$dawn_dxc_dir/lib/DxilContainer/DxilPipelineStateValidation.cpp", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1224 | "$dawn_dxc_dir/lib/DxilContainer/DxilRDATBuilder.cpp", |
| 1225 | "$dawn_dxc_dir/lib/DxilContainer/DxilRuntimeReflection.cpp", |
| 1226 | "$dawn_dxc_dir/lib/DxilContainer/RDATDxilSubobjects.cpp", |
Antonio Maiorano | 489f4d3 | 2024-09-12 21:19:50 +0000 | [diff] [blame] | 1227 | "$dawn_dxc_dir/lib/DxilHash/DxilHash.cpp", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1228 | "$dawn_dxc_dir/lib/Option/Arg.cpp", |
| 1229 | "$dawn_dxc_dir/lib/Option/ArgList.cpp", |
| 1230 | "$dawn_dxc_dir/lib/Option/OptTable.cpp", |
| 1231 | "$dawn_dxc_dir/lib/Option/Option.cpp", |
| 1232 | ] |
| 1233 | } |
| 1234 | |
| 1235 | # Template to define a source_set or static_library for dxcompiler sources. |
| 1236 | # Used to split up sources into multiple targets to avoid name collisions. |
| 1237 | template("dxcompiler_sourceset") { |
| 1238 | assert(defined(invoker.target_type), "must set target_type") |
| 1239 | |
Antonio Maiorano | c5c7480 | 2024-08-08 14:45:08 +0000 | [diff] [blame] | 1240 | dxc_module(target_name) { |
| 1241 | forward_variables_from(invoker, "*") |
Antonio Maiorano | def14f9 | 2024-08-14 17:39:08 +0000 | [diff] [blame] | 1242 | if (!defined(deps)) { |
| 1243 | deps = [] |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1244 | } |
Antonio Maiorano | def14f9 | 2024-08-14 17:39:08 +0000 | [diff] [blame] | 1245 | deps += [ |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1246 | ":AttrPCHRead-inc", |
| 1247 | ":AttrPCHWrite-inc", |
| 1248 | ":AttrParserStringSwitches-inc", |
| 1249 | ":DxcOptimizer-inc", |
| 1250 | ":DxilPIXPasses-inc", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1251 | ":clang-Driver-Options-inc", |
| 1252 | ":clang-basic-version-inc", |
| 1253 | ":clang-config-h", |
| 1254 | ":dxclib", |
| 1255 | ":gen_intrin_main_tables_15-h", |
| 1256 | ":hlsl_dxcversion_autogen", |
| 1257 | ] |
| 1258 | deps += ClangBasicDeps |
| 1259 | deps += ClangASTDeps |
| 1260 | deps += ClangSemaDeps |
| 1261 | |
Antonio Maiorano | def14f9 | 2024-08-14 17:39:08 +0000 | [diff] [blame] | 1262 | if (!defined(include_dirs)) { |
| 1263 | include_dirs = [] |
| 1264 | } |
| 1265 | include_dirs += [ |
David Neto | 6515d33 | 2024-07-30 18:39:47 +0000 | [diff] [blame] | 1266 | "${dawn_dxc_dir}/tools/clang/tools/dxcvalidator", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1267 | "${target_gen_dir}/utils/version", # hlsl_dxcversion_autogen |
| 1268 | "${target_gen_dir}/tools/clang/include", |
| 1269 | "${target_gen_dir}/tools/clang/tools/dxcompiler", |
| 1270 | "${target_gen_dir}/tools/clang/lib/Sema", |
| 1271 | "${target_gen_dir}/lib/HLSL", |
| 1272 | "${target_gen_dir}/lib/DxilPIXPasses", |
| 1273 | ] |
| 1274 | |
Antonio Maiorano | ef9da42 | 2023-09-21 17:53:34 +0000 | [diff] [blame] | 1275 | if (is_linux || is_mac) { |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1276 | include_dirs += [ |
| 1277 | "$dawn_dxheaders_dir/include/directx", |
| 1278 | "$dawn_dxheaders_dir/include/wsl/stubs/", |
| 1279 | ] |
| 1280 | } |
| 1281 | |
| 1282 | if (is_win) { |
| 1283 | deps += [ ":dxcetw-h" ] |
| 1284 | include_dirs += [ |
| 1285 | "$target_gen_dir/include/dxc/Tracing/dxcetw", # dxcetw-h |
| 1286 | "$visual_studio_path/DIA SDK/include", # Required for msvc builds |
| 1287 | ] |
| 1288 | } |
| 1289 | |
Antonio Maiorano | def14f9 | 2024-08-14 17:39:08 +0000 | [diff] [blame] | 1290 | if (!defined(defines)) { |
| 1291 | defines = [] |
| 1292 | } |
Antonio Maiorano | c5c7480 | 2024-08-08 14:45:08 +0000 | [diff] [blame] | 1293 | defines += [ |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1294 | "DXC_API_IMPORT=", # Don't import locally defined symbols |
| 1295 | "CINDEX_LINKAGE=", |
| 1296 | "LIBCLANG_CC=", |
| 1297 | "_CINDEX_LIB_", |
| 1298 | ] |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1299 | } |
| 1300 | } |
| 1301 | |
| 1302 | dxcompiler_sourceset("lib_analysis") { |
| 1303 | target_type = "static_library" # Ensure unused globals are stripped |
| 1304 | sources = [ |
| 1305 | "$dawn_dxc_dir/lib/Analysis/AliasAnalysis.cpp", |
| 1306 | "$dawn_dxc_dir/lib/Analysis/AliasAnalysisCounter.cpp", |
| 1307 | "$dawn_dxc_dir/lib/Analysis/AliasAnalysisEvaluator.cpp", |
| 1308 | "$dawn_dxc_dir/lib/Analysis/AliasDebugger.cpp", |
| 1309 | "$dawn_dxc_dir/lib/Analysis/AliasSetTracker.cpp", |
| 1310 | "$dawn_dxc_dir/lib/Analysis/Analysis.cpp", |
| 1311 | "$dawn_dxc_dir/lib/Analysis/AssumptionCache.cpp", |
| 1312 | "$dawn_dxc_dir/lib/Analysis/BasicAliasAnalysis.cpp", |
| 1313 | "$dawn_dxc_dir/lib/Analysis/BlockFrequencyInfo.cpp", |
| 1314 | "$dawn_dxc_dir/lib/Analysis/BlockFrequencyInfoImpl.cpp", |
| 1315 | "$dawn_dxc_dir/lib/Analysis/BranchProbabilityInfo.cpp", |
| 1316 | "$dawn_dxc_dir/lib/Analysis/CFG.cpp", |
| 1317 | "$dawn_dxc_dir/lib/Analysis/CFGPrinter.cpp", |
| 1318 | "$dawn_dxc_dir/lib/Analysis/CFLAliasAnalysis.cpp", |
| 1319 | "$dawn_dxc_dir/lib/Analysis/CGSCCPassManager.cpp", |
| 1320 | "$dawn_dxc_dir/lib/Analysis/CaptureTracking.cpp", |
| 1321 | "$dawn_dxc_dir/lib/Analysis/CodeMetrics.cpp", |
| 1322 | "$dawn_dxc_dir/lib/Analysis/ConstantFolding.cpp", |
| 1323 | "$dawn_dxc_dir/lib/Analysis/CostModel.cpp", |
| 1324 | "$dawn_dxc_dir/lib/Analysis/Delinearization.cpp", |
| 1325 | "$dawn_dxc_dir/lib/Analysis/DependenceAnalysis.cpp", |
| 1326 | "$dawn_dxc_dir/lib/Analysis/DivergenceAnalysis.cpp", |
| 1327 | "$dawn_dxc_dir/lib/Analysis/DomPrinter.cpp", |
| 1328 | "$dawn_dxc_dir/lib/Analysis/DominanceFrontier.cpp", |
| 1329 | "$dawn_dxc_dir/lib/Analysis/DxilConstantFolding.cpp", |
| 1330 | "$dawn_dxc_dir/lib/Analysis/DxilConstantFoldingExt.cpp", |
| 1331 | "$dawn_dxc_dir/lib/Analysis/DxilSimplify.cpp", |
| 1332 | "$dawn_dxc_dir/lib/Analysis/DxilValueCache.cpp", |
| 1333 | "$dawn_dxc_dir/lib/Analysis/IPA/CallGraph.cpp", |
| 1334 | "$dawn_dxc_dir/lib/Analysis/IPA/CallGraphSCCPass.cpp", |
| 1335 | "$dawn_dxc_dir/lib/Analysis/IPA/CallPrinter.cpp", |
| 1336 | "$dawn_dxc_dir/lib/Analysis/IPA/GlobalsModRef.cpp", |
| 1337 | "$dawn_dxc_dir/lib/Analysis/IPA/IPA.cpp", |
| 1338 | "$dawn_dxc_dir/lib/Analysis/IPA/InlineCost.cpp", |
| 1339 | "$dawn_dxc_dir/lib/Analysis/IVUsers.cpp", |
| 1340 | "$dawn_dxc_dir/lib/Analysis/InstCount.cpp", |
| 1341 | "$dawn_dxc_dir/lib/Analysis/InstructionSimplify.cpp", |
| 1342 | "$dawn_dxc_dir/lib/Analysis/Interval.cpp", |
| 1343 | "$dawn_dxc_dir/lib/Analysis/IntervalPartition.cpp", |
| 1344 | "$dawn_dxc_dir/lib/Analysis/IteratedDominanceFrontier.cpp", |
| 1345 | "$dawn_dxc_dir/lib/Analysis/LazyCallGraph.cpp", |
| 1346 | "$dawn_dxc_dir/lib/Analysis/LazyValueInfo.cpp", |
| 1347 | "$dawn_dxc_dir/lib/Analysis/LibCallAliasAnalysis.cpp", |
| 1348 | "$dawn_dxc_dir/lib/Analysis/LibCallSemantics.cpp", |
| 1349 | "$dawn_dxc_dir/lib/Analysis/Lint.cpp", |
| 1350 | "$dawn_dxc_dir/lib/Analysis/Loads.cpp", |
| 1351 | "$dawn_dxc_dir/lib/Analysis/LoopAccessAnalysis.cpp", |
| 1352 | "$dawn_dxc_dir/lib/Analysis/LoopInfo.cpp", |
| 1353 | "$dawn_dxc_dir/lib/Analysis/LoopPass.cpp", |
| 1354 | "$dawn_dxc_dir/lib/Analysis/MemDepPrinter.cpp", |
| 1355 | "$dawn_dxc_dir/lib/Analysis/MemDerefPrinter.cpp", |
| 1356 | "$dawn_dxc_dir/lib/Analysis/MemoryBuiltins.cpp", |
| 1357 | "$dawn_dxc_dir/lib/Analysis/MemoryDependenceAnalysis.cpp", |
| 1358 | "$dawn_dxc_dir/lib/Analysis/MemoryLocation.cpp", |
| 1359 | "$dawn_dxc_dir/lib/Analysis/ModuleDebugInfoPrinter.cpp", |
| 1360 | "$dawn_dxc_dir/lib/Analysis/NoAliasAnalysis.cpp", |
| 1361 | "$dawn_dxc_dir/lib/Analysis/PHITransAddr.cpp", |
| 1362 | "$dawn_dxc_dir/lib/Analysis/PostDominators.cpp", |
| 1363 | "$dawn_dxc_dir/lib/Analysis/PtrUseVisitor.cpp", |
| 1364 | "$dawn_dxc_dir/lib/Analysis/ReducibilityAnalysis.cpp", |
| 1365 | "$dawn_dxc_dir/lib/Analysis/RegionPass.cpp", |
| 1366 | "$dawn_dxc_dir/lib/Analysis/ScalarEvolution.cpp", |
| 1367 | "$dawn_dxc_dir/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp", |
| 1368 | "$dawn_dxc_dir/lib/Analysis/ScalarEvolutionExpander.cpp", |
| 1369 | "$dawn_dxc_dir/lib/Analysis/ScalarEvolutionNormalization.cpp", |
| 1370 | "$dawn_dxc_dir/lib/Analysis/ScopedNoAliasAA.cpp", |
| 1371 | "$dawn_dxc_dir/lib/Analysis/SparsePropagation.cpp", |
| 1372 | "$dawn_dxc_dir/lib/Analysis/TargetLibraryInfo.cpp", |
| 1373 | "$dawn_dxc_dir/lib/Analysis/TargetTransformInfo.cpp", |
| 1374 | "$dawn_dxc_dir/lib/Analysis/Trace.cpp", |
| 1375 | "$dawn_dxc_dir/lib/Analysis/TypeBasedAliasAnalysis.cpp", |
| 1376 | "$dawn_dxc_dir/lib/Analysis/ValueTracking.cpp", |
| 1377 | "$dawn_dxc_dir/lib/Analysis/VectorUtils.cpp", |
| 1378 | "$dawn_dxc_dir/lib/Analysis/VectorUtils2.cpp", |
| 1379 | "$dawn_dxc_dir/lib/Analysis/regioninfo.cpp", |
| 1380 | "$dawn_dxc_dir/lib/Analysis/regionprinter.cpp", |
| 1381 | ] |
| 1382 | } |
| 1383 | dxcompiler_sourceset("lib_asmparser") { |
| 1384 | target_type = "static_library" # Ensure unused globals are stripped |
| 1385 | sources = [ |
| 1386 | "$dawn_dxc_dir/lib/AsmParser/LLLexer.cpp", |
| 1387 | "$dawn_dxc_dir/lib/AsmParser/LLParser.cpp", |
| 1388 | "$dawn_dxc_dir/lib/AsmParser/Parser.cpp", |
| 1389 | ] |
| 1390 | } |
| 1391 | dxcompiler_sourceset("lib_bitcode") { |
| 1392 | target_type = "static_library" # Ensure unused globals are stripped |
| 1393 | sources = [ |
| 1394 | "$dawn_dxc_dir/lib/Bitcode/Reader/BitcodeReader.cpp", |
| 1395 | "$dawn_dxc_dir/lib/Bitcode/Reader/BitstreamReader.cpp", |
| 1396 | "$dawn_dxc_dir/lib/Bitcode/Writer/BitWriter.cpp", |
| 1397 | "$dawn_dxc_dir/lib/Bitcode/Writer/BitcodeWriter.cpp", |
| 1398 | "$dawn_dxc_dir/lib/Bitcode/Writer/BitcodeWriterPass.cpp", |
| 1399 | "$dawn_dxc_dir/lib/Bitcode/Writer/ValueEnumerator.cpp", |
| 1400 | ] |
| 1401 | } |
| 1402 | dxcompiler_sourceset("lib_dxcbindingtable") { |
| 1403 | target_type = "static_library" # Ensure unused globals are stripped |
| 1404 | sources = [ "$dawn_dxc_dir/lib/DxcBindingTable/DxcBindingTable.cpp" ] |
| 1405 | } |
| 1406 | dxcompiler_sourceset("lib_dxilcompression") { |
| 1407 | target_type = "static_library" # Ensure unused globals are stripped |
| 1408 | sources = [ |
| 1409 | "$dawn_dxc_dir/lib/DxilCompression/DxilCompression.cpp", |
| 1410 | "$dawn_dxc_dir/lib/DxilCompression/miniz.c", |
| 1411 | ] |
| 1412 | } |
| 1413 | dxcompiler_sourceset("lib_dxildia") { |
| 1414 | target_type = "static_library" # Ensure unused globals are stripped |
| 1415 | if (is_win) { |
| 1416 | sources = [ |
| 1417 | "$dawn_dxc_dir/lib/DxilDia/DxcPixCompilationInfo.cpp", |
| 1418 | "$dawn_dxc_dir/lib/DxilDia/DxcPixDxilDebugInfo.cpp", |
| 1419 | "$dawn_dxc_dir/lib/DxilDia/DxcPixDxilStorage.cpp", |
| 1420 | "$dawn_dxc_dir/lib/DxilDia/DxcPixEntrypoints.cpp", |
| 1421 | "$dawn_dxc_dir/lib/DxilDia/DxcPixLiveVariables.cpp", |
| 1422 | "$dawn_dxc_dir/lib/DxilDia/DxcPixLiveVariables_FragmentIterator.cpp", |
| 1423 | "$dawn_dxc_dir/lib/DxilDia/DxcPixTypes.cpp", |
| 1424 | "$dawn_dxc_dir/lib/DxilDia/DxcPixVariables.cpp", |
| 1425 | "$dawn_dxc_dir/lib/DxilDia/DxilDia.cpp", |
| 1426 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaDataSource.cpp", |
| 1427 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaEnumTables.cpp", |
| 1428 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaSession.cpp", |
| 1429 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaSymbolManager.cpp", |
| 1430 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaTable.cpp", |
| 1431 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaTableFrameData.cpp", |
| 1432 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaTableInjectedSources.cpp", |
| 1433 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaTableInputAssemblyFile.cpp", |
| 1434 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaTableLineNumbers.cpp", |
| 1435 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaTableSections.cpp", |
| 1436 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaTableSegmentMap.cpp", |
| 1437 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaTableSourceFiles.cpp", |
| 1438 | "$dawn_dxc_dir/lib/DxilDia/DxilDiaTableSymbols.cpp", |
| 1439 | ] |
| 1440 | } |
| 1441 | } |
| 1442 | dxcompiler_sourceset("lib_dxilpixpasses") { |
| 1443 | target_type = "static_library" # Ensure unused globals are stripped |
| 1444 | sources = [ |
| 1445 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilAddPixelHitInstrumentation.cpp", |
| 1446 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilAnnotateWithVirtualRegister.cpp", |
| 1447 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilDbgValueToDbgDeclare.cpp", |
| 1448 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilDebugInstrumentation.cpp", |
| 1449 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilForceEarlyZ.cpp", |
| 1450 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilOutputColorBecomesConstant.cpp", |
| 1451 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilPIXAddTidToAmplificationShaderPayload.cpp", |
Antonio Maiorano | ae8e37c | 2023-07-18 19:45:24 +0000 | [diff] [blame] | 1452 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilPIXDXRInvocationsLog.cpp", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1453 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilPIXMeshShaderOutputInstrumentation.cpp", |
| 1454 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilPIXPasses.cpp", |
| 1455 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilPIXVirtualRegisters.cpp", |
| 1456 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilReduceMSAAToSingleSample.cpp", |
| 1457 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilRemoveDiscards.cpp", |
| 1458 | "$dawn_dxc_dir/lib/DxilPIXPasses/DxilShaderAccessTracking.cpp", |
| 1459 | "$dawn_dxc_dir/lib/DxilPIXPasses/PixPassHelpers.cpp", |
| 1460 | ] |
| 1461 | } |
| 1462 | dxcompiler_sourceset("lib_dxilrootsignature") { |
| 1463 | target_type = "static_library" # Ensure unused globals are stripped |
| 1464 | sources = [ |
| 1465 | "$dawn_dxc_dir/lib/DxilRootSignature/DxilRootSignature.cpp", |
| 1466 | "$dawn_dxc_dir/lib/DxilRootSignature/DxilRootSignatureConvert.cpp", |
| 1467 | "$dawn_dxc_dir/lib/DxilRootSignature/DxilRootSignatureSerializer.cpp", |
| 1468 | "$dawn_dxc_dir/lib/DxilRootSignature/DxilRootSignatureValidator.cpp", |
| 1469 | ] |
| 1470 | } |
Antonio Maiorano | def14f9 | 2024-08-14 17:39:08 +0000 | [diff] [blame] | 1471 | dxcompiler_sourceset("lib_dxilvalidation") { |
| 1472 | target_type = "static_library" # Ensure unused globals are stripped |
| 1473 | deps = [ |
| 1474 | ":DxilValidation-inc", |
| 1475 | ":DxilValidationImpl-inc", |
| 1476 | ] |
| 1477 | sources = [ |
| 1478 | "$dawn_dxc_dir/lib/DxilValidation/DxilContainerValidation.cpp", |
| 1479 | "$dawn_dxc_dir/lib/DxilValidation/DxilValidation.cpp", |
| 1480 | "$dawn_dxc_dir/lib/DxilValidation/DxilValidationUtils.cpp", |
| 1481 | ] |
| 1482 | include_dirs = [ |
| 1483 | "${target_gen_dir}/lib/DxilValidation", |
| 1484 | "${target_gen_dir}/include/dxc/DxilValidation", |
| 1485 | ] |
| 1486 | } |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1487 | dxcompiler_sourceset("lib_hlsl") { |
| 1488 | target_type = "static_library" # Ensure unused globals are stripped |
| 1489 | sources = [ |
| 1490 | "$dawn_dxc_dir/lib/HLSL/ComputeViewIdState.cpp", |
| 1491 | "$dawn_dxc_dir/lib/HLSL/ComputeViewIdStateBuilder.cpp", |
| 1492 | "$dawn_dxc_dir/lib/HLSL/ControlDependence.cpp", |
| 1493 | "$dawn_dxc_dir/lib/HLSL/DxcOptimizer.cpp", |
| 1494 | "$dawn_dxc_dir/lib/HLSL/DxilCondenseResources.cpp", |
| 1495 | "$dawn_dxc_dir/lib/HLSL/DxilContainerReflection.cpp", |
| 1496 | "$dawn_dxc_dir/lib/HLSL/DxilConvergent.cpp", |
| 1497 | "$dawn_dxc_dir/lib/HLSL/DxilDeleteRedundantDebugValues.cpp", |
| 1498 | "$dawn_dxc_dir/lib/HLSL/DxilEliminateOutputDynamicIndexing.cpp", |
| 1499 | "$dawn_dxc_dir/lib/HLSL/DxilExpandTrigIntrinsics.cpp", |
| 1500 | "$dawn_dxc_dir/lib/HLSL/DxilExportMap.cpp", |
| 1501 | "$dawn_dxc_dir/lib/HLSL/DxilGenerationPass.cpp", |
| 1502 | "$dawn_dxc_dir/lib/HLSL/DxilLegalizeEvalOperations.cpp", |
| 1503 | "$dawn_dxc_dir/lib/HLSL/DxilLegalizeSampleOffsetPass.cpp", |
| 1504 | "$dawn_dxc_dir/lib/HLSL/DxilLinker.cpp", |
| 1505 | "$dawn_dxc_dir/lib/HLSL/DxilLoopDeletion.cpp", |
| 1506 | "$dawn_dxc_dir/lib/HLSL/DxilNoOptLegalize.cpp", |
| 1507 | "$dawn_dxc_dir/lib/HLSL/DxilNoops.cpp", |
| 1508 | "$dawn_dxc_dir/lib/HLSL/DxilPackSignatureElement.cpp", |
| 1509 | "$dawn_dxc_dir/lib/HLSL/DxilPatchShaderRecordBindings.cpp", |
| 1510 | "$dawn_dxc_dir/lib/HLSL/DxilPoisonValues.cpp", |
| 1511 | "$dawn_dxc_dir/lib/HLSL/DxilPrecisePropagatePass.cpp", |
| 1512 | "$dawn_dxc_dir/lib/HLSL/DxilPreparePasses.cpp", |
| 1513 | "$dawn_dxc_dir/lib/HLSL/DxilPreserveAllOutputs.cpp", |
| 1514 | "$dawn_dxc_dir/lib/HLSL/DxilPromoteResourcePasses.cpp", |
| 1515 | "$dawn_dxc_dir/lib/HLSL/DxilRenameResourcesPass.cpp", |
| 1516 | "$dawn_dxc_dir/lib/HLSL/DxilSignatureValidation.cpp", |
| 1517 | "$dawn_dxc_dir/lib/HLSL/DxilSimpleGVNHoist.cpp", |
| 1518 | "$dawn_dxc_dir/lib/HLSL/DxilTargetLowering.cpp", |
| 1519 | "$dawn_dxc_dir/lib/HLSL/DxilTargetTransformInfo.cpp", |
| 1520 | "$dawn_dxc_dir/lib/HLSL/DxilTranslateRawBuffer.cpp", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 1521 | "$dawn_dxc_dir/lib/HLSL/HLDeadFunctionElimination.cpp", |
| 1522 | "$dawn_dxc_dir/lib/HLSL/HLExpandStoreIntrinsics.cpp", |
| 1523 | "$dawn_dxc_dir/lib/HLSL/HLLegalizeParameter.cpp", |
| 1524 | "$dawn_dxc_dir/lib/HLSL/HLLowerUDT.cpp", |
| 1525 | "$dawn_dxc_dir/lib/HLSL/HLMatrixBitcastLowerPass.cpp", |
| 1526 | "$dawn_dxc_dir/lib/HLSL/HLMatrixLowerPass.cpp", |
| 1527 | "$dawn_dxc_dir/lib/HLSL/HLMatrixSubscriptUseReplacer.cpp", |
| 1528 | "$dawn_dxc_dir/lib/HLSL/HLMatrixType.cpp", |
| 1529 | "$dawn_dxc_dir/lib/HLSL/HLMetadataPasses.cpp", |
| 1530 | "$dawn_dxc_dir/lib/HLSL/HLModule.cpp", |
| 1531 | "$dawn_dxc_dir/lib/HLSL/HLOperationLower.cpp", |
| 1532 | "$dawn_dxc_dir/lib/HLSL/HLOperationLowerExtension.cpp", |
| 1533 | "$dawn_dxc_dir/lib/HLSL/HLOperations.cpp", |
| 1534 | "$dawn_dxc_dir/lib/HLSL/HLPreprocess.cpp", |
| 1535 | "$dawn_dxc_dir/lib/HLSL/HLResource.cpp", |
| 1536 | "$dawn_dxc_dir/lib/HLSL/HLSignatureLower.cpp", |
| 1537 | "$dawn_dxc_dir/lib/HLSL/HLUtil.cpp", |
| 1538 | "$dawn_dxc_dir/lib/HLSL/PauseResumePasses.cpp", |
| 1539 | "$dawn_dxc_dir/lib/HLSL/WaveSensitivityAnalysis.cpp", |
| 1540 | ] |
| 1541 | } |
| 1542 | |
| 1543 | dxcompiler_sourceset("lib_irreader") { |
| 1544 | target_type = "static_library" # Ensure unused globals are stripped |
| 1545 | sources = [ "$dawn_dxc_dir/lib/IRReader/IRReader.cpp" ] |
| 1546 | } |
| 1547 | dxcompiler_sourceset("lib_linker") { |
| 1548 | target_type = "static_library" # Ensure unused globals are stripped |
| 1549 | sources = [ "$dawn_dxc_dir/lib/Linker/LinkModules.cpp" ] |
| 1550 | } |
| 1551 | dxcompiler_sourceset("lib_mc") { |
| 1552 | target_type = "static_library" # Ensure unused globals are stripped |
| 1553 | sources = [ |
| 1554 | "$dawn_dxc_dir/lib/MC/ConstantPools.cpp", |
| 1555 | "$dawn_dxc_dir/lib/MC/ELFObjectWriter.cpp", |
| 1556 | "$dawn_dxc_dir/lib/MC/MCAsmBackend.cpp", |
| 1557 | "$dawn_dxc_dir/lib/MC/MCAsmInfo.cpp", |
| 1558 | "$dawn_dxc_dir/lib/MC/MCAsmInfoCOFF.cpp", |
| 1559 | "$dawn_dxc_dir/lib/MC/MCAsmInfoDarwin.cpp", |
| 1560 | "$dawn_dxc_dir/lib/MC/MCAsmInfoELF.cpp", |
| 1561 | "$dawn_dxc_dir/lib/MC/MCAsmStreamer.cpp", |
| 1562 | "$dawn_dxc_dir/lib/MC/MCAssembler.cpp", |
| 1563 | "$dawn_dxc_dir/lib/MC/MCCodeEmitter.cpp", |
| 1564 | "$dawn_dxc_dir/lib/MC/MCCodeGenInfo.cpp", |
| 1565 | "$dawn_dxc_dir/lib/MC/MCContext.cpp", |
| 1566 | "$dawn_dxc_dir/lib/MC/MCDwarf.cpp", |
| 1567 | "$dawn_dxc_dir/lib/MC/MCELFObjectTargetWriter.cpp", |
| 1568 | "$dawn_dxc_dir/lib/MC/MCELFStreamer.cpp", |
| 1569 | "$dawn_dxc_dir/lib/MC/MCExpr.cpp", |
| 1570 | "$dawn_dxc_dir/lib/MC/MCInst.cpp", |
| 1571 | "$dawn_dxc_dir/lib/MC/MCInstPrinter.cpp", |
| 1572 | "$dawn_dxc_dir/lib/MC/MCInstrAnalysis.cpp", |
| 1573 | "$dawn_dxc_dir/lib/MC/MCInstrDesc.cpp", |
| 1574 | "$dawn_dxc_dir/lib/MC/MCLabel.cpp", |
| 1575 | "$dawn_dxc_dir/lib/MC/MCLinkerOptimizationHint.cpp", |
| 1576 | "$dawn_dxc_dir/lib/MC/MCMachOStreamer.cpp", |
| 1577 | "$dawn_dxc_dir/lib/MC/MCMachObjectTargetWriter.cpp", |
| 1578 | "$dawn_dxc_dir/lib/MC/MCNullStreamer.cpp", |
| 1579 | "$dawn_dxc_dir/lib/MC/MCObjectFileInfo.cpp", |
| 1580 | "$dawn_dxc_dir/lib/MC/MCObjectStreamer.cpp", |
| 1581 | "$dawn_dxc_dir/lib/MC/MCObjectWriter.cpp", |
| 1582 | "$dawn_dxc_dir/lib/MC/MCRegisterInfo.cpp", |
| 1583 | "$dawn_dxc_dir/lib/MC/MCSchedule.cpp", |
| 1584 | "$dawn_dxc_dir/lib/MC/MCSection.cpp", |
| 1585 | "$dawn_dxc_dir/lib/MC/MCSectionCOFF.cpp", |
| 1586 | "$dawn_dxc_dir/lib/MC/MCSectionELF.cpp", |
| 1587 | "$dawn_dxc_dir/lib/MC/MCSectionMachO.cpp", |
| 1588 | "$dawn_dxc_dir/lib/MC/MCStreamer.cpp", |
| 1589 | "$dawn_dxc_dir/lib/MC/MCSubtargetInfo.cpp", |
| 1590 | "$dawn_dxc_dir/lib/MC/MCSymbol.cpp", |
| 1591 | "$dawn_dxc_dir/lib/MC/MCSymbolELF.cpp", |
| 1592 | "$dawn_dxc_dir/lib/MC/MCSymbolizer.cpp", |
| 1593 | "$dawn_dxc_dir/lib/MC/MCTargetOptions.cpp", |
| 1594 | "$dawn_dxc_dir/lib/MC/MCValue.cpp", |
| 1595 | "$dawn_dxc_dir/lib/MC/MCWin64EH.cpp", |
| 1596 | "$dawn_dxc_dir/lib/MC/MCWinEH.cpp", |
| 1597 | "$dawn_dxc_dir/lib/MC/MachObjectWriter.cpp", |
| 1598 | "$dawn_dxc_dir/lib/MC/StringTableBuilder.cpp", |
| 1599 | "$dawn_dxc_dir/lib/MC/SubtargetFeature.cpp", |
| 1600 | "$dawn_dxc_dir/lib/MC/WinCOFFObjectWriter.cpp", |
| 1601 | "$dawn_dxc_dir/lib/MC/WinCOFFStreamer.cpp", |
| 1602 | "$dawn_dxc_dir/lib/MC/YAML.cpp", |
| 1603 | ] |
| 1604 | } |
| 1605 | dxcompiler_sourceset("lib_object") { |
| 1606 | target_type = "static_library" # Ensure unused globals are stripped |
| 1607 | sources = [ |
| 1608 | "$dawn_dxc_dir/lib/Object/Archive.cpp", |
| 1609 | "$dawn_dxc_dir/lib/Object/ArchiveWriter.cpp", |
| 1610 | "$dawn_dxc_dir/lib/Object/Binary.cpp", |
| 1611 | "$dawn_dxc_dir/lib/Object/COFFObjectFile.cpp", |
| 1612 | "$dawn_dxc_dir/lib/Object/COFFYAML.cpp", |
| 1613 | "$dawn_dxc_dir/lib/Object/ELF.cpp", |
| 1614 | "$dawn_dxc_dir/lib/Object/ELFObjectFile.cpp", |
| 1615 | "$dawn_dxc_dir/lib/Object/ELFYAML.cpp", |
| 1616 | "$dawn_dxc_dir/lib/Object/Error.cpp", |
| 1617 | "$dawn_dxc_dir/lib/Object/IRObjectFile.cpp", |
| 1618 | "$dawn_dxc_dir/lib/Object/MachOObjectFile.cpp", |
| 1619 | "$dawn_dxc_dir/lib/Object/MachOUniversal.cpp", |
| 1620 | "$dawn_dxc_dir/lib/Object/Object.cpp", |
| 1621 | "$dawn_dxc_dir/lib/Object/ObjectFile.cpp", |
| 1622 | "$dawn_dxc_dir/lib/Object/RecordStreamer.cpp", |
| 1623 | "$dawn_dxc_dir/lib/Object/SymbolSize.cpp", |
| 1624 | "$dawn_dxc_dir/lib/Object/SymbolicFile.cpp", |
| 1625 | ] |
| 1626 | } |
| 1627 | dxcompiler_sourceset("lib_passprinters") { |
| 1628 | target_type = "static_library" # Ensure unused globals are stripped |
| 1629 | sources = [ "$dawn_dxc_dir/lib/PassPrinters/PassPrinters.cpp" ] |
| 1630 | } |
| 1631 | dxcompiler_sourceset("lib_profiledata") { |
| 1632 | target_type = "static_library" # Ensure unused globals are stripped |
| 1633 | sources = [ |
| 1634 | "$dawn_dxc_dir/lib/ProfileData/CoverageMapping.cpp", |
| 1635 | "$dawn_dxc_dir/lib/ProfileData/CoverageMappingReader.cpp", |
| 1636 | "$dawn_dxc_dir/lib/ProfileData/CoverageMappingWriter.cpp", |
| 1637 | "$dawn_dxc_dir/lib/ProfileData/InstrProf.cpp", |
| 1638 | "$dawn_dxc_dir/lib/ProfileData/InstrProfReader.cpp", |
| 1639 | "$dawn_dxc_dir/lib/ProfileData/InstrProfWriter.cpp", |
| 1640 | "$dawn_dxc_dir/lib/ProfileData/SampleProf.cpp", |
| 1641 | "$dawn_dxc_dir/lib/ProfileData/SampleProfReader.cpp", |
| 1642 | "$dawn_dxc_dir/lib/ProfileData/SampleProfWriter.cpp", |
| 1643 | ] |
| 1644 | } |
| 1645 | dxcompiler_sourceset("lib_target") { |
| 1646 | target_type = "static_library" # Ensure unused globals are stripped |
| 1647 | sources = [ |
| 1648 | "$dawn_dxc_dir/lib/Target/Target.cpp", |
| 1649 | "$dawn_dxc_dir/lib/Target/TargetIntrinsicInfo.cpp", |
| 1650 | "$dawn_dxc_dir/lib/Target/TargetLoweringObjectFile.cpp", |
| 1651 | "$dawn_dxc_dir/lib/Target/TargetMachine.cpp", |
| 1652 | "$dawn_dxc_dir/lib/Target/TargetMachineC.cpp", |
| 1653 | "$dawn_dxc_dir/lib/Target/TargetRecip.cpp", |
| 1654 | "$dawn_dxc_dir/lib/Target/TargetSubtargetInfo.cpp", |
| 1655 | ] |
| 1656 | } |
| 1657 | dxcompiler_sourceset("lib_transforms") { |
| 1658 | target_type = "static_library" # Ensure unused globals are stripped |
| 1659 | sources = [ |
| 1660 | "$dawn_dxc_dir/lib/Transforms/IPO/BarrierNoopPass.cpp", |
| 1661 | "$dawn_dxc_dir/lib/Transforms/IPO/ConstantMerge.cpp", |
| 1662 | "$dawn_dxc_dir/lib/Transforms/IPO/DeadArgumentElimination.cpp", |
| 1663 | "$dawn_dxc_dir/lib/Transforms/IPO/ElimAvailExtern.cpp", |
| 1664 | "$dawn_dxc_dir/lib/Transforms/IPO/ExtractGV.cpp", |
| 1665 | "$dawn_dxc_dir/lib/Transforms/IPO/FunctionAttrs.cpp", |
| 1666 | "$dawn_dxc_dir/lib/Transforms/IPO/GlobalDCE.cpp", |
| 1667 | "$dawn_dxc_dir/lib/Transforms/IPO/GlobalOpt.cpp", |
| 1668 | "$dawn_dxc_dir/lib/Transforms/IPO/IPConstantPropagation.cpp", |
| 1669 | "$dawn_dxc_dir/lib/Transforms/IPO/IPO.cpp", |
| 1670 | "$dawn_dxc_dir/lib/Transforms/IPO/InlineAlways.cpp", |
| 1671 | "$dawn_dxc_dir/lib/Transforms/IPO/InlineSimple.cpp", |
| 1672 | "$dawn_dxc_dir/lib/Transforms/IPO/Inliner.cpp", |
| 1673 | "$dawn_dxc_dir/lib/Transforms/IPO/Internalize.cpp", |
| 1674 | "$dawn_dxc_dir/lib/Transforms/IPO/LoopExtractor.cpp", |
| 1675 | "$dawn_dxc_dir/lib/Transforms/IPO/LowerBitSets.cpp", |
| 1676 | "$dawn_dxc_dir/lib/Transforms/IPO/MergeFunctions.cpp", |
| 1677 | "$dawn_dxc_dir/lib/Transforms/IPO/PartialInlining.cpp", |
| 1678 | "$dawn_dxc_dir/lib/Transforms/IPO/PassManagerBuilder.cpp", |
| 1679 | "$dawn_dxc_dir/lib/Transforms/IPO/PruneEH.cpp", |
| 1680 | "$dawn_dxc_dir/lib/Transforms/IPO/StripDeadPrototypes.cpp", |
| 1681 | "$dawn_dxc_dir/lib/Transforms/IPO/StripSymbols.cpp", |
| 1682 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineAddSub.cpp", |
| 1683 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp", |
| 1684 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineCalls.cpp", |
| 1685 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineCasts.cpp", |
| 1686 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineCompares.cpp", |
| 1687 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp", |
| 1688 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp", |
| 1689 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombinePHI.cpp", |
| 1690 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineSelect.cpp", |
| 1691 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineShifts.cpp", |
| 1692 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp", |
| 1693 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstCombineVectorOps.cpp", |
| 1694 | "$dawn_dxc_dir/lib/Transforms/InstCombine/InstructionCombining.cpp", |
| 1695 | "$dawn_dxc_dir/lib/Transforms/Scalar/ADCE.cpp", |
| 1696 | "$dawn_dxc_dir/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp", |
| 1697 | "$dawn_dxc_dir/lib/Transforms/Scalar/BDCE.cpp", |
| 1698 | "$dawn_dxc_dir/lib/Transforms/Scalar/ConstantHoisting.cpp", |
| 1699 | "$dawn_dxc_dir/lib/Transforms/Scalar/ConstantProp.cpp", |
| 1700 | "$dawn_dxc_dir/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp", |
| 1701 | "$dawn_dxc_dir/lib/Transforms/Scalar/DCE.cpp", |
| 1702 | "$dawn_dxc_dir/lib/Transforms/Scalar/DeadStoreElimination.cpp", |
| 1703 | "$dawn_dxc_dir/lib/Transforms/Scalar/DxilConditionalMem2Reg.cpp", |
| 1704 | "$dawn_dxc_dir/lib/Transforms/Scalar/DxilEliminateVector.cpp", |
| 1705 | "$dawn_dxc_dir/lib/Transforms/Scalar/DxilEraseDeadRegion.cpp", |
| 1706 | "$dawn_dxc_dir/lib/Transforms/Scalar/DxilFixConstArrayInitializer.cpp", |
| 1707 | "$dawn_dxc_dir/lib/Transforms/Scalar/DxilLoopUnroll.cpp", |
| 1708 | "$dawn_dxc_dir/lib/Transforms/Scalar/DxilRemoveDeadBlocks.cpp", |
| 1709 | "$dawn_dxc_dir/lib/Transforms/Scalar/DxilRemoveUnstructuredLoopExits.cpp", |
| 1710 | "$dawn_dxc_dir/lib/Transforms/Scalar/EarlyCSE.cpp", |
| 1711 | "$dawn_dxc_dir/lib/Transforms/Scalar/FlattenCFGPass.cpp", |
| 1712 | "$dawn_dxc_dir/lib/Transforms/Scalar/Float2Int.cpp", |
| 1713 | "$dawn_dxc_dir/lib/Transforms/Scalar/GVN.cpp", |
| 1714 | "$dawn_dxc_dir/lib/Transforms/Scalar/HoistConstantArray.cpp", |
| 1715 | "$dawn_dxc_dir/lib/Transforms/Scalar/IndVarSimplify.cpp", |
| 1716 | "$dawn_dxc_dir/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp", |
| 1717 | "$dawn_dxc_dir/lib/Transforms/Scalar/JumpThreading.cpp", |
| 1718 | "$dawn_dxc_dir/lib/Transforms/Scalar/LICM.cpp", |
| 1719 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoadCombine.cpp", |
| 1720 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoopDeletion.cpp", |
| 1721 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoopDistribute.cpp", |
| 1722 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoopIdiomRecognize.cpp", |
| 1723 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoopInstSimplify.cpp", |
| 1724 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoopInterchange.cpp", |
| 1725 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoopRerollPass.cpp", |
| 1726 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoopRotation.cpp", |
| 1727 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoopStrengthReduce.cpp", |
| 1728 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoopUnrollPass.cpp", |
| 1729 | "$dawn_dxc_dir/lib/Transforms/Scalar/LoopUnswitch.cpp", |
| 1730 | "$dawn_dxc_dir/lib/Transforms/Scalar/LowerAtomic.cpp", |
| 1731 | "$dawn_dxc_dir/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp", |
| 1732 | "$dawn_dxc_dir/lib/Transforms/Scalar/LowerTypePasses.cpp", |
| 1733 | "$dawn_dxc_dir/lib/Transforms/Scalar/MemCpyOptimizer.cpp", |
| 1734 | "$dawn_dxc_dir/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp", |
| 1735 | "$dawn_dxc_dir/lib/Transforms/Scalar/NaryReassociate.cpp", |
| 1736 | "$dawn_dxc_dir/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp", |
| 1737 | "$dawn_dxc_dir/lib/Transforms/Scalar/PlaceSafepoints.cpp", |
| 1738 | "$dawn_dxc_dir/lib/Transforms/Scalar/Reassociate.cpp", |
| 1739 | "$dawn_dxc_dir/lib/Transforms/Scalar/Reg2Mem.cpp", |
| 1740 | "$dawn_dxc_dir/lib/Transforms/Scalar/Reg2MemHLSL.cpp", |
| 1741 | "$dawn_dxc_dir/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp", |
| 1742 | "$dawn_dxc_dir/lib/Transforms/Scalar/SCCP.cpp", |
| 1743 | "$dawn_dxc_dir/lib/Transforms/Scalar/SROA.cpp", |
| 1744 | "$dawn_dxc_dir/lib/Transforms/Scalar/SampleProfile.cpp", |
| 1745 | "$dawn_dxc_dir/lib/Transforms/Scalar/Scalar.cpp", |
| 1746 | "$dawn_dxc_dir/lib/Transforms/Scalar/ScalarReplAggregates.cpp", |
| 1747 | "$dawn_dxc_dir/lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp", |
| 1748 | "$dawn_dxc_dir/lib/Transforms/Scalar/Scalarizer.cpp", |
| 1749 | "$dawn_dxc_dir/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp", |
| 1750 | "$dawn_dxc_dir/lib/Transforms/Scalar/SimplifyCFGPass.cpp", |
| 1751 | "$dawn_dxc_dir/lib/Transforms/Scalar/Sink.cpp", |
| 1752 | "$dawn_dxc_dir/lib/Transforms/Scalar/SpeculativeExecution.cpp", |
| 1753 | "$dawn_dxc_dir/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp", |
| 1754 | "$dawn_dxc_dir/lib/Transforms/Scalar/StructurizeCFG.cpp", |
| 1755 | "$dawn_dxc_dir/lib/Transforms/Scalar/TailRecursionElimination.cpp", |
| 1756 | "$dawn_dxc_dir/lib/Transforms/Utils/ASanStackFrameLayout.cpp", |
| 1757 | "$dawn_dxc_dir/lib/Transforms/Utils/AddDiscriminators.cpp", |
| 1758 | "$dawn_dxc_dir/lib/Transforms/Utils/BasicBlockUtils.cpp", |
| 1759 | "$dawn_dxc_dir/lib/Transforms/Utils/BreakCriticalEdges.cpp", |
| 1760 | "$dawn_dxc_dir/lib/Transforms/Utils/BuildLibCalls.cpp", |
| 1761 | "$dawn_dxc_dir/lib/Transforms/Utils/BypassSlowDivision.cpp", |
| 1762 | "$dawn_dxc_dir/lib/Transforms/Utils/CloneFunction.cpp", |
| 1763 | "$dawn_dxc_dir/lib/Transforms/Utils/CloneModule.cpp", |
| 1764 | "$dawn_dxc_dir/lib/Transforms/Utils/CmpInstAnalysis.cpp", |
| 1765 | "$dawn_dxc_dir/lib/Transforms/Utils/CodeExtractor.cpp", |
| 1766 | "$dawn_dxc_dir/lib/Transforms/Utils/CtorUtils.cpp", |
| 1767 | "$dawn_dxc_dir/lib/Transforms/Utils/DemoteRegToStack.cpp", |
| 1768 | "$dawn_dxc_dir/lib/Transforms/Utils/FlattenCFG.cpp", |
| 1769 | "$dawn_dxc_dir/lib/Transforms/Utils/GlobalStatus.cpp", |
| 1770 | "$dawn_dxc_dir/lib/Transforms/Utils/InlineFunction.cpp", |
| 1771 | "$dawn_dxc_dir/lib/Transforms/Utils/InstructionNamer.cpp", |
| 1772 | "$dawn_dxc_dir/lib/Transforms/Utils/IntegerDivision.cpp", |
| 1773 | "$dawn_dxc_dir/lib/Transforms/Utils/LCSSA.cpp", |
| 1774 | "$dawn_dxc_dir/lib/Transforms/Utils/Local.cpp", |
| 1775 | "$dawn_dxc_dir/lib/Transforms/Utils/LoopSimplify.cpp", |
| 1776 | "$dawn_dxc_dir/lib/Transforms/Utils/LoopSimplifyId.cpp", |
| 1777 | "$dawn_dxc_dir/lib/Transforms/Utils/LoopUnroll.cpp", |
| 1778 | "$dawn_dxc_dir/lib/Transforms/Utils/LoopUnrollRuntime.cpp", |
| 1779 | "$dawn_dxc_dir/lib/Transforms/Utils/LoopUtils.cpp", |
| 1780 | "$dawn_dxc_dir/lib/Transforms/Utils/LoopVersioning.cpp", |
| 1781 | "$dawn_dxc_dir/lib/Transforms/Utils/LowerInvoke.cpp", |
| 1782 | "$dawn_dxc_dir/lib/Transforms/Utils/LowerSwitch.cpp", |
| 1783 | "$dawn_dxc_dir/lib/Transforms/Utils/Mem2Reg.cpp", |
| 1784 | "$dawn_dxc_dir/lib/Transforms/Utils/MetaRenamer.cpp", |
| 1785 | "$dawn_dxc_dir/lib/Transforms/Utils/ModuleUtils.cpp", |
| 1786 | "$dawn_dxc_dir/lib/Transforms/Utils/PromoteMemoryToRegister.cpp", |
| 1787 | "$dawn_dxc_dir/lib/Transforms/Utils/SSAUpdater.cpp", |
| 1788 | "$dawn_dxc_dir/lib/Transforms/Utils/SimplifyCFG.cpp", |
| 1789 | "$dawn_dxc_dir/lib/Transforms/Utils/SimplifyIndVar.cpp", |
| 1790 | "$dawn_dxc_dir/lib/Transforms/Utils/SimplifyInstructions.cpp", |
| 1791 | "$dawn_dxc_dir/lib/Transforms/Utils/SimplifyLibCalls.cpp", |
| 1792 | "$dawn_dxc_dir/lib/Transforms/Utils/SymbolRewriter.cpp", |
| 1793 | "$dawn_dxc_dir/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp", |
| 1794 | "$dawn_dxc_dir/lib/Transforms/Utils/Utils.cpp", |
| 1795 | "$dawn_dxc_dir/lib/Transforms/Utils/ValueMapper.cpp", |
| 1796 | ] |
| 1797 | } |
| 1798 | dxcompiler_sourceset("lib_astmatchers") { |
| 1799 | target_type = "static_library" # Ensure unused globals are stripped |
| 1800 | sources = [ |
| 1801 | "$dawn_dxc_dir/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp", |
| 1802 | "$dawn_dxc_dir/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp", |
| 1803 | ] |
| 1804 | } |
| 1805 | dxcompiler_sourceset("clang_lib_ast") { |
| 1806 | target_type = "static_library" # Ensure unused globals are stripped |
| 1807 | sources = [ |
| 1808 | "$dawn_dxc_dir/tools/clang/lib/AST/APValue.cpp", |
| 1809 | "$dawn_dxc_dir/tools/clang/lib/AST/ASTConsumer.cpp", |
| 1810 | "$dawn_dxc_dir/tools/clang/lib/AST/ASTContext.cpp", |
| 1811 | "$dawn_dxc_dir/tools/clang/lib/AST/ASTContextHLSL.cpp", |
| 1812 | "$dawn_dxc_dir/tools/clang/lib/AST/ASTDiagnostic.cpp", |
| 1813 | "$dawn_dxc_dir/tools/clang/lib/AST/ASTDumper.cpp", |
| 1814 | "$dawn_dxc_dir/tools/clang/lib/AST/ASTImporter.cpp", |
| 1815 | "$dawn_dxc_dir/tools/clang/lib/AST/ASTTypeTraits.cpp", |
| 1816 | "$dawn_dxc_dir/tools/clang/lib/AST/AttrImpl.cpp", |
| 1817 | "$dawn_dxc_dir/tools/clang/lib/AST/CXXInheritance.cpp", |
| 1818 | "$dawn_dxc_dir/tools/clang/lib/AST/Comment.cpp", |
| 1819 | "$dawn_dxc_dir/tools/clang/lib/AST/CommentBriefParser.cpp", |
| 1820 | "$dawn_dxc_dir/tools/clang/lib/AST/CommentCommandTraits.cpp", |
| 1821 | "$dawn_dxc_dir/tools/clang/lib/AST/CommentLexer.cpp", |
| 1822 | "$dawn_dxc_dir/tools/clang/lib/AST/CommentParser.cpp", |
| 1823 | "$dawn_dxc_dir/tools/clang/lib/AST/CommentSema.cpp", |
| 1824 | "$dawn_dxc_dir/tools/clang/lib/AST/Decl.cpp", |
| 1825 | "$dawn_dxc_dir/tools/clang/lib/AST/DeclBase.cpp", |
| 1826 | "$dawn_dxc_dir/tools/clang/lib/AST/DeclCXX.cpp", |
| 1827 | "$dawn_dxc_dir/tools/clang/lib/AST/DeclFriend.cpp", |
| 1828 | "$dawn_dxc_dir/tools/clang/lib/AST/DeclGroup.cpp", |
| 1829 | "$dawn_dxc_dir/tools/clang/lib/AST/DeclObjC.cpp", |
| 1830 | "$dawn_dxc_dir/tools/clang/lib/AST/DeclOpenMP.cpp", |
| 1831 | "$dawn_dxc_dir/tools/clang/lib/AST/DeclPrinter.cpp", |
| 1832 | "$dawn_dxc_dir/tools/clang/lib/AST/DeclTemplate.cpp", |
| 1833 | "$dawn_dxc_dir/tools/clang/lib/AST/DeclarationName.cpp", |
| 1834 | "$dawn_dxc_dir/tools/clang/lib/AST/Expr.cpp", |
| 1835 | "$dawn_dxc_dir/tools/clang/lib/AST/ExprCXX.cpp", |
| 1836 | "$dawn_dxc_dir/tools/clang/lib/AST/ExprClassification.cpp", |
| 1837 | "$dawn_dxc_dir/tools/clang/lib/AST/ExprConstant.cpp", |
| 1838 | "$dawn_dxc_dir/tools/clang/lib/AST/ExternalASTSource.cpp", |
| 1839 | "$dawn_dxc_dir/tools/clang/lib/AST/HlslBuiltinTypeDeclBuilder.cpp", |
| 1840 | "$dawn_dxc_dir/tools/clang/lib/AST/HlslTypes.cpp", |
| 1841 | "$dawn_dxc_dir/tools/clang/lib/AST/InheritViz.cpp", |
| 1842 | "$dawn_dxc_dir/tools/clang/lib/AST/ItaniumCXXABI.cpp", |
| 1843 | "$dawn_dxc_dir/tools/clang/lib/AST/ItaniumMangle.cpp", |
| 1844 | "$dawn_dxc_dir/tools/clang/lib/AST/Mangle.cpp", |
| 1845 | "$dawn_dxc_dir/tools/clang/lib/AST/MicrosoftCXXABI.cpp", |
| 1846 | "$dawn_dxc_dir/tools/clang/lib/AST/MicrosoftMangle.cpp", |
| 1847 | "$dawn_dxc_dir/tools/clang/lib/AST/NestedNameSpecifier.cpp", |
| 1848 | "$dawn_dxc_dir/tools/clang/lib/AST/ParentMap.cpp", |
| 1849 | "$dawn_dxc_dir/tools/clang/lib/AST/RawCommentList.cpp", |
| 1850 | "$dawn_dxc_dir/tools/clang/lib/AST/RecordLayout.cpp", |
| 1851 | "$dawn_dxc_dir/tools/clang/lib/AST/RecordLayoutBuilder.cpp", |
| 1852 | "$dawn_dxc_dir/tools/clang/lib/AST/SelectorLocationsKind.cpp", |
| 1853 | "$dawn_dxc_dir/tools/clang/lib/AST/Stmt.cpp", |
| 1854 | "$dawn_dxc_dir/tools/clang/lib/AST/StmtIterator.cpp", |
| 1855 | "$dawn_dxc_dir/tools/clang/lib/AST/StmtPrinter.cpp", |
| 1856 | "$dawn_dxc_dir/tools/clang/lib/AST/StmtProfile.cpp", |
| 1857 | "$dawn_dxc_dir/tools/clang/lib/AST/StmtViz.cpp", |
| 1858 | "$dawn_dxc_dir/tools/clang/lib/AST/TemplateBase.cpp", |
| 1859 | "$dawn_dxc_dir/tools/clang/lib/AST/TemplateName.cpp", |
| 1860 | "$dawn_dxc_dir/tools/clang/lib/AST/Type.cpp", |
| 1861 | "$dawn_dxc_dir/tools/clang/lib/AST/TypeLoc.cpp", |
| 1862 | "$dawn_dxc_dir/tools/clang/lib/AST/TypePrinter.cpp", |
| 1863 | "$dawn_dxc_dir/tools/clang/lib/AST/VTTBuilder.cpp", |
| 1864 | "$dawn_dxc_dir/tools/clang/lib/AST/VTableBuilder.cpp", |
| 1865 | ] |
| 1866 | } |
| 1867 | dxcompiler_sourceset("clang_lib_analysis") { |
| 1868 | target_type = "static_library" # Ensure unused globals are stripped |
| 1869 | sources = [ |
| 1870 | "$dawn_dxc_dir/tools/clang/lib/Analysis/AnalysisDeclContext.cpp", |
| 1871 | "$dawn_dxc_dir/tools/clang/lib/Analysis/BodyFarm.cpp", |
| 1872 | "$dawn_dxc_dir/tools/clang/lib/Analysis/CFG.cpp", |
| 1873 | "$dawn_dxc_dir/tools/clang/lib/Analysis/CFGReachabilityAnalysis.cpp", |
| 1874 | "$dawn_dxc_dir/tools/clang/lib/Analysis/CFGStmtMap.cpp", |
| 1875 | "$dawn_dxc_dir/tools/clang/lib/Analysis/CallGraph.cpp", |
| 1876 | "$dawn_dxc_dir/tools/clang/lib/Analysis/CodeInjector.cpp", |
| 1877 | "$dawn_dxc_dir/tools/clang/lib/Analysis/Consumed.cpp", |
| 1878 | "$dawn_dxc_dir/tools/clang/lib/Analysis/Dominators.cpp", |
| 1879 | "$dawn_dxc_dir/tools/clang/lib/Analysis/LiveVariables.cpp", |
| 1880 | "$dawn_dxc_dir/tools/clang/lib/Analysis/ObjCNoReturn.cpp", |
| 1881 | "$dawn_dxc_dir/tools/clang/lib/Analysis/PostOrderCFGView.cpp", |
| 1882 | "$dawn_dxc_dir/tools/clang/lib/Analysis/ProgramPoint.cpp", |
| 1883 | "$dawn_dxc_dir/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp", |
| 1884 | "$dawn_dxc_dir/tools/clang/lib/Analysis/ReachableCode.cpp", |
| 1885 | "$dawn_dxc_dir/tools/clang/lib/Analysis/ThreadSafety.cpp", |
| 1886 | "$dawn_dxc_dir/tools/clang/lib/Analysis/ThreadSafetyCommon.cpp", |
| 1887 | "$dawn_dxc_dir/tools/clang/lib/Analysis/ThreadSafetyLogical.cpp", |
| 1888 | "$dawn_dxc_dir/tools/clang/lib/Analysis/ThreadSafetyTIL.cpp", |
| 1889 | "$dawn_dxc_dir/tools/clang/lib/Analysis/UninitializedValues.cpp", |
| 1890 | ] |
| 1891 | } |
| 1892 | dxcompiler_sourceset("clang_lib_basic") { |
| 1893 | target_type = "static_library" # Ensure unused globals are stripped |
| 1894 | sources = [ |
| 1895 | "$dawn_dxc_dir/tools/clang/lib/Basic/Attributes.cpp", |
| 1896 | "$dawn_dxc_dir/tools/clang/lib/Basic/Builtins.cpp", |
| 1897 | "$dawn_dxc_dir/tools/clang/lib/Basic/CharInfo.cpp", |
| 1898 | "$dawn_dxc_dir/tools/clang/lib/Basic/Diagnostic.cpp", |
| 1899 | "$dawn_dxc_dir/tools/clang/lib/Basic/DiagnosticIDs.cpp", |
| 1900 | "$dawn_dxc_dir/tools/clang/lib/Basic/DiagnosticOptions.cpp", |
| 1901 | "$dawn_dxc_dir/tools/clang/lib/Basic/FileManager.cpp", |
| 1902 | "$dawn_dxc_dir/tools/clang/lib/Basic/FileSystemStatCache.cpp", |
| 1903 | "$dawn_dxc_dir/tools/clang/lib/Basic/IdentifierTable.cpp", |
| 1904 | "$dawn_dxc_dir/tools/clang/lib/Basic/LangOptions.cpp", |
| 1905 | "$dawn_dxc_dir/tools/clang/lib/Basic/Module.cpp", |
| 1906 | "$dawn_dxc_dir/tools/clang/lib/Basic/ObjCRuntime.cpp", |
| 1907 | "$dawn_dxc_dir/tools/clang/lib/Basic/OpenMPKinds.cpp", |
| 1908 | "$dawn_dxc_dir/tools/clang/lib/Basic/OperatorPrecedence.cpp", |
| 1909 | "$dawn_dxc_dir/tools/clang/lib/Basic/SanitizerBlacklist.cpp", |
| 1910 | "$dawn_dxc_dir/tools/clang/lib/Basic/Sanitizers.cpp", |
| 1911 | "$dawn_dxc_dir/tools/clang/lib/Basic/SourceLocation.cpp", |
| 1912 | "$dawn_dxc_dir/tools/clang/lib/Basic/SourceManager.cpp", |
| 1913 | "$dawn_dxc_dir/tools/clang/lib/Basic/TargetInfo.cpp", |
| 1914 | "$dawn_dxc_dir/tools/clang/lib/Basic/Targets.cpp", |
| 1915 | "$dawn_dxc_dir/tools/clang/lib/Basic/TokenKinds.cpp", |
| 1916 | "$dawn_dxc_dir/tools/clang/lib/Basic/Version.cpp", |
| 1917 | "$dawn_dxc_dir/tools/clang/lib/Basic/VersionTuple.cpp", |
| 1918 | "$dawn_dxc_dir/tools/clang/lib/Basic/VirtualFileSystem.cpp", |
| 1919 | "$dawn_dxc_dir/tools/clang/lib/Basic/Warnings.cpp", |
| 1920 | ] |
| 1921 | } |
| 1922 | dxcompiler_sourceset("clang_lib_codegen") { |
| 1923 | target_type = "static_library" # Ensure unused globals are stripped |
| 1924 | sources = [ |
| 1925 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/BackendUtil.cpp", |
| 1926 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGAtomic.cpp", |
| 1927 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGBlocks.cpp", |
| 1928 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGBuiltin.cpp", |
| 1929 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGCUDANV.cpp", |
| 1930 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGCUDARuntime.cpp", |
| 1931 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGCXX.cpp", |
| 1932 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGCXXABI.cpp", |
| 1933 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGCall.cpp", |
| 1934 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGClass.cpp", |
| 1935 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGCleanup.cpp", |
| 1936 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGDebugInfo.cpp", |
| 1937 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGDecl.cpp", |
| 1938 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGDeclCXX.cpp", |
| 1939 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGException.cpp", |
| 1940 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGExpr.cpp", |
| 1941 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGExprAgg.cpp", |
| 1942 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGExprCXX.cpp", |
| 1943 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGExprComplex.cpp", |
| 1944 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGExprConstant.cpp", |
| 1945 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGExprScalar.cpp", |
| 1946 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGHLSLMS.cpp", |
| 1947 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGHLSLMSFinishCodeGen.cpp", |
| 1948 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGHLSLRootSignature.cpp", |
| 1949 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGHLSLRuntime.cpp", |
| 1950 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGLoopInfo.cpp", |
| 1951 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGObjC.cpp", |
| 1952 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp", |
| 1953 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGStmt.cpp", |
| 1954 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp", |
| 1955 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGVTT.cpp", |
| 1956 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CGVTables.cpp", |
| 1957 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CodeGenABITypes.cpp", |
| 1958 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CodeGenAction.cpp", |
| 1959 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CodeGenFunction.cpp", |
| 1960 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CodeGenModule.cpp", |
| 1961 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CodeGenPGO.cpp", |
| 1962 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CodeGenTBAA.cpp", |
| 1963 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CodeGenTypes.cpp", |
| 1964 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/CoverageMappingGen.cpp", |
| 1965 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp", |
| 1966 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp", |
| 1967 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/ModuleBuilder.cpp", |
| 1968 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp", |
| 1969 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/SanitizerMetadata.cpp", |
| 1970 | "$dawn_dxc_dir/tools/clang/lib/CodeGen/TargetInfo.cpp", |
| 1971 | ] |
| 1972 | } |
| 1973 | dxcompiler_sourceset("clang_lib_driver") { |
| 1974 | target_type = "static_library" # Ensure unused globals are stripped |
| 1975 | sources = [ |
| 1976 | "$dawn_dxc_dir/tools/clang/lib/Driver/Action.cpp", |
| 1977 | "$dawn_dxc_dir/tools/clang/lib/Driver/Compilation.cpp", |
| 1978 | "$dawn_dxc_dir/tools/clang/lib/Driver/CrossWindowsToolChain.cpp", |
| 1979 | "$dawn_dxc_dir/tools/clang/lib/Driver/Driver.cpp", |
| 1980 | "$dawn_dxc_dir/tools/clang/lib/Driver/DriverOptions.cpp", |
| 1981 | "$dawn_dxc_dir/tools/clang/lib/Driver/Job.cpp", |
| 1982 | "$dawn_dxc_dir/tools/clang/lib/Driver/MSVCToolChain.cpp", |
| 1983 | "$dawn_dxc_dir/tools/clang/lib/Driver/MinGWToolChain.cpp", |
| 1984 | "$dawn_dxc_dir/tools/clang/lib/Driver/Multilib.cpp", |
| 1985 | "$dawn_dxc_dir/tools/clang/lib/Driver/Phases.cpp", |
| 1986 | "$dawn_dxc_dir/tools/clang/lib/Driver/SanitizerArgs.cpp", |
| 1987 | "$dawn_dxc_dir/tools/clang/lib/Driver/Tool.cpp", |
| 1988 | "$dawn_dxc_dir/tools/clang/lib/Driver/ToolChain.cpp", |
| 1989 | "$dawn_dxc_dir/tools/clang/lib/Driver/ToolChains.cpp", |
| 1990 | "$dawn_dxc_dir/tools/clang/lib/Driver/Tools.cpp", |
| 1991 | "$dawn_dxc_dir/tools/clang/lib/Driver/Types.cpp", |
| 1992 | ] |
| 1993 | } |
| 1994 | dxcompiler_sourceset("clang_lib_edit") { |
| 1995 | target_type = "static_library" # Ensure unused globals are stripped |
| 1996 | sources = [ |
| 1997 | "$dawn_dxc_dir/tools/clang/lib/Edit/Commit.cpp", |
| 1998 | "$dawn_dxc_dir/tools/clang/lib/Edit/EditedSource.cpp", |
| 1999 | ] |
| 2000 | } |
| 2001 | dxcompiler_sourceset("clang_lib_format") { |
| 2002 | target_type = "static_library" # Ensure unused globals are stripped |
| 2003 | sources = [ |
| 2004 | "$dawn_dxc_dir/tools/clang/lib/Format/BreakableToken.cpp", |
| 2005 | "$dawn_dxc_dir/tools/clang/lib/Format/ContinuationIndenter.cpp", |
| 2006 | "$dawn_dxc_dir/tools/clang/lib/Format/Format.cpp", |
| 2007 | "$dawn_dxc_dir/tools/clang/lib/Format/FormatToken.cpp", |
| 2008 | "$dawn_dxc_dir/tools/clang/lib/Format/TokenAnnotator.cpp", |
| 2009 | "$dawn_dxc_dir/tools/clang/lib/Format/UnwrappedLineFormatter.cpp", |
| 2010 | "$dawn_dxc_dir/tools/clang/lib/Format/UnwrappedLineParser.cpp", |
| 2011 | "$dawn_dxc_dir/tools/clang/lib/Format/WhitespaceManager.cpp", |
| 2012 | ] |
| 2013 | } |
| 2014 | dxcompiler_sourceset("clang_lib_frontend") { |
| 2015 | target_type = "static_library" # Ensure unused globals are stripped |
| 2016 | sources = [ |
| 2017 | "$dawn_dxc_dir/tools/clang/lib/Frontend/ASTConsumers.cpp", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 2018 | "$dawn_dxc_dir/tools/clang/lib/Frontend/ASTUnit.cpp", |
| 2019 | "$dawn_dxc_dir/tools/clang/lib/Frontend/CacheTokens.cpp", |
| 2020 | "$dawn_dxc_dir/tools/clang/lib/Frontend/ChainedDiagnosticConsumer.cpp", |
| 2021 | "$dawn_dxc_dir/tools/clang/lib/Frontend/CodeGenOptions.cpp", |
| 2022 | "$dawn_dxc_dir/tools/clang/lib/Frontend/CompilerInstance.cpp", |
| 2023 | "$dawn_dxc_dir/tools/clang/lib/Frontend/CompilerInvocation.cpp", |
| 2024 | "$dawn_dxc_dir/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp", |
| 2025 | "$dawn_dxc_dir/tools/clang/lib/Frontend/DependencyFile.cpp", |
| 2026 | "$dawn_dxc_dir/tools/clang/lib/Frontend/DependencyGraph.cpp", |
| 2027 | "$dawn_dxc_dir/tools/clang/lib/Frontend/DiagnosticRenderer.cpp", |
| 2028 | "$dawn_dxc_dir/tools/clang/lib/Frontend/FrontendAction.cpp", |
| 2029 | "$dawn_dxc_dir/tools/clang/lib/Frontend/FrontendActions.cpp", |
| 2030 | "$dawn_dxc_dir/tools/clang/lib/Frontend/FrontendOptions.cpp", |
| 2031 | "$dawn_dxc_dir/tools/clang/lib/Frontend/HeaderIncludeGen.cpp", |
| 2032 | "$dawn_dxc_dir/tools/clang/lib/Frontend/InitHeaderSearch.cpp", |
| 2033 | "$dawn_dxc_dir/tools/clang/lib/Frontend/InitPreprocessor.cpp", |
| 2034 | "$dawn_dxc_dir/tools/clang/lib/Frontend/LangStandards.cpp", |
| 2035 | "$dawn_dxc_dir/tools/clang/lib/Frontend/LayoutOverrideSource.cpp", |
| 2036 | "$dawn_dxc_dir/tools/clang/lib/Frontend/LogDiagnosticPrinter.cpp", |
| 2037 | "$dawn_dxc_dir/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp", |
| 2038 | "$dawn_dxc_dir/tools/clang/lib/Frontend/MultiplexConsumer.cpp", |
| 2039 | "$dawn_dxc_dir/tools/clang/lib/Frontend/PCHContainerOperations.cpp", |
| 2040 | "$dawn_dxc_dir/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp", |
| 2041 | "$dawn_dxc_dir/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp", |
| 2042 | "$dawn_dxc_dir/tools/clang/lib/Frontend/SerializedDiagnosticReader.cpp", |
| 2043 | "$dawn_dxc_dir/tools/clang/lib/Frontend/TextDiagnostic.cpp", |
| 2044 | "$dawn_dxc_dir/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp", |
| 2045 | "$dawn_dxc_dir/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp", |
| 2046 | "$dawn_dxc_dir/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp", |
| 2047 | ] |
| 2048 | } |
| 2049 | dxcompiler_sourceset("clang_lib_index") { |
| 2050 | target_type = "static_library" # Ensure unused globals are stripped |
| 2051 | sources = [ |
| 2052 | "$dawn_dxc_dir/tools/clang/lib/Index/CommentToXML.cpp", |
| 2053 | "$dawn_dxc_dir/tools/clang/lib/Index/USRGeneration.cpp", |
| 2054 | ] |
| 2055 | } |
| 2056 | dxcompiler_sourceset("clang_lib_lex") { |
| 2057 | target_type = "static_library" # Ensure unused globals are stripped |
| 2058 | sources = [ |
| 2059 | "$dawn_dxc_dir/tools/clang/lib/Lex/HLSLMacroExpander.cpp", |
| 2060 | "$dawn_dxc_dir/tools/clang/lib/Lex/HeaderMap.cpp", |
| 2061 | "$dawn_dxc_dir/tools/clang/lib/Lex/HeaderSearch.cpp", |
| 2062 | "$dawn_dxc_dir/tools/clang/lib/Lex/Lexer.cpp", |
| 2063 | "$dawn_dxc_dir/tools/clang/lib/Lex/LiteralSupport.cpp", |
| 2064 | "$dawn_dxc_dir/tools/clang/lib/Lex/MacroArgs.cpp", |
| 2065 | "$dawn_dxc_dir/tools/clang/lib/Lex/MacroInfo.cpp", |
| 2066 | "$dawn_dxc_dir/tools/clang/lib/Lex/ModuleMap.cpp", |
| 2067 | "$dawn_dxc_dir/tools/clang/lib/Lex/PPCaching.cpp", |
| 2068 | "$dawn_dxc_dir/tools/clang/lib/Lex/PPCallbacks.cpp", |
| 2069 | "$dawn_dxc_dir/tools/clang/lib/Lex/PPConditionalDirectiveRecord.cpp", |
| 2070 | "$dawn_dxc_dir/tools/clang/lib/Lex/PPDirectives.cpp", |
| 2071 | "$dawn_dxc_dir/tools/clang/lib/Lex/PPExpressions.cpp", |
| 2072 | "$dawn_dxc_dir/tools/clang/lib/Lex/PPLexerChange.cpp", |
| 2073 | "$dawn_dxc_dir/tools/clang/lib/Lex/PPMacroExpansion.cpp", |
| 2074 | "$dawn_dxc_dir/tools/clang/lib/Lex/PTHLexer.cpp", |
| 2075 | "$dawn_dxc_dir/tools/clang/lib/Lex/Pragma.cpp", |
| 2076 | "$dawn_dxc_dir/tools/clang/lib/Lex/PreprocessingRecord.cpp", |
| 2077 | "$dawn_dxc_dir/tools/clang/lib/Lex/Preprocessor.cpp", |
| 2078 | "$dawn_dxc_dir/tools/clang/lib/Lex/PreprocessorLexer.cpp", |
| 2079 | "$dawn_dxc_dir/tools/clang/lib/Lex/ScratchBuffer.cpp", |
| 2080 | "$dawn_dxc_dir/tools/clang/lib/Lex/TokenConcatenation.cpp", |
| 2081 | "$dawn_dxc_dir/tools/clang/lib/Lex/TokenLexer.cpp", |
| 2082 | ] |
| 2083 | } |
| 2084 | dxcompiler_sourceset("clang_lib_parse") { |
| 2085 | target_type = "static_library" # Ensure unused globals are stripped |
| 2086 | sources = [ |
| 2087 | "$dawn_dxc_dir/tools/clang/lib/Parse/HLSLRootSignature.cpp", |
| 2088 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseAST.cpp", |
| 2089 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp", |
| 2090 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseDecl.cpp", |
| 2091 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseDeclCXX.cpp", |
| 2092 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseExpr.cpp", |
| 2093 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseExprCXX.cpp", |
| 2094 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseHLSL.cpp", |
| 2095 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseInit.cpp", |
| 2096 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseObjc.cpp", |
| 2097 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseOpenMP.cpp", |
| 2098 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParsePragma.cpp", |
| 2099 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseStmt.cpp", |
| 2100 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseStmtAsm.cpp", |
| 2101 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseTemplate.cpp", |
| 2102 | "$dawn_dxc_dir/tools/clang/lib/Parse/ParseTentative.cpp", |
| 2103 | "$dawn_dxc_dir/tools/clang/lib/Parse/Parser.cpp", |
| 2104 | ] |
| 2105 | } |
| 2106 | dxcompiler_sourceset("clang_lib_rewrite") { |
| 2107 | target_type = "static_library" # Ensure unused globals are stripped |
| 2108 | sources = [ |
| 2109 | "$dawn_dxc_dir/tools/clang/lib/Rewrite/DeltaTree.cpp", |
| 2110 | "$dawn_dxc_dir/tools/clang/lib/Rewrite/HTMLRewrite.cpp", |
| 2111 | "$dawn_dxc_dir/tools/clang/lib/Rewrite/RewriteRope.cpp", |
| 2112 | "$dawn_dxc_dir/tools/clang/lib/Rewrite/Rewriter.cpp", |
| 2113 | "$dawn_dxc_dir/tools/clang/lib/Rewrite/TokenRewriter.cpp", |
| 2114 | ] |
| 2115 | } |
| 2116 | dxcompiler_sourceset("clang_lib_sema") { |
| 2117 | target_type = "static_library" # Ensure unused globals are stripped |
| 2118 | sources = [ |
| 2119 | "$dawn_dxc_dir/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp", |
| 2120 | "$dawn_dxc_dir/tools/clang/lib/Sema/AttributeList.cpp", |
| 2121 | "$dawn_dxc_dir/tools/clang/lib/Sema/CodeCompleteConsumer.cpp", |
| 2122 | "$dawn_dxc_dir/tools/clang/lib/Sema/DeclSpec.cpp", |
| 2123 | "$dawn_dxc_dir/tools/clang/lib/Sema/DelayedDiagnostic.cpp", |
| 2124 | "$dawn_dxc_dir/tools/clang/lib/Sema/IdentifierResolver.cpp", |
| 2125 | "$dawn_dxc_dir/tools/clang/lib/Sema/JumpDiagnostics.cpp", |
| 2126 | "$dawn_dxc_dir/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp", |
| 2127 | "$dawn_dxc_dir/tools/clang/lib/Sema/Scope.cpp", |
| 2128 | "$dawn_dxc_dir/tools/clang/lib/Sema/ScopeInfo.cpp", |
| 2129 | "$dawn_dxc_dir/tools/clang/lib/Sema/Sema.cpp", |
| 2130 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaAccess.cpp", |
| 2131 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaAttr.cpp", |
| 2132 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaCUDA.cpp", |
| 2133 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp", |
| 2134 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaCast.cpp", |
| 2135 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaChecking.cpp", |
| 2136 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaCodeComplete.cpp", |
| 2137 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaConsumer.cpp", |
| 2138 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaDXR.cpp", |
| 2139 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaDecl.cpp", |
| 2140 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaDeclAttr.cpp", |
| 2141 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaDeclCXX.cpp", |
| 2142 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaDeclObjC.cpp", |
| 2143 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaExceptionSpec.cpp", |
| 2144 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaExpr.cpp", |
| 2145 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaExprCXX.cpp", |
| 2146 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaExprMember.cpp", |
| 2147 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaExprObjC.cpp", |
| 2148 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaFixItUtils.cpp", |
| 2149 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaHLSL.cpp", |
Dawn Autoroller | 19d9a204 | 2024-01-06 04:12:50 +0000 | [diff] [blame] | 2150 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaHLSLDiagnoseTU.cpp", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 2151 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaInit.cpp", |
| 2152 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaLambda.cpp", |
| 2153 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaLookup.cpp", |
| 2154 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaObjCProperty.cpp", |
| 2155 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaOpenMP.cpp", |
| 2156 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaOverload.cpp", |
| 2157 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaPseudoObject.cpp", |
| 2158 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaStmt.cpp", |
| 2159 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaStmtAsm.cpp", |
| 2160 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaStmtAttr.cpp", |
| 2161 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaTemplate.cpp", |
| 2162 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaTemplateDeduction.cpp", |
| 2163 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp", |
| 2164 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp", |
| 2165 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaTemplateVariadic.cpp", |
| 2166 | "$dawn_dxc_dir/tools/clang/lib/Sema/SemaType.cpp", |
| 2167 | "$dawn_dxc_dir/tools/clang/lib/Sema/TypeLocBuilder.cpp", |
| 2168 | ] |
| 2169 | } |
| 2170 | dxcompiler_sourceset("clang_lib_serialization") { |
| 2171 | target_type = "static_library" # Ensure unused globals are stripped |
| 2172 | sources = [ |
| 2173 | "$dawn_dxc_dir/tools/clang/lib/Serialization/ASTCommon.cpp", |
| 2174 | "$dawn_dxc_dir/tools/clang/lib/Serialization/ASTReader.cpp", |
| 2175 | "$dawn_dxc_dir/tools/clang/lib/Serialization/ASTReaderDecl.cpp", |
| 2176 | "$dawn_dxc_dir/tools/clang/lib/Serialization/ASTReaderStmt.cpp", |
| 2177 | "$dawn_dxc_dir/tools/clang/lib/Serialization/ASTWriter.cpp", |
| 2178 | "$dawn_dxc_dir/tools/clang/lib/Serialization/ASTWriterDecl.cpp", |
| 2179 | "$dawn_dxc_dir/tools/clang/lib/Serialization/ASTWriterStmt.cpp", |
| 2180 | "$dawn_dxc_dir/tools/clang/lib/Serialization/GeneratePCH.cpp", |
| 2181 | "$dawn_dxc_dir/tools/clang/lib/Serialization/GlobalModuleIndex.cpp", |
| 2182 | "$dawn_dxc_dir/tools/clang/lib/Serialization/Module.cpp", |
| 2183 | "$dawn_dxc_dir/tools/clang/lib/Serialization/ModuleManager.cpp", |
| 2184 | ] |
| 2185 | } |
| 2186 | dxcompiler_sourceset("clang_lib_tooling") { |
| 2187 | target_type = "static_library" # Ensure unused globals are stripped |
| 2188 | sources = [ |
| 2189 | "$dawn_dxc_dir/tools/clang/lib/Tooling/ArgumentsAdjusters.cpp", |
| 2190 | "$dawn_dxc_dir/tools/clang/lib/Tooling/CommonOptionsParser.cpp", |
| 2191 | "$dawn_dxc_dir/tools/clang/lib/Tooling/CompilationDatabase.cpp", |
| 2192 | "$dawn_dxc_dir/tools/clang/lib/Tooling/Core/Replacement.cpp", |
| 2193 | "$dawn_dxc_dir/tools/clang/lib/Tooling/FileMatchTrie.cpp", |
| 2194 | "$dawn_dxc_dir/tools/clang/lib/Tooling/JSONCompilationDatabase.cpp", |
| 2195 | "$dawn_dxc_dir/tools/clang/lib/Tooling/Refactoring.cpp", |
| 2196 | "$dawn_dxc_dir/tools/clang/lib/Tooling/RefactoringCallbacks.cpp", |
| 2197 | "$dawn_dxc_dir/tools/clang/lib/Tooling/Tooling.cpp", |
| 2198 | ] |
| 2199 | } |
| 2200 | dxcompiler_sourceset("clang_tools_libclang") { |
| 2201 | target_type = "static_library" # Ensure unused globals are stripped |
| 2202 | sources = [ |
| 2203 | "$dawn_dxc_dir/tools/clang/tools/libclang/CIndex.cpp", |
| 2204 | "$dawn_dxc_dir/tools/clang/tools/libclang/CIndexCXX.cpp", |
| 2205 | "$dawn_dxc_dir/tools/clang/tools/libclang/CIndexCodeCompletion.cpp", |
| 2206 | "$dawn_dxc_dir/tools/clang/tools/libclang/CIndexDiagnostic.cpp", |
| 2207 | "$dawn_dxc_dir/tools/clang/tools/libclang/CIndexHigh.cpp", |
| 2208 | "$dawn_dxc_dir/tools/clang/tools/libclang/CIndexInclusionStack.cpp", |
| 2209 | "$dawn_dxc_dir/tools/clang/tools/libclang/CIndexUSRs.cpp", |
| 2210 | "$dawn_dxc_dir/tools/clang/tools/libclang/CIndexer.cpp", |
| 2211 | "$dawn_dxc_dir/tools/clang/tools/libclang/CXComment.cpp", |
| 2212 | "$dawn_dxc_dir/tools/clang/tools/libclang/CXCompilationDatabase.cpp", |
| 2213 | "$dawn_dxc_dir/tools/clang/tools/libclang/CXCursor.cpp", |
| 2214 | "$dawn_dxc_dir/tools/clang/tools/libclang/CXLoadedDiagnostic.cpp", |
| 2215 | "$dawn_dxc_dir/tools/clang/tools/libclang/CXSourceLocation.cpp", |
| 2216 | "$dawn_dxc_dir/tools/clang/tools/libclang/CXStoredDiagnostic.cpp", |
| 2217 | "$dawn_dxc_dir/tools/clang/tools/libclang/CXString.cpp", |
| 2218 | "$dawn_dxc_dir/tools/clang/tools/libclang/CXType.cpp", |
| 2219 | "$dawn_dxc_dir/tools/clang/tools/libclang/IndexBody.cpp", |
| 2220 | "$dawn_dxc_dir/tools/clang/tools/libclang/IndexDecl.cpp", |
| 2221 | "$dawn_dxc_dir/tools/clang/tools/libclang/IndexTypeSourceInfo.cpp", |
| 2222 | "$dawn_dxc_dir/tools/clang/tools/libclang/Indexing.cpp", |
| 2223 | "$dawn_dxc_dir/tools/clang/tools/libclang/IndexingContext.cpp", |
| 2224 | "$dawn_dxc_dir/tools/clang/tools/libclang/dxcisenseimpl.cpp", |
| 2225 | "$dawn_dxc_dir/tools/clang/tools/libclang/dxcrewriteunused.cpp", |
| 2226 | ] |
| 2227 | } |
| 2228 | dxcompiler_sourceset("lib_ir") { |
| 2229 | target_type = "static_library" # Ensure unused globals are stripped |
| 2230 | sources = [ |
| 2231 | "$dawn_dxc_dir/lib/IR/AsmWriter.cpp", |
| 2232 | "$dawn_dxc_dir/lib/IR/Attributes.cpp", |
| 2233 | "$dawn_dxc_dir/lib/IR/AutoUpgrade.cpp", |
| 2234 | "$dawn_dxc_dir/lib/IR/BasicBlock.cpp", |
| 2235 | "$dawn_dxc_dir/lib/IR/Comdat.cpp", |
| 2236 | "$dawn_dxc_dir/lib/IR/ConstantFold.cpp", |
| 2237 | "$dawn_dxc_dir/lib/IR/ConstantRange.cpp", |
| 2238 | "$dawn_dxc_dir/lib/IR/Constants.cpp", |
| 2239 | "$dawn_dxc_dir/lib/IR/Core.cpp", |
| 2240 | "$dawn_dxc_dir/lib/IR/DIBuilder.cpp", |
| 2241 | "$dawn_dxc_dir/lib/IR/DataLayout.cpp", |
| 2242 | "$dawn_dxc_dir/lib/IR/DebugInfo.cpp", |
| 2243 | "$dawn_dxc_dir/lib/IR/DebugInfoMetadata.cpp", |
| 2244 | "$dawn_dxc_dir/lib/IR/DebugLoc.cpp", |
| 2245 | "$dawn_dxc_dir/lib/IR/DiagnosticInfo.cpp", |
| 2246 | "$dawn_dxc_dir/lib/IR/DiagnosticPrinter.cpp", |
| 2247 | "$dawn_dxc_dir/lib/IR/Dominators.cpp", |
| 2248 | "$dawn_dxc_dir/lib/IR/Function.cpp", |
| 2249 | "$dawn_dxc_dir/lib/IR/GCOV.cpp", |
| 2250 | "$dawn_dxc_dir/lib/IR/GVMaterializer.cpp", |
| 2251 | "$dawn_dxc_dir/lib/IR/Globals.cpp", |
| 2252 | "$dawn_dxc_dir/lib/IR/IRBuilder.cpp", |
| 2253 | "$dawn_dxc_dir/lib/IR/IRPrintingPasses.cpp", |
| 2254 | "$dawn_dxc_dir/lib/IR/InlineAsm.cpp", |
| 2255 | "$dawn_dxc_dir/lib/IR/Instruction.cpp", |
| 2256 | "$dawn_dxc_dir/lib/IR/Instructions.cpp", |
| 2257 | "$dawn_dxc_dir/lib/IR/IntrinsicInst.cpp", |
| 2258 | "$dawn_dxc_dir/lib/IR/LLVMContext.cpp", |
| 2259 | "$dawn_dxc_dir/lib/IR/LLVMContextImpl.cpp", |
| 2260 | "$dawn_dxc_dir/lib/IR/LegacyPassManager.cpp", |
| 2261 | "$dawn_dxc_dir/lib/IR/MDBuilder.cpp", |
| 2262 | "$dawn_dxc_dir/lib/IR/Mangler.cpp", |
| 2263 | "$dawn_dxc_dir/lib/IR/Metadata.cpp", |
| 2264 | "$dawn_dxc_dir/lib/IR/MetadataTracking.cpp", |
| 2265 | "$dawn_dxc_dir/lib/IR/Module.cpp", |
| 2266 | "$dawn_dxc_dir/lib/IR/Operator.cpp", |
| 2267 | "$dawn_dxc_dir/lib/IR/Pass.cpp", |
| 2268 | "$dawn_dxc_dir/lib/IR/PassManager.cpp", |
| 2269 | "$dawn_dxc_dir/lib/IR/PassRegistry.cpp", |
| 2270 | "$dawn_dxc_dir/lib/IR/Statepoint.cpp", |
| 2271 | "$dawn_dxc_dir/lib/IR/Type.cpp", |
| 2272 | "$dawn_dxc_dir/lib/IR/TypeFinder.cpp", |
| 2273 | "$dawn_dxc_dir/lib/IR/Use.cpp", |
| 2274 | "$dawn_dxc_dir/lib/IR/User.cpp", |
| 2275 | "$dawn_dxc_dir/lib/IR/Value.cpp", |
| 2276 | "$dawn_dxc_dir/lib/IR/ValueSymbolTable.cpp", |
| 2277 | "$dawn_dxc_dir/lib/IR/ValueTypes.cpp", |
| 2278 | "$dawn_dxc_dir/lib/IR/Verifier.cpp", |
| 2279 | ] |
| 2280 | } |
| 2281 | |
| 2282 | dxcompiler_sourceset("dxcompiler_sources") { |
| 2283 | # Use source_set as these are the sources for the dxcompiler target |
| 2284 | target_type = "source_set" |
| 2285 | |
| 2286 | sources = [ |
| 2287 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/DXCompiler.cpp", |
| 2288 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxcapi.cpp", |
| 2289 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxcassembler.cpp", |
| 2290 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxcdisassembler.cpp", |
| 2291 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxcfilesystem.cpp", |
| 2292 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxclibrary.cpp", |
| 2293 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxclinker.cpp", |
| 2294 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxcompilerobj.cpp", |
| 2295 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxcpdbutils.cpp", |
| 2296 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxcshadersourceinfo.cpp", |
| 2297 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxcutil.cpp", |
| 2298 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxcvalidator.cpp", |
| 2299 | "$dawn_dxc_dir/tools/clang/tools/dxcompiler/dxillib.cpp", |
| 2300 | ] |
Takuto Ikuta | aa1bdab | 2024-09-17 16:38:44 +0000 | [diff] [blame] | 2301 | deps = [ ":DxcDisassembler-inc" ] |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 2302 | } |
| 2303 | |
David Neto | 6515d33 | 2024-07-30 18:39:47 +0000 | [diff] [blame] | 2304 | dxcompiler_sourceset("dxcvalidator_lib") { |
| 2305 | target_type = "static_library" |
| 2306 | sources = [ "$dawn_dxc_dir/tools/clang/tools/dxcvalidator/dxcvalidator.cpp" ] |
| 2307 | } |
| 2308 | |
Antonio Maiorano | bf943da | 2023-08-16 18:05:46 +0000 | [diff] [blame] | 2309 | source_set("windows_version_resource") { |
| 2310 | defines = [ |
| 2311 | # Include version.inc |
| 2312 | "INCLUDE_HLSL_VERSION_FILE", |
| 2313 | |
| 2314 | # TODO(crbug.com/1473311): For now, GN's rc.exe doesn't handle empty string macros |
| 2315 | # the same way as MS's rc.exe, so we make these single space strings. |
| 2316 | "RC_INTERNAL_NAME=\" \"", |
| 2317 | "RC_ORIGINAL_FILENAME=\" \"", |
| 2318 | ] |
| 2319 | include_dirs = [ |
| 2320 | # Use our custom "version.inc" that includes DXC's version.inc and overrides fields |
| 2321 | "build/", |
| 2322 | ] |
| 2323 | sources = [ "$dawn_dxc_dir/resources/windows_version_resource.rc" ] |
| 2324 | } |
| 2325 | |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 2326 | loadable_module("dxcompiler") { |
| 2327 | if (dawn_has_build) { |
| 2328 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 2329 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 2330 | } |
| 2331 | |
| 2332 | deps = [ |
| 2333 | ":DxcDisassembler-inc", |
| 2334 | ":clang_lib_analysis", |
| 2335 | ":clang_lib_ast", |
| 2336 | ":clang_lib_basic", |
| 2337 | ":clang_lib_codegen", |
| 2338 | ":clang_lib_driver", |
| 2339 | ":clang_lib_edit", |
| 2340 | ":clang_lib_format", |
| 2341 | ":clang_lib_frontend", |
| 2342 | ":clang_lib_index", |
| 2343 | ":clang_lib_lex", |
| 2344 | ":clang_lib_parse", |
| 2345 | ":clang_lib_rewrite", |
| 2346 | ":clang_lib_sema", |
| 2347 | ":clang_lib_serialization", |
| 2348 | ":clang_lib_tooling", |
| 2349 | ":clang_tools_libclang", |
| 2350 | ":dxcompiler_sources", |
David Neto | 6515d33 | 2024-07-30 18:39:47 +0000 | [diff] [blame] | 2351 | ":dxcvalidator_lib", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 2352 | ":lib_analysis", |
| 2353 | ":lib_asmparser", |
| 2354 | ":lib_astmatchers", |
| 2355 | ":lib_bitcode", |
| 2356 | ":lib_dxcbindingtable", |
| 2357 | ":lib_dxilcompression", |
| 2358 | ":lib_dxildia", |
| 2359 | ":lib_dxilpixpasses", |
| 2360 | ":lib_dxilrootsignature", |
Antonio Maiorano | def14f9 | 2024-08-14 17:39:08 +0000 | [diff] [blame] | 2361 | ":lib_dxilvalidation", |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 2362 | ":lib_hlsl", |
| 2363 | ":lib_ir", |
| 2364 | ":lib_irreader", |
| 2365 | ":lib_linker", |
| 2366 | ":lib_mc", |
| 2367 | ":lib_object", |
| 2368 | ":lib_passprinters", |
| 2369 | ":lib_profiledata", |
| 2370 | ":lib_target", |
| 2371 | ":lib_transforms", |
| 2372 | ] |
| 2373 | |
| 2374 | if (is_win) { |
| 2375 | sources = [ "$dawn_dxc_dir/tools/clang/tools/dxcompiler/DXCompiler.def" ] |
Antonio Maiorano | bf943da | 2023-08-16 18:05:46 +0000 | [diff] [blame] | 2376 | |
| 2377 | deps += [ ":windows_version_resource" ] |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 2378 | } |
| 2379 | } |
| 2380 | |
| 2381 | executable("dxc") { |
| 2382 | if (dawn_has_build) { |
| 2383 | configs -= [ "//build/config/compiler:chromium_code" ] |
| 2384 | configs += [ "//build/config/compiler:no_chromium_code" ] |
| 2385 | } |
| 2386 | |
| 2387 | if (is_win) { |
| 2388 | # DXC is built with multibyte character set, so it expects Win32 functions to map the ANSI ones, not the UNICODE ones. |
| 2389 | configs -= [ "//build/config/win:unicode" ] |
| 2390 | } |
| 2391 | |
| 2392 | deps = [ ":dxclib" ] |
| 2393 | |
| 2394 | data_deps = [ ":dxcompiler" ] |
| 2395 | |
Antonio Maiorano | 94d9bb4 | 2023-12-01 18:10:56 +0000 | [diff] [blame] | 2396 | # Set rpath to be able to find the dxcompiler shared library |
Antonio Maiorano | 2d123d0 | 2023-10-24 15:39:38 +0000 | [diff] [blame] | 2397 | if (is_mac) { |
| 2398 | ldflags = [ "-Wl,-rpath,@executable_path" ] |
Antonio Maiorano | 94d9bb4 | 2023-12-01 18:10:56 +0000 | [diff] [blame] | 2399 | } else if (is_linux) { |
| 2400 | ldflags = [ "-Wl,-rpath=\$ORIGIN" ] |
Antonio Maiorano | 2d123d0 | 2023-10-24 15:39:38 +0000 | [diff] [blame] | 2401 | } |
| 2402 | |
| 2403 | if (is_win) { |
| 2404 | include_dirs = [ |
| 2405 | "$visual_studio_path/DIA SDK/include", # Required for msvc builds |
| 2406 | ] |
| 2407 | } |
Antonio Maiorano | b94856d | 2023-06-22 21:30:50 +0000 | [diff] [blame] | 2408 | |
| 2409 | sources = [ |
| 2410 | "$dawn_dxc_dir/tools/clang/tools/dxc/dxcmain.cpp", |
| 2411 | "$dawn_dxc_dir/tools/clang/tools/dxclib/dxc.cpp", |
| 2412 | ] |
| 2413 | } |
Antonio Maiorano | 39f7b1a | 2023-06-23 02:27:37 +0000 | [diff] [blame] | 2414 | |
| 2415 | # Define a target to copy the DXIL signing library, dxil.dll, to the output directory |
| 2416 | if (is_win) { |
| 2417 | import("//build/config/win/visual_studio_version.gni") |
| 2418 | copy("copy_dxil_dll") { |
| 2419 | sources = |
| 2420 | [ "$windows_sdk_path/bin/$windows_sdk_version/$target_cpu/dxil.dll" ] |
| 2421 | outputs = [ "$root_out_dir/{{source_file_part}}" ] |
| 2422 | } |
| 2423 | } |