blob: 90ca0eb700ecaa3b5501d783ad3e7d632521cff0 [file] [log] [blame]
Nicolas Capens83a5b532016-05-12 16:43:33 -04001cmake_minimum_required(VERSION 2.8)
Corentin Wallez0866b292015-12-09 13:49:40 -05002
Corentin Wallezcd0a4572015-12-10 15:59:28 -05003project(SwiftShader C CXX)
Corentin Wallez0866b292015-12-09 13:49:40 -05004
Nicolas Capens4c9f04b2019-01-31 22:09:03 -05005# On Windows we use custom solution and project files, except for certain third-
6# party projects which use CMake-generated ones. They are manually (re)generated
7# and made path relative using build/cmake.sh, so they can be checked into the
8# repository. Therefore they should not be auto-regenerated and left using
9# absolute paths by CMake's ZERO_CHECK.
10if(WIN32)
11 # Disable automatically regenerating project files on CMakeLists.txt changes.
12 set(CMAKE_SUPPRESS_REGENERATION true)
13endif()
14
Corentin Wallez0866b292015-12-09 13:49:40 -050015###########################################################
16# Detect system
17###########################################################
18
Nicolas Capens6f422092015-12-23 15:12:45 -050019if(CMAKE_SYSTEM_NAME MATCHES "Linux")
Corentin Wallez0866b292015-12-09 13:49:40 -050020 set(LINUX ON)
Stephen Whitee6ab01f2019-04-04 14:31:25 -040021elseif(CMAKE_SYSTEM_NAME MATCHES "Android")
22 set(ANDROID ON)
23 set(CMAKE_CXX_FLAGS "-DANDROID_NDK_BUILD")
Corentin Wallez0866b292015-12-09 13:49:40 -050024elseif(WIN32)
25elseif(APPLE)
26else()
27 message(FATAL_ERROR "Platform is not supported")
28endif()
29
Nicolas Capens30cd7d42017-04-25 15:17:25 -040030if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch")
31 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
32 set(ARCH "aarch64")
33 else()
34 set(ARCH "arm")
35 endif()
Gordana Cmiljanovic082dfec2018-10-19 11:36:15 +020036elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "mips*")
37 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
38 set(ARCH "mips64el")
39 else()
40 set(ARCH "mipsel")
41 endif()
Corentin Wallez0866b292015-12-09 13:49:40 -050042else()
Nicolas Capens30cd7d42017-04-25 15:17:25 -040043 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
44 set(ARCH "x86_64")
45 else()
46 set(ARCH "x86")
47 endif()
Corentin Wallez0866b292015-12-09 13:49:40 -050048endif()
49
Nicolas Capens007c6c52017-06-09 11:21:48 -040050set(CMAKE_MACOSX_RPATH ON)
51
Nicolas Capensd7a21cc2018-09-11 13:09:28 -040052if ((CMAKE_GENERATOR MATCHES "Visual Studio") AND (CMAKE_GENERATOR_TOOLSET STREQUAL ""))
53 message(WARNING "Visual Studio generators use the x86 host compiler by "
54 "default, even for 64-bit targets. This can result in linker "
55 "instability and out of memory errors. To use the 64-bit "
56 "host compiler, pass -Thost=x64 on the CMake command line.")
57endif()
58
Corentin Wallez0866b292015-12-09 13:49:40 -050059###########################################################
Nicolas Capens18b8d682017-07-25 15:31:45 -040060# Options
61###########################################################
62
63if(NOT CMAKE_BUILD_TYPE)
64 set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build: Debug Release MinSizeRel RelWithDebInfo." FORCE)
65endif()
66set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release MinSizeRel RelWithDebInfo)
67
68option(BUILD_EGL "Build the EGL library" 1)
Nicolas Capens18b8d682017-07-25 15:31:45 -040069option(BUILD_GLESv2 "Build the OpenGL ES 2 library" 1)
70option(BUILD_GLES_CM "Build the OpenGL ES 1.1 library" 1)
Chris Forbes3d27f2e2018-09-26 09:24:39 -070071option(BUILD_VULKAN "Build the Vulkan library" 1)
Nicolas Capens18b8d682017-07-25 15:31:45 -040072
73option(USE_GROUP_SOURCES "Group the source files in a folder tree for Visual Studio" 1)
74
75option(BUILD_SAMPLES "Build sample programs" 1)
76option(BUILD_TESTS "Build test programs" 1)
77
Antonio Maioranof448d8e2019-04-26 16:19:16 -040078option(MSAN "Build with memory sanitizer" 0)
79option(ASAN "Build with address sanitizer" 0)
80option(TSAN "Build with thread sanitizer" 0)
81option(UBSAN "Build with undefined behavior sanitizer" 0)
82option(WARNINGS_AS_ERRORS "Treat all warnings as errors" 1)
83option(DCHECK_ALWAYS_ON "Check validation macros even in release builds" 0)
84option(REACTOR_EMIT_DEBUG_INFO "Emit debug info for JIT functions" 0)
85option(REACTOR_EMIT_PRINT_LOCATION "Emit printing of location info for JIT functions" 0)
Nicolas Capensbf8fd5b2018-06-21 00:42:00 -040086
Nicolas Capens18b8d682017-07-25 15:31:45 -040087if(ARCH STREQUAL "arm")
88 set(DEFAULT_REACTOR_BACKEND "Subzero")
89else()
90 set(DEFAULT_REACTOR_BACKEND "LLVM")
91endif()
92
Nicolas Capens3957b7f2018-10-15 12:54:41 -040093set(REACTOR_BACKEND ${DEFAULT_REACTOR_BACKEND} CACHE STRING "JIT compiler back-end used by Reactor")
Nicolas Capens18b8d682017-07-25 15:31:45 -040094set_property(CACHE REACTOR_BACKEND PROPERTY STRINGS LLVM Subzero)
95
96# LLVM disallows calling cmake . from the main LLVM dir, the reason is that
97# it builds header files that could overwrite the orignal ones. Here we
98# want to include LLVM as a subdirectory and even though it wouldn't cause
99# the problem, if cmake . is called from the main dir, the condition that
Erwin Jansend46faeb2018-11-19 16:01:37 -0800100# LLVM checkes, "CMAKE_CURRENT_SOURCE_DIR == CMAKE_CURRENT_BINARY_DIR" will be true. So we
Nicolas Capens18b8d682017-07-25 15:31:45 -0400101# disallow it ourselves too to. In addition if there are remining CMakeFiles
102# and CMakeCache in the directory, cmake .. from a subdirectory will still
103# try to build from the main directory so we instruct users to delete these
104# files when they get the error.
Erwin Jansend46faeb2018-11-19 16:01:37 -0800105if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
Nicolas Capens18b8d682017-07-25 15:31:45 -0400106 message(FATAL_ERROR "In source builds are not allowed by LLVM, please create a build/ directory and build from there. You may have to delete the CMakeCache.txt file and CMakeFiles directory that are next to the CMakeLists.txt.")
107endif()
108
109set_property(GLOBAL PROPERTY USE_FOLDERS ON)
110
111###########################################################
Nicolas Capensfe5861b2018-08-03 16:01:48 -0400112# Initialize submodules
113###########################################################
114
Dan Sinclair6480d4e2019-03-11 10:48:19 -0400115if (NOT TARGET gtest)
116 if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/.git)
117 message(WARNING "
118 third_party/googletest submodule missing.
119 Running 'git submodule update --init' to download it:
120 ")
Nicolas Capensfe5861b2018-08-03 16:01:48 -0400121
Dan Sinclair6480d4e2019-03-11 10:48:19 -0400122 execute_process(COMMAND git submodule update --init)
123 endif()
Nicolas Capensfe5861b2018-08-03 16:01:48 -0400124endif()
125
Ben Clayton755467c2019-03-23 11:57:02 +0000126if (NOT TARGET libbacktrace)
127 if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libbacktrace/src/.git)
128 message(WARNING "
129 third_party/libbacktrace/src submodule missing.
130 Running 'git submodule update --init' to download it:
131 ")
132
133 execute_process(COMMAND git submodule update --init)
134 endif()
135endif()
136
Antonio Maiorano8b321d12019-05-27 16:15:34 -0400137# Boost is downloaded if necessary
138
139# From https://www.boost.org/users/download/
140set(BOOST_VER 1.70.0)
141set(BOOST_HASH_TARGZ "882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9")
142set(BOOST_HASH_ZIP "48f379b2e90dd1084429aae87d6bdbde9670139fa7569ee856c8c86dd366039d")
143
144string(REPLACE "." "_" BOOST_VER_FNAME ${BOOST_VER})
145set(BOOST_THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boost_${BOOST_VER_FNAME})
146
147function(DownloadBoost)
148 if (LINUX)
149 set(BOOST_EXT "tar.gz")
150 set(BOOST_HASH ${BOOST_HASH_TARGZ})
151 else()
152 set(BOOST_EXT "zip")
153 set(BOOST_HASH ${BOOST_HASH_ZIP})
154 endif()
155
156 # Note: bintray.com has rate limiting, so use the sourceforge mirror
157 # set(BOOST_URL https://dl.bintray.com/boostorg/release/${BOOST_VER}/source/boost_${BOOST_VER_FNAME}.${BOOST_EXT})
158 set(BOOST_URL https://iweb.dl.sourceforge.net/project/boost/boost/${BOOST_VER}/boost_${BOOST_VER_FNAME}.${BOOST_EXT})
159
160 if (NOT TARGET Boost::boost)
161 if(NOT EXISTS ${BOOST_THIRD_PARTY_DIR})
162 message(WARNING "
163 third_party/boost is missing.
164 Downloading and extracting boost:
165 ")
166
167 set(BOOST_ARCHIVE ${CMAKE_BINARY_DIR}/temp/boost_archive)
168 message(STATUS "Downloading ${BOOST_URL} to ${BOOST_ARCHIVE}...")
169 file(DOWNLOAD ${BOOST_URL} ${BOOST_ARCHIVE} EXPECTED_HASH SHA256=${BOOST_HASH})
170 message(STATUS "Extracting ${BOOST_ARCHIVE} to ${BOOST_THIRD_PARTY_DIR}...")
171 execute_process(
172 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/third_party
173 COMMAND cmake -E tar xf ${BOOST_ARCHIVE}
174 )
175 endif()
176 endif()
177endfunction()
178
Nicolas Capensfe5861b2018-08-03 16:01:48 -0400179###########################################################
Corentin Wallez0866b292015-12-09 13:49:40 -0500180# Convenience macros
181###########################################################
182
183# Recursively calls source_group on the files of the directory
184# so that Visual Studio has the files in a folder tree
185macro(group_all_sources directory)
Erwin Jansend46faeb2018-11-19 16:01:37 -0800186 file(GLOB files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${directory} ${CMAKE_CURRENT_SOURCE_DIR}/${directory}/*)
Corentin Wallez0866b292015-12-09 13:49:40 -0500187 foreach(file ${files})
Erwin Jansend46faeb2018-11-19 16:01:37 -0800188 if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${directory}/${file})
Corentin Wallez0866b292015-12-09 13:49:40 -0500189 group_all_sources(${directory}/${file})
190 else()
191 string(REPLACE "/" "\\" groupname ${directory})
Erwin Jansend46faeb2018-11-19 16:01:37 -0800192 source_group(${groupname} FILES ${CMAKE_CURRENT_SOURCE_DIR}/${directory}/${file})
Corentin Wallez0866b292015-12-09 13:49:40 -0500193 endif()
194 endforeach()
195endmacro()
196
197# Takes target library and a directory where the export map is
198# and add the linker options so that only the API symbols are
199# exported.
Nicolas Capens499bb762018-06-29 13:30:57 -0400200macro(set_shared_library_export_map TARGET DIR)
Corentin Wallez0866b292015-12-09 13:49:40 -0500201 if(MSVC)
Nicolas Capens499bb762018-06-29 13:30:57 -0400202 set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " /DEF:\"${DIR}/${TARGET}.def\"")
Corentin Wallez27654c22015-12-09 15:22:08 -0500203 elseif(LINUX)
Corentin Wallez0866b292015-12-09 13:49:40 -0500204 # The version script only exports the API functions and
Nicolas Capens499bb762018-06-29 13:30:57 -0400205 # hides all the others.
206 set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--version-script=${DIR}/${TARGET}.lds")
207 set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_DEPENDS "${DIR}/${TARGET}.lds;")
Nicolas Capensbf8fd5b2018-06-21 00:42:00 -0400208
Nicolas Capens517a57f2018-06-29 13:30:57 -0400209 # Don't allow symbols to be overridden by another module.
210 set_property(TARGET ${TARGET} APPEND_STRING PROPERTY COMPILE_FLAGS " -fvisibility=protected")
211
Gordana Cmiljanovic20622c02018-11-05 15:00:11 +0100212 if(ARCH STREQUAL "mipsel" OR ARCH STREQUAL "mips64el")
Gordana Cmiljanovic082dfec2018-10-19 11:36:15 +0200213 # MIPS supports sysv hash-style only.
214 set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--hash-style=sysv")
215 else()
216 # Both hash-style are needed, because we want both gold and
217 # GNU ld to be able to read our libraries.
218 set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--hash-style=both")
219 endif()
Nicolas Capens499bb762018-06-29 13:30:57 -0400220
221 # Gc sections is used in combination with each functions being
222 # in its own section, to reduce the binary size.
223 set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--gc-sections")
224
225 # Don't allow undefined symbols, unless it's a Sanitizer build.
Nicolas Capensbf8fd5b2018-06-21 00:42:00 -0400226 if(NOT MSAN AND NOT ASAN AND NOT TSAN AND NOT UBSAN)
227 set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--no-undefined")
228 endif()
Corentin Wallez0866b292015-12-09 13:49:40 -0500229 endif()
230endmacro()
231
232if(USE_GROUP_SOURCES)
233 group_all_sources(src)
234endif()
235
236###########################################################
237# Directories
238###########################################################
239
Erwin Jansend46faeb2018-11-19 16:01:37 -0800240set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
Corentin Wallez0866b292015-12-09 13:49:40 -0500241set(OPENGL_DIR ${SOURCE_DIR}/OpenGL)
242set(OPENGL_COMPILER_DIR ${OPENGL_DIR}/compiler)
Chris Forbes3d27f2e2018-09-26 09:24:39 -0700243set(VULKAN_DIR ${SOURCE_DIR}/Vulkan)
Ben Clayton5875be52019-04-11 14:57:40 -0400244set(LLVM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/llvm-7.0/llvm)
245set(LLVM_CONFIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/llvm-7.0/configs)
Ben Claytonac07ed82019-03-26 14:17:41 +0000246set(LIBBACKTRACE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libbacktrace/src)
247set(LIBBACKTRACE_CONFIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libbacktrace/config)
248set(LIBBACKTRACE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libbacktrace/src)
Erwin Jansend46faeb2018-11-19 16:01:37 -0800249set(SUBZERO_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/subzero)
250set(SUBZERO_LLVM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/llvm-subzero)
251set(TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests)
252set(HELLO2_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/PowerVR_SDK/Examples/Beginner/01_HelloAPI/OGLES2)
Corentin Wallez0866b292015-12-09 13:49:40 -0500253
254###########################################################
255# Compile flags
256###########################################################
257
Ben Clayton4ceb77d2019-04-24 12:09:59 +0100258# Flags for project code (non 3rd party)
259set(SWIFTSHADER_COMPILE_OPTIONS "")
260
Nicolas Capens6f422092015-12-23 15:12:45 -0500261macro(set_cpp_flag FLAG)
262 if(${ARGC} GREATER 1)
263 set(CMAKE_CXX_FLAGS_${ARGV1} "${CMAKE_CXX_FLAGS_${ARGV1}} ${FLAG}")
Corentin Wallez0866b292015-12-09 13:49:40 -0500264 else()
Nicolas Capens6f422092015-12-23 15:12:45 -0500265 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAG}")
Corentin Wallez0866b292015-12-09 13:49:40 -0500266 endif()
267endmacro()
268
Ben Clayton48c8a182019-05-21 20:00:20 +0100269macro(set_linker_flag FLAG)
270 if(${ARGC} GREATER 1)
271 set(CMAKE_EXE_LINKER_FLAGS ${ARGV1} "${CMAKE_EXE_LINKER_FLAGS ${ARGV1}} ${FLAG}")
272 else()
273 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FLAG}")
274 endif()
275endmacro()
276
Corentin Wallez0866b292015-12-09 13:49:40 -0500277if(MSVC)
278 set_cpp_flag("/MP")
279 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
Antonio Maiorano5bce1f42019-05-10 16:03:49 -0400280 add_definitions(-D_SCL_SECURE_NO_WARNINGS)
Nicolas Capens4c9f04b2019-01-31 22:09:03 -0500281 add_definitions(-D_SBCS) # Single Byte Character Set (ASCII)
Antonio Maiorano5bce1f42019-05-10 16:03:49 -0400282
283 if(WARNINGS_AS_ERRORS)
284 set_cpp_flag("/WX") # Treat all warnings as errors
285 endif()
286
287 # Disable specific warnings
288 # TODO: Not all of these should be disabled, but for now, we want a warning-free msvc build. Remove these one by one
289 # and fix the actual warnings in code.
290 list(APPEND SWIFTSHADER_COMPILE_OPTIONS
291 "/wd4005" # 'identifier' : macro redefinition
292 "/wd4018" # 'expression' : signed/unsigned mismatch
Ben Clayton4d4a1902019-05-15 11:15:42 +0100293 "/wd4065" # switch statement contains 'default' but no 'case' labels
Antonio Maiorano5bce1f42019-05-10 16:03:49 -0400294 "/wd4141" # 'modifier' : used more than once
295 "/wd4146" # unary minus operator applied to unsigned type, result still unsigned
296 "/wd4244" # 'conversion' conversion from 'type1' to 'type2', possible loss of data
297 "/wd4267" # 'var' : conversion from 'size_t' to 'type', possible loss of data
298 "/wd4291" # 'void X new(size_t,unsigned int,unsigned int)': no matching operator delete found; memory will not be freed if initialization throws an exception
299 "/wd4309" # 'conversion' : truncation of constant value
300 "/wd4624" # 'derived class' : destructor was implicitly defined as deleted because a base class destructor is inaccessible or deleted
301 "/wd4800" # 'type' : forcing value to bool 'true' or 'false' (performance warning)
302 "/wd4838" # conversion from 'type_1' to 'type_2' requires a narrowing conversion
303 "/wd5030" # attribute 'attribute' is not recognized
304 "/wd5038" # data member 'member1' will be initialized after data member 'member2' data member 'member' will be initialized after base class 'base_class'
305 )
306
307 # Treat specific warnings as errors
308 list(APPEND SWIFTSHADER_COMPILE_OPTIONS
309 "/we4018" # 'expression' : signed/unsigned mismatch
Antonio Maiorano23da0732019-05-14 22:32:16 -0400310 "/we4471" # 'enumeration': a forward declaration of an unscoped enumeration must have an underlying type (int assumed)
Antonio Maiorano5bce1f42019-05-10 16:03:49 -0400311 "/we4838" # conversion from 'type_1' to 'type_2' requires a narrowing conversion
312 "/we5038" # data member 'member1' will be initialized after data member 'member2' data member 'member' will be initialized after base class 'base_class'
313 )
314
Corentin Wallez0866b292015-12-09 13:49:40 -0500315else()
Chris Forbesef4ab0f2019-01-18 08:11:03 -0800316 set_cpp_flag("--std=c++11")
Ben Clayton09a7f452019-04-25 15:22:43 +0100317 set_cpp_flag("-fno-exceptions")
318
Ben Clayton4ceb77d2019-04-24 12:09:59 +0100319 list(APPEND SWIFTSHADER_COMPILE_OPTIONS
Ben Clayton4ceb77d2019-04-24 12:09:59 +0100320 "-Wall"
321 "-Werror=reorder"
322 "-Werror=sign-compare"
323 "-Werror=missing-braces"
324 )
Corentin Wallez0866b292015-12-09 13:49:40 -0500325
Ben Clayton5e828762019-04-24 19:16:52 +0100326 if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
Ben Clayton4ceb77d2019-04-24 12:09:59 +0100327 list(APPEND SWIFTSHADER_COMPILE_OPTIONS
328 "-Werror=unused-lambda-capture"
329 "-Werror=string-conversion"
Ben Clayton2a582382019-04-24 12:11:36 +0100330 "-Werror=extra-semi"
Ben Clayton30278952019-04-24 20:31:53 +0100331 "-Werror=ignored-qualifiers"
Ben Clayton4ceb77d2019-04-24 12:09:59 +0100332 )
Nicolas Capens825d3442018-11-06 23:50:05 -0500333 endif()
334
Corentin Wallez0866b292015-12-09 13:49:40 -0500335 # Remove xor, and, or and friends from the list of keywords, they are used
336 # by Reactor
Ben Clayton4ceb77d2019-04-24 12:09:59 +0100337 list(APPEND SWIFTSHADER_COMPILE_OPTIONS
338 "-fno-operator-names"
339 )
Corentin Wallez0866b292015-12-09 13:49:40 -0500340
341 # LLVM headers requires these flags to be set
342 set_cpp_flag("-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS")
343
Nicolas Capens499bb762018-06-29 13:30:57 -0400344 if(ARCH STREQUAL "x86")
Corentin Wallez0866b292015-12-09 13:49:40 -0500345 set_cpp_flag("-m32")
346 set_cpp_flag("-msse2")
Nicolas Capens0424edc2018-01-03 14:06:30 -0500347 set_cpp_flag("-mfpmath=sse")
348 set_cpp_flag("-march=pentium4")
349 set_cpp_flag("-mtune=generic")
Corentin Wallez0866b292015-12-09 13:49:40 -0500350 endif()
Nicolas Capens499bb762018-06-29 13:30:57 -0400351 if(ARCH STREQUAL "x86_64")
Corentin Wallez0866b292015-12-09 13:49:40 -0500352 set_cpp_flag("-m64")
353 set_cpp_flag("-fPIC")
Nicolas Capens0424edc2018-01-03 14:06:30 -0500354 set_cpp_flag("-march=x86-64")
355 set_cpp_flag("-mtune=generic")
Corentin Wallez0866b292015-12-09 13:49:40 -0500356 endif()
Gordana Cmiljanovic082dfec2018-10-19 11:36:15 +0200357 if(ARCH STREQUAL "mipsel")
358 set_cpp_flag("-march=mips32r2")
359 set_cpp_flag("-fPIC")
360 set_cpp_flag("-mhard-float")
361 set_cpp_flag("-mfp32")
362 endif()
Gordana Cmiljanovic20622c02018-11-05 15:00:11 +0100363 if(ARCH STREQUAL "mips64el")
364 set_cpp_flag("-march=mips64r2")
365 set_cpp_flag("-mabi=64")
366 set_cpp_flag("-fPIC")
367 endif()
Nicolas Capens499bb762018-06-29 13:30:57 -0400368
Alexis Hetu20eea3c2018-06-19 14:50:41 -0400369 if(LINUX)
370 set_cpp_flag("-DUSE_X11=1")
Hernan Liatis2bb08642019-02-08 14:08:21 -0800371 set_cpp_flag("-DVK_USE_PLATFORM_XLIB_KHR")
Alexis Hetu20eea3c2018-06-19 14:50:41 -0400372 endif()
Corentin Wallez0866b292015-12-09 13:49:40 -0500373
374 # Use -g3 to have even more debug info
375 set_cpp_flag("-g -g3" DEBUG)
376 set_cpp_flag("-g -g3" RELWITHDEBINFO)
Ben Clayton09a91e42019-02-05 17:58:38 +0000377 if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
378 # Treated as an unused argument with clang
379 set_cpp_flag("-s" RELEASE)
380 endif()
Corentin Wallez0866b292015-12-09 13:49:40 -0500381
Ben Clayton7aafb272019-02-19 17:08:56 +0000382 if(WARNINGS_AS_ERRORS)
383 set_cpp_flag("-Werror") # Treat all warnings as errors
384 endif()
385
Ben Claytonf1172912019-02-26 16:52:12 +0000386 if(DCHECK_ALWAYS_ON)
Ben Clayton4ceb77d2019-04-24 12:09:59 +0100387 list(APPEND SWIFTSHADER_COMPILE_OPTIONS "-DDCHECK_ALWAYS_ON")
Ben Claytonf1172912019-02-26 16:52:12 +0000388 endif()
389
Ben Clayton0eee3322019-02-19 17:08:14 +0000390 # Disable pedanitc warnings
391 if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
Ben Clayton4ceb77d2019-04-24 12:09:59 +0100392 list(APPEND SWIFTSHADER_COMPILE_OPTIONS
393 "-Wno-ignored-attributes" # ignoring attributes on template argument 'X'
394 "-Wno-attributes" # 'X' attribute ignored
395 "-Wno-strict-aliasing" # dereferencing type-punned pointer will break strict-aliasing rules
396 "-Wno-comment" # multi-line comment
397 )
Ben Clayton0eee3322019-02-19 17:08:14 +0000398 elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
Ben Clayton4ceb77d2019-04-24 12:09:59 +0100399 list(APPEND SWIFTSHADER_COMPILE_OPTIONS
400 "-Wno-unneeded-internal-declaration" # function 'X' is not needed and will not be emitted
401 "-Wno-unused-private-field" # private field 'offset' is not used - TODO: Consider enabling this once Vulkan is further implemented.
402 "-Wno-comment" # multi-line comment
403 "-Wno-undefined-var-template" # instantiation of variable 'X' required here, but no definition is available
404 )
Ben Clayton0eee3322019-02-19 17:08:14 +0000405 endif()
406
Corentin Wallez0866b292015-12-09 13:49:40 -0500407 # For distribution it is more important to be slim than super optimized
Alexis Hetu2c0546d2017-05-24 11:16:26 -0400408 set_cpp_flag("-Os" RELEASE)
409 set_cpp_flag("-Os" RELWITHDEBINFO)
Corentin Wallez0866b292015-12-09 13:49:40 -0500410
411 set_cpp_flag("-DNDEBUG" RELEASE)
412 set_cpp_flag("-DNDEBUG" RELWITHDEBINFO)
413 set_cpp_flag("-DANGLE_DISABLE_TRACE" RELEASE)
414 set_cpp_flag("-DANGLE_DISABLE_TRACE" RELWITHDEBINFO)
415
416 # Put each variable and function in its own section so that when linking
417 # with -gc-sections unused functions and variables are removed.
418 set_cpp_flag("-ffunction-sections" RELEASE)
419 set_cpp_flag("-fdata-sections" RELEASE)
420 set_cpp_flag("-fomit-frame-pointer" RELEASE)
Nicolas Capensbf8fd5b2018-06-21 00:42:00 -0400421
Ben Claytondae97922019-05-17 12:09:31 +0100422 if(MSAN)
423 set_cpp_flag("-fsanitize=memory")
Ben Clayton48c8a182019-05-21 20:00:20 +0100424 set_linker_flag("-fsanitize=memory")
Ben Claytondae97922019-05-17 12:09:31 +0100425 elseif(ASAN)
426 set_cpp_flag("-fsanitize=address")
Ben Clayton48c8a182019-05-21 20:00:20 +0100427 set_linker_flag("-fsanitize=address")
Ben Claytondae97922019-05-17 12:09:31 +0100428 elseif(TSAN)
429 set_cpp_flag("-fsanitize=thread")
Ben Clayton48c8a182019-05-21 20:00:20 +0100430 set_linker_flag("-fsanitize=thread")
Ben Claytondae97922019-05-17 12:09:31 +0100431 elseif(UBSAN)
432 set_cpp_flag("-fsanitize=undefined")
Ben Clayton48c8a182019-05-21 20:00:20 +0100433 set_linker_flag("-fsanitize=undefined")
Nicolas Capensbf8fd5b2018-06-21 00:42:00 -0400434 endif()
Corentin Wallez0866b292015-12-09 13:49:40 -0500435endif()
436
Antonio Maioranof448d8e2019-04-26 16:19:16 -0400437if(REACTOR_EMIT_PRINT_LOCATION)
438 # This feature depends on REACTOR_EMIT_DEBUG_INFO, so enable it
439 set(REACTOR_EMIT_DEBUG_INFO "On")
440 list(APPEND SWIFTSHADER_COMPILE_OPTIONS "-DENABLE_RR_EMIT_PRINT_LOCATION")
441endif()
442
443if(REACTOR_EMIT_DEBUG_INFO)
444 message(WARNING "REACTOR_EMIT_DEBUG_INFO is enabled. This will likely affect performance.")
445 list(APPEND SWIFTSHADER_COMPILE_OPTIONS "-DENABLE_RR_DEBUG_INFO")
446endif()
447
Nicolas Capensbf8fd5b2018-06-21 00:42:00 -0400448if(WIN32)
Corentin Wallez0866b292015-12-09 13:49:40 -0500449 add_definitions(-DWINVER=0x501 -DNOMINMAX -DSTRICT)
Nicolas Capens6f422092015-12-23 15:12:45 -0500450 set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "" "lib")
Corentin Wallez0866b292015-12-09 13:49:40 -0500451endif()
452
Corentin Wallez0866b292015-12-09 13:49:40 -0500453###########################################################
454# LLVM
455###########################################################
456
Logan Chien0eedc8c2018-08-21 09:34:28 +0800457set(LLVM_LIST
Nicolas Capens9ac24a92019-04-29 10:45:56 -0400458 ${LLVM_DIR}/lib/Analysis/AliasAnalysis.cpp
459 ${LLVM_DIR}/lib/Analysis/AliasAnalysisSummary.cpp
460 ${LLVM_DIR}/lib/Analysis/AliasSetTracker.cpp
461 ${LLVM_DIR}/lib/Analysis/AssumptionCache.cpp
462 ${LLVM_DIR}/lib/Analysis/BasicAliasAnalysis.cpp
463 ${LLVM_DIR}/lib/Analysis/BlockFrequencyInfo.cpp
464 ${LLVM_DIR}/lib/Analysis/BlockFrequencyInfoImpl.cpp
465 ${LLVM_DIR}/lib/Analysis/BranchProbabilityInfo.cpp
466 ${LLVM_DIR}/lib/Analysis/CFG.cpp
467 ${LLVM_DIR}/lib/Analysis/CFLAndersAliasAnalysis.cpp
468 ${LLVM_DIR}/lib/Analysis/CFLSteensAliasAnalysis.cpp
469 ${LLVM_DIR}/lib/Analysis/CallGraph.cpp
470 ${LLVM_DIR}/lib/Analysis/CallGraphSCCPass.cpp
471 ${LLVM_DIR}/lib/Analysis/CaptureTracking.cpp
472 ${LLVM_DIR}/lib/Analysis/CmpInstAnalysis.cpp
473 ${LLVM_DIR}/lib/Analysis/CodeMetrics.cpp
474 ${LLVM_DIR}/lib/Analysis/ConstantFolding.cpp
475 ${LLVM_DIR}/lib/Analysis/DemandedBits.cpp
476 ${LLVM_DIR}/lib/Analysis/DependenceAnalysis.cpp
477 ${LLVM_DIR}/lib/Analysis/DivergenceAnalysis.cpp
478 ${LLVM_DIR}/lib/Analysis/DominanceFrontier.cpp
479 ${LLVM_DIR}/lib/Analysis/EHPersonalities.cpp
480 ${LLVM_DIR}/lib/Analysis/GlobalsModRef.cpp
481 ${LLVM_DIR}/lib/Analysis/IVUsers.cpp
482 ${LLVM_DIR}/lib/Analysis/InlineCost.cpp
483 ${LLVM_DIR}/lib/Analysis/InstructionSimplify.cpp
484 ${LLVM_DIR}/lib/Analysis/IteratedDominanceFrontier.cpp
485 ${LLVM_DIR}/lib/Analysis/LazyBlockFrequencyInfo.cpp
486 ${LLVM_DIR}/lib/Analysis/LazyBranchProbabilityInfo.cpp
487 ${LLVM_DIR}/lib/Analysis/LazyValueInfo.cpp
488 ${LLVM_DIR}/lib/Analysis/Loads.cpp
489 ${LLVM_DIR}/lib/Analysis/LoopAnalysisManager.cpp
490 ${LLVM_DIR}/lib/Analysis/LoopInfo.cpp
491 ${LLVM_DIR}/lib/Analysis/LoopPass.cpp
492 ${LLVM_DIR}/lib/Analysis/MemoryBuiltins.cpp
493 ${LLVM_DIR}/lib/Analysis/MemoryDependenceAnalysis.cpp
494 ${LLVM_DIR}/lib/Analysis/MemoryLocation.cpp
495 ${LLVM_DIR}/lib/Analysis/MemorySSA.cpp
Ben Clayton1c82c7b2019-04-30 12:49:27 +0100496 ${LLVM_DIR}/lib/Analysis/MemorySSAUpdater.cpp
Nicolas Capens9ac24a92019-04-29 10:45:56 -0400497 ${LLVM_DIR}/lib/Analysis/MustExecute.cpp
498 ${LLVM_DIR}/lib/Analysis/ObjCARCAliasAnalysis.cpp
499 ${LLVM_DIR}/lib/Analysis/ObjCARCAnalysisUtils.cpp
500 ${LLVM_DIR}/lib/Analysis/ObjCARCInstKind.cpp
501 ${LLVM_DIR}/lib/Analysis/OptimizationRemarkEmitter.cpp
502 ${LLVM_DIR}/lib/Analysis/OrderedBasicBlock.cpp
503 ${LLVM_DIR}/lib/Analysis/PHITransAddr.cpp
504 ${LLVM_DIR}/lib/Analysis/PhiValues.cpp
505 ${LLVM_DIR}/lib/Analysis/PostDominators.cpp
506 ${LLVM_DIR}/lib/Analysis/ProfileSummaryInfo.cpp
507 ${LLVM_DIR}/lib/Analysis/PtrUseVisitor.cpp
508 ${LLVM_DIR}/lib/Analysis/ScalarEvolution.cpp
509 ${LLVM_DIR}/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp
510 ${LLVM_DIR}/lib/Analysis/ScalarEvolutionExpander.cpp
511 ${LLVM_DIR}/lib/Analysis/ScalarEvolutionNormalization.cpp
512 ${LLVM_DIR}/lib/Analysis/ScopedNoAliasAA.cpp
513 ${LLVM_DIR}/lib/Analysis/TargetLibraryInfo.cpp
514 ${LLVM_DIR}/lib/Analysis/TargetTransformInfo.cpp
515 ${LLVM_DIR}/lib/Analysis/TypeBasedAliasAnalysis.cpp
516 ${LLVM_DIR}/lib/Analysis/ValueLattice.cpp
517 ${LLVM_DIR}/lib/Analysis/ValueLatticeUtils.cpp
518 ${LLVM_DIR}/lib/Analysis/ValueTracking.cpp
519 ${LLVM_DIR}/lib/Analysis/VectorUtils.cpp
520 ${LLVM_DIR}/lib/AsmParser/LLLexer.cpp
521 ${LLVM_DIR}/lib/AsmParser/LLParser.cpp
522 ${LLVM_DIR}/lib/AsmParser/Parser.cpp
523 ${LLVM_DIR}/lib/BinaryFormat/Dwarf.cpp
524 ${LLVM_DIR}/lib/BinaryFormat/Magic.cpp
525 ${LLVM_DIR}/lib/BinaryFormat/Wasm.cpp
526 ${LLVM_DIR}/lib/Bitcode/Reader/BitcodeReader.cpp
527 ${LLVM_DIR}/lib/Bitcode/Reader/BitstreamReader.cpp
528 ${LLVM_DIR}/lib/Bitcode/Reader/MetadataLoader.cpp
529 ${LLVM_DIR}/lib/Bitcode/Reader/ValueList.cpp
530 ${LLVM_DIR}/lib/CodeGen/AggressiveAntiDepBreaker.cpp
531 ${LLVM_DIR}/lib/CodeGen/AllocationOrder.cpp
532 ${LLVM_DIR}/lib/CodeGen/Analysis.cpp
533 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/ARMException.cpp
534 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/AccelTable.cpp
535 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/AddressPool.cpp
536 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
537 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
538 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
539 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
540 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DIE.cpp
541 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DIEHash.cpp
542 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp
543 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
544 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DebugLocStream.cpp
545 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
546 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
547 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
548 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
549 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DwarfFile.cpp
550 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp
551 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
552 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/EHStreamer.cpp
553 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/WinCFGuard.cpp
554 ${LLVM_DIR}/lib/CodeGen/AsmPrinter/WinException.cpp
555 ${LLVM_DIR}/lib/CodeGen/AtomicExpandPass.cpp
556 ${LLVM_DIR}/lib/CodeGen/BasicTargetTransformInfo.cpp
557 ${LLVM_DIR}/lib/CodeGen/BranchFolding.cpp
558 ${LLVM_DIR}/lib/CodeGen/BranchRelaxation.cpp
559 ${LLVM_DIR}/lib/CodeGen/BreakFalseDeps.cpp
560 ${LLVM_DIR}/lib/CodeGen/CFIInstrInserter.cpp
561 ${LLVM_DIR}/lib/CodeGen/CalcSpillWeights.cpp
562 ${LLVM_DIR}/lib/CodeGen/CallingConvLower.cpp
563 ${LLVM_DIR}/lib/CodeGen/CodeGen.cpp
564 ${LLVM_DIR}/lib/CodeGen/CodeGenPrepare.cpp
565 ${LLVM_DIR}/lib/CodeGen/CriticalAntiDepBreaker.cpp
566 ${LLVM_DIR}/lib/CodeGen/DFAPacketizer.cpp
567 ${LLVM_DIR}/lib/CodeGen/DeadMachineInstructionElim.cpp
568 ${LLVM_DIR}/lib/CodeGen/DetectDeadLanes.cpp
569 ${LLVM_DIR}/lib/CodeGen/DwarfEHPrepare.cpp
570 ${LLVM_DIR}/lib/CodeGen/EarlyIfConversion.cpp
571 ${LLVM_DIR}/lib/CodeGen/EdgeBundles.cpp
572 ${LLVM_DIR}/lib/CodeGen/ExecutionDomainFix.cpp
573 ${LLVM_DIR}/lib/CodeGen/ExpandISelPseudos.cpp
574 ${LLVM_DIR}/lib/CodeGen/ExpandMemCmp.cpp
575 ${LLVM_DIR}/lib/CodeGen/ExpandPostRAPseudos.cpp
576 ${LLVM_DIR}/lib/CodeGen/ExpandReductions.cpp
577 ${LLVM_DIR}/lib/CodeGen/FEntryInserter.cpp
578 ${LLVM_DIR}/lib/CodeGen/FaultMaps.cpp
579 ${LLVM_DIR}/lib/CodeGen/FuncletLayout.cpp
580 ${LLVM_DIR}/lib/CodeGen/GCMetadata.cpp
581 ${LLVM_DIR}/lib/CodeGen/GCMetadataPrinter.cpp
582 ${LLVM_DIR}/lib/CodeGen/GCRootLowering.cpp
583 ${LLVM_DIR}/lib/CodeGen/GCStrategy.cpp
584 ${LLVM_DIR}/lib/CodeGen/GlobalISel/CallLowering.cpp
585 ${LLVM_DIR}/lib/CodeGen/GlobalISel/GlobalISel.cpp
586 ${LLVM_DIR}/lib/CodeGen/GlobalISel/IRTranslator.cpp
587 ${LLVM_DIR}/lib/CodeGen/GlobalISel/InstructionSelect.cpp
588 ${LLVM_DIR}/lib/CodeGen/GlobalISel/InstructionSelector.cpp
589 ${LLVM_DIR}/lib/CodeGen/GlobalISel/LegalityPredicates.cpp
590 ${LLVM_DIR}/lib/CodeGen/GlobalISel/LegalizeMutations.cpp
591 ${LLVM_DIR}/lib/CodeGen/GlobalISel/Legalizer.cpp
592 ${LLVM_DIR}/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
593 ${LLVM_DIR}/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
594 ${LLVM_DIR}/lib/CodeGen/GlobalISel/Localizer.cpp
595 ${LLVM_DIR}/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
596 ${LLVM_DIR}/lib/CodeGen/GlobalISel/RegBankSelect.cpp
597 ${LLVM_DIR}/lib/CodeGen/GlobalISel/RegisterBank.cpp
598 ${LLVM_DIR}/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
599 ${LLVM_DIR}/lib/CodeGen/GlobalISel/Utils.cpp
600 ${LLVM_DIR}/lib/CodeGen/IfConversion.cpp
601 ${LLVM_DIR}/lib/CodeGen/ImplicitNullChecks.cpp
602 ${LLVM_DIR}/lib/CodeGen/IndirectBrExpandPass.cpp
603 ${LLVM_DIR}/lib/CodeGen/InlineSpiller.cpp
604 ${LLVM_DIR}/lib/CodeGen/InterferenceCache.cpp
605 ${LLVM_DIR}/lib/CodeGen/InterleavedAccessPass.cpp
606 ${LLVM_DIR}/lib/CodeGen/IntrinsicLowering.cpp
607 ${LLVM_DIR}/lib/CodeGen/LLVMTargetMachine.cpp
608 ${LLVM_DIR}/lib/CodeGen/LatencyPriorityQueue.cpp
609 ${LLVM_DIR}/lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp
610 ${LLVM_DIR}/lib/CodeGen/LexicalScopes.cpp
611 ${LLVM_DIR}/lib/CodeGen/LiveDebugValues.cpp
612 ${LLVM_DIR}/lib/CodeGen/LiveDebugVariables.cpp
613 ${LLVM_DIR}/lib/CodeGen/LiveInterval.cpp
614 ${LLVM_DIR}/lib/CodeGen/LiveIntervalUnion.cpp
615 ${LLVM_DIR}/lib/CodeGen/LiveIntervals.cpp
616 ${LLVM_DIR}/lib/CodeGen/LivePhysRegs.cpp
617 ${LLVM_DIR}/lib/CodeGen/LiveRangeCalc.cpp
618 ${LLVM_DIR}/lib/CodeGen/LiveRangeEdit.cpp
619 ${LLVM_DIR}/lib/CodeGen/LiveRangeShrink.cpp
620 ${LLVM_DIR}/lib/CodeGen/LiveRegMatrix.cpp
621 ${LLVM_DIR}/lib/CodeGen/LiveRegUnits.cpp
622 ${LLVM_DIR}/lib/CodeGen/LiveStacks.cpp
623 ${LLVM_DIR}/lib/CodeGen/LiveVariables.cpp
624 ${LLVM_DIR}/lib/CodeGen/LocalStackSlotAllocation.cpp
625 ${LLVM_DIR}/lib/CodeGen/LoopTraversal.cpp
626 ${LLVM_DIR}/lib/CodeGen/LowLevelType.cpp
627 ${LLVM_DIR}/lib/CodeGen/LowerEmuTLS.cpp
628 ${LLVM_DIR}/lib/CodeGen/MIRCanonicalizerPass.cpp
629 ${LLVM_DIR}/lib/CodeGen/MIRPrinter.cpp
630 ${LLVM_DIR}/lib/CodeGen/MIRPrintingPass.cpp
631 ${LLVM_DIR}/lib/CodeGen/MachineBasicBlock.cpp
632 ${LLVM_DIR}/lib/CodeGen/MachineBlockFrequencyInfo.cpp
633 ${LLVM_DIR}/lib/CodeGen/MachineBlockPlacement.cpp
634 ${LLVM_DIR}/lib/CodeGen/MachineBranchProbabilityInfo.cpp
635 ${LLVM_DIR}/lib/CodeGen/MachineCSE.cpp
636 ${LLVM_DIR}/lib/CodeGen/MachineCombiner.cpp
637 ${LLVM_DIR}/lib/CodeGen/MachineCopyPropagation.cpp
638 ${LLVM_DIR}/lib/CodeGen/MachineDominanceFrontier.cpp
639 ${LLVM_DIR}/lib/CodeGen/MachineDominators.cpp
640 ${LLVM_DIR}/lib/CodeGen/MachineFrameInfo.cpp
641 ${LLVM_DIR}/lib/CodeGen/MachineFunction.cpp
642 ${LLVM_DIR}/lib/CodeGen/MachineFunctionPass.cpp
643 ${LLVM_DIR}/lib/CodeGen/MachineFunctionPrinterPass.cpp
644 ${LLVM_DIR}/lib/CodeGen/MachineInstr.cpp
645 ${LLVM_DIR}/lib/CodeGen/MachineInstrBundle.cpp
646 ${LLVM_DIR}/lib/CodeGen/MachineLICM.cpp
647 ${LLVM_DIR}/lib/CodeGen/MachineLoopInfo.cpp
648 ${LLVM_DIR}/lib/CodeGen/MachineModuleInfo.cpp
649 ${LLVM_DIR}/lib/CodeGen/MachineModuleInfoImpls.cpp
650 ${LLVM_DIR}/lib/CodeGen/MachineOperand.cpp
651 ${LLVM_DIR}/lib/CodeGen/MachineOptimizationRemarkEmitter.cpp
652 ${LLVM_DIR}/lib/CodeGen/MachineOutliner.cpp
653 ${LLVM_DIR}/lib/CodeGen/MachinePassRegistry.cpp
654 ${LLVM_DIR}/lib/CodeGen/MachinePipeliner.cpp
655 ${LLVM_DIR}/lib/CodeGen/MachinePostDominators.cpp
656 ${LLVM_DIR}/lib/CodeGen/MachineRegionInfo.cpp
657 ${LLVM_DIR}/lib/CodeGen/MachineRegisterInfo.cpp
658 ${LLVM_DIR}/lib/CodeGen/MachineSSAUpdater.cpp
659 ${LLVM_DIR}/lib/CodeGen/MachineScheduler.cpp
660 ${LLVM_DIR}/lib/CodeGen/MachineSink.cpp
661 ${LLVM_DIR}/lib/CodeGen/MachineTraceMetrics.cpp
662 ${LLVM_DIR}/lib/CodeGen/MachineVerifier.cpp
663 ${LLVM_DIR}/lib/CodeGen/MacroFusion.cpp
664 ${LLVM_DIR}/lib/CodeGen/OptimizePHIs.cpp
665 ${LLVM_DIR}/lib/CodeGen/PHIElimination.cpp
666 ${LLVM_DIR}/lib/CodeGen/PHIEliminationUtils.cpp
667 ${LLVM_DIR}/lib/CodeGen/PatchableFunction.cpp
668 ${LLVM_DIR}/lib/CodeGen/PeepholeOptimizer.cpp
669 ${LLVM_DIR}/lib/CodeGen/PostRAHazardRecognizer.cpp
670 ${LLVM_DIR}/lib/CodeGen/PostRASchedulerList.cpp
671 ${LLVM_DIR}/lib/CodeGen/PreISelIntrinsicLowering.cpp
672 ${LLVM_DIR}/lib/CodeGen/ProcessImplicitDefs.cpp
673 ${LLVM_DIR}/lib/CodeGen/PrologEpilogInserter.cpp
674 ${LLVM_DIR}/lib/CodeGen/PseudoSourceValue.cpp
675 ${LLVM_DIR}/lib/CodeGen/ReachingDefAnalysis.cpp
676 ${LLVM_DIR}/lib/CodeGen/RegAllocBase.cpp
677 ${LLVM_DIR}/lib/CodeGen/RegAllocBasic.cpp
678 ${LLVM_DIR}/lib/CodeGen/RegAllocFast.cpp
679 ${LLVM_DIR}/lib/CodeGen/RegAllocGreedy.cpp
680 ${LLVM_DIR}/lib/CodeGen/RegUsageInfoCollector.cpp
681 ${LLVM_DIR}/lib/CodeGen/RegUsageInfoPropagate.cpp
682 ${LLVM_DIR}/lib/CodeGen/RegisterClassInfo.cpp
683 ${LLVM_DIR}/lib/CodeGen/RegisterCoalescer.cpp
684 ${LLVM_DIR}/lib/CodeGen/RegisterPressure.cpp
685 ${LLVM_DIR}/lib/CodeGen/RegisterScavenging.cpp
686 ${LLVM_DIR}/lib/CodeGen/RegisterUsageInfo.cpp
687 ${LLVM_DIR}/lib/CodeGen/RenameIndependentSubregs.cpp
688 ${LLVM_DIR}/lib/CodeGen/ResetMachineFunctionPass.cpp
689 ${LLVM_DIR}/lib/CodeGen/SafeStack.cpp
690 ${LLVM_DIR}/lib/CodeGen/SafeStackColoring.cpp
691 ${LLVM_DIR}/lib/CodeGen/SafeStackLayout.cpp
692 ${LLVM_DIR}/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
693 ${LLVM_DIR}/lib/CodeGen/ScheduleDAG.cpp
694 ${LLVM_DIR}/lib/CodeGen/ScheduleDAGInstrs.cpp
695 ${LLVM_DIR}/lib/CodeGen/ScheduleDAGPrinter.cpp
696 ${LLVM_DIR}/lib/CodeGen/ScoreboardHazardRecognizer.cpp
697 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
698 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/FastISel.cpp
699 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
700 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
701 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
702 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
703 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
704 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
705 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
706 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
707 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
708 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
709 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
710 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
711 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp
712 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
713 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
714 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
715 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
716 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
717 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
718 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/SelectionDAGTargetInfo.cpp
719 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
720 ${LLVM_DIR}/lib/CodeGen/SelectionDAG/TargetLowering.cpp
721 ${LLVM_DIR}/lib/CodeGen/ShadowStackGCLowering.cpp
722 ${LLVM_DIR}/lib/CodeGen/ShrinkWrap.cpp
723 ${LLVM_DIR}/lib/CodeGen/SjLjEHPrepare.cpp
724 ${LLVM_DIR}/lib/CodeGen/SlotIndexes.cpp
725 ${LLVM_DIR}/lib/CodeGen/SpillPlacement.cpp
726 ${LLVM_DIR}/lib/CodeGen/SplitKit.cpp
727 ${LLVM_DIR}/lib/CodeGen/StackColoring.cpp
728 ${LLVM_DIR}/lib/CodeGen/StackMapLivenessAnalysis.cpp
729 ${LLVM_DIR}/lib/CodeGen/StackMaps.cpp
730 ${LLVM_DIR}/lib/CodeGen/StackProtector.cpp
731 ${LLVM_DIR}/lib/CodeGen/StackSlotColoring.cpp
732 ${LLVM_DIR}/lib/CodeGen/TailDuplication.cpp
733 ${LLVM_DIR}/lib/CodeGen/TailDuplicator.cpp
734 ${LLVM_DIR}/lib/CodeGen/TargetFrameLoweringImpl.cpp
735 ${LLVM_DIR}/lib/CodeGen/TargetInstrInfo.cpp
736 ${LLVM_DIR}/lib/CodeGen/TargetLoweringBase.cpp
737 ${LLVM_DIR}/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
738 ${LLVM_DIR}/lib/CodeGen/TargetOptionsImpl.cpp
739 ${LLVM_DIR}/lib/CodeGen/TargetPassConfig.cpp
740 ${LLVM_DIR}/lib/CodeGen/TargetRegisterInfo.cpp
741 ${LLVM_DIR}/lib/CodeGen/TargetSchedule.cpp
742 ${LLVM_DIR}/lib/CodeGen/TargetSubtargetInfo.cpp
743 ${LLVM_DIR}/lib/CodeGen/TwoAddressInstructionPass.cpp
744 ${LLVM_DIR}/lib/CodeGen/UnreachableBlockElim.cpp
745 ${LLVM_DIR}/lib/CodeGen/ValueTypes.cpp
746 ${LLVM_DIR}/lib/CodeGen/VirtRegMap.cpp
747 ${LLVM_DIR}/lib/CodeGen/WasmEHPrepare.cpp
748 ${LLVM_DIR}/lib/CodeGen/WinEHPrepare.cpp
749 ${LLVM_DIR}/lib/CodeGen/XRayInstrumentation.cpp
750 ${LLVM_DIR}/lib/DebugInfo/CodeView/CVTypeVisitor.cpp
751 ${LLVM_DIR}/lib/DebugInfo/CodeView/CodeViewError.cpp
752 ${LLVM_DIR}/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
753 ${LLVM_DIR}/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp
754 ${LLVM_DIR}/lib/DebugInfo/CodeView/Formatters.cpp
755 ${LLVM_DIR}/lib/DebugInfo/CodeView/GlobalTypeTableBuilder.cpp
756 ${LLVM_DIR}/lib/DebugInfo/CodeView/Line.cpp
757 ${LLVM_DIR}/lib/DebugInfo/CodeView/RecordName.cpp
758 ${LLVM_DIR}/lib/DebugInfo/CodeView/RecordSerialization.cpp
759 ${LLVM_DIR}/lib/DebugInfo/CodeView/SimpleTypeSerializer.cpp
760 ${LLVM_DIR}/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp
761 ${LLVM_DIR}/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp
762 ${LLVM_DIR}/lib/DebugInfo/CodeView/TypeHashing.cpp
763 ${LLVM_DIR}/lib/DebugInfo/CodeView/TypeIndex.cpp
764 ${LLVM_DIR}/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp
765 ${LLVM_DIR}/lib/DebugInfo/CodeView/TypeRecordMapping.cpp
766 ${LLVM_DIR}/lib/DebugInfo/CodeView/TypeTableCollection.cpp
767 ${LLVM_DIR}/lib/ExecutionEngine/ExecutionEngine.cpp
768 ${LLVM_DIR}/lib/ExecutionEngine/GDBRegistrationListener.cpp
769 ${LLVM_DIR}/lib/ExecutionEngine/Orc/Core.cpp
770 ${LLVM_DIR}/lib/ExecutionEngine/Orc/Legacy.cpp
771 ${LLVM_DIR}/lib/ExecutionEngine/Orc/OrcError.cpp
772 ${LLVM_DIR}/lib/ExecutionEngine/RuntimeDyld/JITSymbol.cpp
773 ${LLVM_DIR}/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp
774 ${LLVM_DIR}/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
775 ${LLVM_DIR}/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp
776 ${LLVM_DIR}/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
777 ${LLVM_DIR}/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
778 ${LLVM_DIR}/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
779 ${LLVM_DIR}/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldELFMips.cpp
780 ${LLVM_DIR}/lib/ExecutionEngine/SectionMemoryManager.cpp
781 ${LLVM_DIR}/lib/ExecutionEngine/TargetSelect.cpp
782 ${LLVM_DIR}/lib/IR/AsmWriter.cpp
783 ${LLVM_DIR}/lib/IR/Attributes.cpp
784 ${LLVM_DIR}/lib/IR/AutoUpgrade.cpp
785 ${LLVM_DIR}/lib/IR/BasicBlock.cpp
786 ${LLVM_DIR}/lib/IR/Comdat.cpp
787 ${LLVM_DIR}/lib/IR/ConstantFold.cpp
788 ${LLVM_DIR}/lib/IR/ConstantRange.cpp
789 ${LLVM_DIR}/lib/IR/Constants.cpp
790 ${LLVM_DIR}/lib/IR/DIBuilder.cpp
791 ${LLVM_DIR}/lib/IR/DataLayout.cpp
792 ${LLVM_DIR}/lib/IR/DebugInfo.cpp
793 ${LLVM_DIR}/lib/IR/DebugInfoMetadata.cpp
794 ${LLVM_DIR}/lib/IR/DebugLoc.cpp
795 ${LLVM_DIR}/lib/IR/DiagnosticHandler.cpp
796 ${LLVM_DIR}/lib/IR/DiagnosticInfo.cpp
797 ${LLVM_DIR}/lib/IR/DiagnosticPrinter.cpp
798 ${LLVM_DIR}/lib/IR/Dominators.cpp
799 ${LLVM_DIR}/lib/IR/Function.cpp
800 ${LLVM_DIR}/lib/IR/GVMaterializer.cpp
801 ${LLVM_DIR}/lib/IR/Globals.cpp
802 ${LLVM_DIR}/lib/IR/IRBuilder.cpp
803 ${LLVM_DIR}/lib/IR/IRPrintingPasses.cpp
804 ${LLVM_DIR}/lib/IR/InlineAsm.cpp
805 ${LLVM_DIR}/lib/IR/Instruction.cpp
806 ${LLVM_DIR}/lib/IR/Instructions.cpp
807 ${LLVM_DIR}/lib/IR/IntrinsicInst.cpp
808 ${LLVM_DIR}/lib/IR/LLVMContext.cpp
809 ${LLVM_DIR}/lib/IR/LLVMContextImpl.cpp
810 ${LLVM_DIR}/lib/IR/LegacyPassManager.cpp
811 ${LLVM_DIR}/lib/IR/MDBuilder.cpp
812 ${LLVM_DIR}/lib/IR/Mangler.cpp
813 ${LLVM_DIR}/lib/IR/Metadata.cpp
814 ${LLVM_DIR}/lib/IR/Module.cpp
815 ${LLVM_DIR}/lib/IR/Operator.cpp
816 ${LLVM_DIR}/lib/IR/OptBisect.cpp
817 ${LLVM_DIR}/lib/IR/Pass.cpp
818 ${LLVM_DIR}/lib/IR/PassManager.cpp
819 ${LLVM_DIR}/lib/IR/PassRegistry.cpp
820 ${LLVM_DIR}/lib/IR/ProfileSummary.cpp
821 ${LLVM_DIR}/lib/IR/Statepoint.cpp
822 ${LLVM_DIR}/lib/IR/Type.cpp
823 ${LLVM_DIR}/lib/IR/TypeFinder.cpp
824 ${LLVM_DIR}/lib/IR/Use.cpp
825 ${LLVM_DIR}/lib/IR/User.cpp
826 ${LLVM_DIR}/lib/IR/Value.cpp
827 ${LLVM_DIR}/lib/IR/ValueSymbolTable.cpp
828 ${LLVM_DIR}/lib/IR/Verifier.cpp
829 ${LLVM_DIR}/lib/MC/ELFObjectWriter.cpp
830 ${LLVM_DIR}/lib/MC/MCAsmBackend.cpp
831 ${LLVM_DIR}/lib/MC/MCAsmInfo.cpp
832 ${LLVM_DIR}/lib/MC/MCAsmInfoCOFF.cpp
833 ${LLVM_DIR}/lib/MC/MCAsmInfoDarwin.cpp
834 ${LLVM_DIR}/lib/MC/MCAsmInfoELF.cpp
835 ${LLVM_DIR}/lib/MC/MCAsmMacro.cpp
836 ${LLVM_DIR}/lib/MC/MCAsmStreamer.cpp
837 ${LLVM_DIR}/lib/MC/MCAssembler.cpp
838 ${LLVM_DIR}/lib/MC/MCCodeEmitter.cpp
839 ${LLVM_DIR}/lib/MC/MCCodePadder.cpp
840 ${LLVM_DIR}/lib/MC/MCCodeView.cpp
841 ${LLVM_DIR}/lib/MC/MCContext.cpp
842 ${LLVM_DIR}/lib/MC/MCDisassembler/MCRelocationInfo.cpp
843 ${LLVM_DIR}/lib/MC/MCDwarf.cpp
844 ${LLVM_DIR}/lib/MC/MCELFObjectTargetWriter.cpp
845 ${LLVM_DIR}/lib/MC/MCELFStreamer.cpp
846 ${LLVM_DIR}/lib/MC/MCExpr.cpp
847 ${LLVM_DIR}/lib/MC/MCFragment.cpp
848 ${LLVM_DIR}/lib/MC/MCInst.cpp
849 ${LLVM_DIR}/lib/MC/MCInstPrinter.cpp
850 ${LLVM_DIR}/lib/MC/MCInstrAnalysis.cpp
851 ${LLVM_DIR}/lib/MC/MCInstrDesc.cpp
852 ${LLVM_DIR}/lib/MC/MCLinkerOptimizationHint.cpp
853 ${LLVM_DIR}/lib/MC/MCMachOStreamer.cpp
854 ${LLVM_DIR}/lib/MC/MCMachObjectTargetWriter.cpp
855 ${LLVM_DIR}/lib/MC/MCNullStreamer.cpp
856 ${LLVM_DIR}/lib/MC/MCObjectFileInfo.cpp
857 ${LLVM_DIR}/lib/MC/MCObjectStreamer.cpp
858 ${LLVM_DIR}/lib/MC/MCObjectWriter.cpp
859 ${LLVM_DIR}/lib/MC/MCParser/AsmLexer.cpp
860 ${LLVM_DIR}/lib/MC/MCParser/AsmParser.cpp
861 ${LLVM_DIR}/lib/MC/MCParser/COFFAsmParser.cpp
862 ${LLVM_DIR}/lib/MC/MCParser/DarwinAsmParser.cpp
863 ${LLVM_DIR}/lib/MC/MCParser/ELFAsmParser.cpp
864 ${LLVM_DIR}/lib/MC/MCParser/MCAsmLexer.cpp
865 ${LLVM_DIR}/lib/MC/MCParser/MCAsmParser.cpp
866 ${LLVM_DIR}/lib/MC/MCParser/MCAsmParserExtension.cpp
867 ${LLVM_DIR}/lib/MC/MCParser/MCTargetAsmParser.cpp
868 ${LLVM_DIR}/lib/MC/MCRegisterInfo.cpp
869 ${LLVM_DIR}/lib/MC/MCSchedule.cpp
870 ${LLVM_DIR}/lib/MC/MCSection.cpp
871 ${LLVM_DIR}/lib/MC/MCSectionCOFF.cpp
872 ${LLVM_DIR}/lib/MC/MCSectionELF.cpp
873 ${LLVM_DIR}/lib/MC/MCSectionMachO.cpp
874 ${LLVM_DIR}/lib/MC/MCSectionWasm.cpp
875 ${LLVM_DIR}/lib/MC/MCStreamer.cpp
876 ${LLVM_DIR}/lib/MC/MCSubtargetInfo.cpp
877 ${LLVM_DIR}/lib/MC/MCSymbol.cpp
878 ${LLVM_DIR}/lib/MC/MCSymbolELF.cpp
879 ${LLVM_DIR}/lib/MC/MCTargetOptions.cpp
880 ${LLVM_DIR}/lib/MC/MCValue.cpp
881 ${LLVM_DIR}/lib/MC/MCWasmStreamer.cpp
882 ${LLVM_DIR}/lib/MC/MCWin64EH.cpp
883 ${LLVM_DIR}/lib/MC/MCWinCOFFStreamer.cpp
884 ${LLVM_DIR}/lib/MC/MCWinEH.cpp
885 ${LLVM_DIR}/lib/MC/MachObjectWriter.cpp
886 ${LLVM_DIR}/lib/MC/StringTableBuilder.cpp
887 ${LLVM_DIR}/lib/MC/SubtargetFeature.cpp
888 ${LLVM_DIR}/lib/MC/WasmObjectWriter.cpp
889 ${LLVM_DIR}/lib/MC/WinCOFFObjectWriter.cpp
890 ${LLVM_DIR}/lib/Object/Archive.cpp
891 ${LLVM_DIR}/lib/Object/Binary.cpp
892 ${LLVM_DIR}/lib/Object/COFFObjectFile.cpp
893 ${LLVM_DIR}/lib/Object/ELF.cpp
894 ${LLVM_DIR}/lib/Object/ELFObjectFile.cpp
895 ${LLVM_DIR}/lib/Object/Error.cpp
896 ${LLVM_DIR}/lib/Object/IRObjectFile.cpp
897 ${LLVM_DIR}/lib/Object/IRSymtab.cpp
898 ${LLVM_DIR}/lib/Object/MachOObjectFile.cpp
899 ${LLVM_DIR}/lib/Object/MachOUniversal.cpp
900 ${LLVM_DIR}/lib/Object/ModuleSymbolTable.cpp
901 ${LLVM_DIR}/lib/Object/ObjectFile.cpp
902 ${LLVM_DIR}/lib/Object/RecordStreamer.cpp
903 ${LLVM_DIR}/lib/Object/SymbolicFile.cpp
904 ${LLVM_DIR}/lib/Object/WasmObjectFile.cpp
905 ${LLVM_DIR}/lib/Object/WindowsResource.cpp
906 ${LLVM_DIR}/lib/ProfileData/InstrProf.cpp
907 ${LLVM_DIR}/lib/Support/APFloat.cpp
908 ${LLVM_DIR}/lib/Support/APInt.cpp
Nicolas Capens8c7da802019-04-29 11:52:35 -0400909 ${LLVM_DIR}/lib/Support/APSInt.cpp
Nicolas Capens9ac24a92019-04-29 10:45:56 -0400910 ${LLVM_DIR}/lib/Support/ARMAttributeParser.cpp
911 ${LLVM_DIR}/lib/Support/ARMBuildAttrs.cpp
912 ${LLVM_DIR}/lib/Support/BinaryStreamError.cpp
913 ${LLVM_DIR}/lib/Support/BinaryStreamReader.cpp
914 ${LLVM_DIR}/lib/Support/BinaryStreamRef.cpp
915 ${LLVM_DIR}/lib/Support/BinaryStreamWriter.cpp
916 ${LLVM_DIR}/lib/Support/BlockFrequency.cpp
917 ${LLVM_DIR}/lib/Support/BranchProbability.cpp
918 ${LLVM_DIR}/lib/Support/Chrono.cpp
919 ${LLVM_DIR}/lib/Support/CodeGenCoverage.cpp
920 ${LLVM_DIR}/lib/Support/CommandLine.cpp
921 ${LLVM_DIR}/lib/Support/Compression.cpp
922 ${LLVM_DIR}/lib/Support/ConvertUTF.cpp
923 ${LLVM_DIR}/lib/Support/ConvertUTFWrapper.cpp
924 ${LLVM_DIR}/lib/Support/DJB.cpp
925 ${LLVM_DIR}/lib/Support/DataExtractor.cpp
926 ${LLVM_DIR}/lib/Support/Debug.cpp
927 ${LLVM_DIR}/lib/Support/DebugCounter.cpp
928 ${LLVM_DIR}/lib/Support/DynamicLibrary.cpp
929 ${LLVM_DIR}/lib/Support/Errno.cpp
930 ${LLVM_DIR}/lib/Support/Error.cpp
931 ${LLVM_DIR}/lib/Support/ErrorHandling.cpp
932 ${LLVM_DIR}/lib/Support/FoldingSet.cpp
933 ${LLVM_DIR}/lib/Support/FormatVariadic.cpp
934 ${LLVM_DIR}/lib/Support/FormattedStream.cpp
935 ${LLVM_DIR}/lib/Support/GraphWriter.cpp
936 ${LLVM_DIR}/lib/Support/Hashing.cpp
937 ${LLVM_DIR}/lib/Support/Host.cpp
938 ${LLVM_DIR}/lib/Support/IntEqClasses.cpp
939 ${LLVM_DIR}/lib/Support/IntervalMap.cpp
940 ${LLVM_DIR}/lib/Support/JamCRC.cpp
941 ${LLVM_DIR}/lib/Support/KnownBits.cpp
942 ${LLVM_DIR}/lib/Support/LEB128.cpp
943 ${LLVM_DIR}/lib/Support/LineIterator.cpp
944 ${LLVM_DIR}/lib/Support/Locale.cpp
945 ${LLVM_DIR}/lib/Support/LowLevelType.cpp
946 ${LLVM_DIR}/lib/Support/MD5.cpp
947 ${LLVM_DIR}/lib/Support/ManagedStatic.cpp
948 ${LLVM_DIR}/lib/Support/MathExtras.cpp
949 ${LLVM_DIR}/lib/Support/Memory.cpp
950 ${LLVM_DIR}/lib/Support/MemoryBuffer.cpp
951 ${LLVM_DIR}/lib/Support/Mutex.cpp
952 ${LLVM_DIR}/lib/Support/NativeFormatting.cpp
953 ${LLVM_DIR}/lib/Support/Path.cpp
954 ${LLVM_DIR}/lib/Support/PrettyStackTrace.cpp
955 ${LLVM_DIR}/lib/Support/Process.cpp
956 ${LLVM_DIR}/lib/Support/Program.cpp
957 ${LLVM_DIR}/lib/Support/RWMutex.cpp
958 ${LLVM_DIR}/lib/Support/RandomNumberGenerator.cpp
959 ${LLVM_DIR}/lib/Support/Regex.cpp
960 ${LLVM_DIR}/lib/Support/SHA1.cpp
961 ${LLVM_DIR}/lib/Support/ScaledNumber.cpp
962 ${LLVM_DIR}/lib/Support/ScopedPrinter.cpp
963 ${LLVM_DIR}/lib/Support/Signals.cpp
964 ${LLVM_DIR}/lib/Support/SmallPtrSet.cpp
965 ${LLVM_DIR}/lib/Support/SmallVector.cpp
966 ${LLVM_DIR}/lib/Support/SourceMgr.cpp
967 ${LLVM_DIR}/lib/Support/Statistic.cpp
968 ${LLVM_DIR}/lib/Support/StringExtras.cpp
969 ${LLVM_DIR}/lib/Support/StringMap.cpp
970 ${LLVM_DIR}/lib/Support/StringRef.cpp
971 ${LLVM_DIR}/lib/Support/StringSaver.cpp
972 ${LLVM_DIR}/lib/Support/TargetParser.cpp
973 ${LLVM_DIR}/lib/Support/TargetRegistry.cpp
974 ${LLVM_DIR}/lib/Support/Threading.cpp
975 ${LLVM_DIR}/lib/Support/Timer.cpp
976 ${LLVM_DIR}/lib/Support/ToolOutputFile.cpp
977 ${LLVM_DIR}/lib/Support/Triple.cpp
978 ${LLVM_DIR}/lib/Support/Twine.cpp
979 ${LLVM_DIR}/lib/Support/Unicode.cpp
980 ${LLVM_DIR}/lib/Support/UnicodeCaseFold.cpp
981 ${LLVM_DIR}/lib/Support/Valgrind.cpp
982 ${LLVM_DIR}/lib/Support/YAMLParser.cpp
983 ${LLVM_DIR}/lib/Support/YAMLTraits.cpp
984 ${LLVM_DIR}/lib/Support/circular_raw_ostream.cpp
985 ${LLVM_DIR}/lib/Support/raw_ostream.cpp
986 ${LLVM_DIR}/lib/Support/regcomp.c
987 ${LLVM_DIR}/lib/Support/regerror.c
988 ${LLVM_DIR}/lib/Support/regexec.c
989 ${LLVM_DIR}/lib/Support/regfree.c
990 ${LLVM_DIR}/lib/Support/regstrlcpy.c
991 ${LLVM_DIR}/lib/Target/TargetLoweringObjectFile.cpp
992 ${LLVM_DIR}/lib/Target/TargetMachine.cpp
Ben Clayton1c82c7b2019-04-30 12:49:27 +0100993 ${LLVM_DIR}/lib/Transforms/Coroutines/CoroCleanup.cpp
994 ${LLVM_DIR}/lib/Transforms/Coroutines/CoroEarly.cpp
995 ${LLVM_DIR}/lib/Transforms/Coroutines/CoroElide.cpp
996 ${LLVM_DIR}/lib/Transforms/Coroutines/CoroFrame.cpp
997 ${LLVM_DIR}/lib/Transforms/Coroutines/CoroSplit.cpp
998 ${LLVM_DIR}/lib/Transforms/Coroutines/Coroutines.cpp
Nicolas Capens9ac24a92019-04-29 10:45:56 -0400999 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineAddSub.cpp
1000 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
1001 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineCalls.cpp
1002 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineCasts.cpp
1003 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineCompares.cpp
1004 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
1005 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
1006 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombinePHI.cpp
1007 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineSelect.cpp
1008 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineShifts.cpp
1009 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
1010 ${LLVM_DIR}/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
1011 ${LLVM_DIR}/lib/Transforms/InstCombine/InstructionCombining.cpp
Ben Clayton1c82c7b2019-04-30 12:49:27 +01001012 ${LLVM_DIR}/lib/Transforms/IPO/BarrierNoopPass.cpp
Nicolas Capens9ac24a92019-04-29 10:45:56 -04001013 ${LLVM_DIR}/lib/Transforms/Scalar/ADCE.cpp
1014 ${LLVM_DIR}/lib/Transforms/Scalar/ConstantHoisting.cpp
1015 ${LLVM_DIR}/lib/Transforms/Scalar/DeadStoreElimination.cpp
Ben Clayton1c82c7b2019-04-30 12:49:27 +01001016 ${LLVM_DIR}/lib/Transforms/Scalar/EarlyCSE.cpp
Nicolas Capens9ac24a92019-04-29 10:45:56 -04001017 ${LLVM_DIR}/lib/Transforms/Scalar/GVN.cpp
1018 ${LLVM_DIR}/lib/Transforms/Scalar/LICM.cpp
1019 ${LLVM_DIR}/lib/Transforms/Scalar/LoopStrengthReduce.cpp
1020 ${LLVM_DIR}/lib/Transforms/Scalar/MergeICmps.cpp
1021 ${LLVM_DIR}/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
1022 ${LLVM_DIR}/lib/Transforms/Scalar/Reassociate.cpp
1023 ${LLVM_DIR}/lib/Transforms/Scalar/SCCP.cpp
1024 ${LLVM_DIR}/lib/Transforms/Scalar/SROA.cpp
1025 ${LLVM_DIR}/lib/Transforms/Scalar/SimplifyCFGPass.cpp
1026 ${LLVM_DIR}/lib/Transforms/Utils/BasicBlockUtils.cpp
1027 ${LLVM_DIR}/lib/Transforms/Utils/BreakCriticalEdges.cpp
1028 ${LLVM_DIR}/lib/Transforms/Utils/BuildLibCalls.cpp
1029 ${LLVM_DIR}/lib/Transforms/Utils/BypassSlowDivision.cpp
1030 ${LLVM_DIR}/lib/Transforms/Utils/CloneFunction.cpp
1031 ${LLVM_DIR}/lib/Transforms/Utils/DemoteRegToStack.cpp
1032 ${LLVM_DIR}/lib/Transforms/Utils/EntryExitInstrumenter.cpp
1033 ${LLVM_DIR}/lib/Transforms/Utils/EscapeEnumerator.cpp
1034 ${LLVM_DIR}/lib/Transforms/Utils/InlineFunction.cpp
1035 ${LLVM_DIR}/lib/Transforms/Utils/LCSSA.cpp
1036 ${LLVM_DIR}/lib/Transforms/Utils/Local.cpp
1037 ${LLVM_DIR}/lib/Transforms/Utils/LoopSimplify.cpp
1038 ${LLVM_DIR}/lib/Transforms/Utils/LoopUtils.cpp
1039 ${LLVM_DIR}/lib/Transforms/Utils/LowerInvoke.cpp
1040 ${LLVM_DIR}/lib/Transforms/Utils/OrderedInstructions.cpp
1041 ${LLVM_DIR}/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
1042 ${LLVM_DIR}/lib/Transforms/Utils/SSAUpdater.cpp
1043 ${LLVM_DIR}/lib/Transforms/Utils/SimplifyCFG.cpp
1044 ${LLVM_DIR}/lib/Transforms/Utils/SimplifyLibCalls.cpp
1045 ${LLVM_DIR}/lib/Transforms/Utils/SymbolRewriter.cpp
1046 ${LLVM_DIR}/lib/Transforms/Utils/VNCoercion.cpp
1047 ${LLVM_DIR}/lib/Transforms/Utils/ValueMapper.cpp
Ben Clayton1c82c7b2019-04-30 12:49:27 +01001048 ${LLVM_DIR}/../stubs/Stubs.cpp
Logan Chien0eedc8c2018-08-21 09:34:28 +08001049)
1050
Nicolas Capens7d0b8a32018-10-30 16:36:52 -04001051if(ARCH STREQUAL "x86" OR ARCH STREQUAL "x86_64")
1052 list(APPEND LLVM_LIST
1053 ${LLVM_DIR}/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp
1054 ${LLVM_DIR}/lib/Target/X86/AsmParser/X86AsmParser.cpp
1055 ${LLVM_DIR}/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
1056 ${LLVM_DIR}/lib/Target/X86/InstPrinter/X86InstComments.cpp
1057 ${LLVM_DIR}/lib/Target/X86/InstPrinter/X86InstPrinterCommon.cpp
1058 ${LLVM_DIR}/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
1059 ${LLVM_DIR}/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
1060 ${LLVM_DIR}/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
1061 ${LLVM_DIR}/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
1062 ${LLVM_DIR}/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
1063 ${LLVM_DIR}/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
1064 ${LLVM_DIR}/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp
1065 ${LLVM_DIR}/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp
1066 ${LLVM_DIR}/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp
1067 ${LLVM_DIR}/lib/Target/X86/MCTargetDesc/X86WinCOFFTargetStreamer.cpp
1068 ${LLVM_DIR}/lib/Target/X86/ShadowCallStack.cpp
1069 ${LLVM_DIR}/lib/Target/X86/TargetInfo/X86TargetInfo.cpp
1070 ${LLVM_DIR}/lib/Target/X86/Utils/X86ShuffleDecode.cpp
1071 ${LLVM_DIR}/lib/Target/X86/X86AsmPrinter.cpp
1072 ${LLVM_DIR}/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp
1073 ${LLVM_DIR}/lib/Target/X86/X86CallFrameOptimization.cpp
1074 ${LLVM_DIR}/lib/Target/X86/X86CallLowering.cpp
1075 ${LLVM_DIR}/lib/Target/X86/X86CallingConv.cpp
1076 ${LLVM_DIR}/lib/Target/X86/X86CmovConversion.cpp
1077 ${LLVM_DIR}/lib/Target/X86/X86DomainReassignment.cpp
1078 ${LLVM_DIR}/lib/Target/X86/X86EvexToVex.cpp
1079 ${LLVM_DIR}/lib/Target/X86/X86ExpandPseudo.cpp
1080 ${LLVM_DIR}/lib/Target/X86/X86FastISel.cpp
1081 ${LLVM_DIR}/lib/Target/X86/X86FixupBWInsts.cpp
1082 ${LLVM_DIR}/lib/Target/X86/X86FixupLEAs.cpp
1083 ${LLVM_DIR}/lib/Target/X86/X86FixupSetCC.cpp
1084 ${LLVM_DIR}/lib/Target/X86/X86FlagsCopyLowering.cpp
1085 ${LLVM_DIR}/lib/Target/X86/X86FloatingPoint.cpp
1086 ${LLVM_DIR}/lib/Target/X86/X86FrameLowering.cpp
1087 ${LLVM_DIR}/lib/Target/X86/X86ISelDAGToDAG.cpp
1088 ${LLVM_DIR}/lib/Target/X86/X86ISelLowering.cpp
1089 ${LLVM_DIR}/lib/Target/X86/X86IndirectBranchTracking.cpp
1090 ${LLVM_DIR}/lib/Target/X86/X86InstrFMA3Info.cpp
1091 ${LLVM_DIR}/lib/Target/X86/X86InstrFoldTables.cpp
1092 ${LLVM_DIR}/lib/Target/X86/X86InstrInfo.cpp
1093 ${LLVM_DIR}/lib/Target/X86/X86InstructionSelector.cpp
1094 ${LLVM_DIR}/lib/Target/X86/X86InterleavedAccess.cpp
1095 ${LLVM_DIR}/lib/Target/X86/X86LegalizerInfo.cpp
1096 ${LLVM_DIR}/lib/Target/X86/X86MCInstLower.cpp
1097 ${LLVM_DIR}/lib/Target/X86/X86MachineFunctionInfo.cpp
1098 ${LLVM_DIR}/lib/Target/X86/X86MacroFusion.cpp
1099 ${LLVM_DIR}/lib/Target/X86/X86OptimizeLEAs.cpp
1100 ${LLVM_DIR}/lib/Target/X86/X86PadShortFunction.cpp
1101 ${LLVM_DIR}/lib/Target/X86/X86RegisterBankInfo.cpp
1102 ${LLVM_DIR}/lib/Target/X86/X86RegisterInfo.cpp
1103 ${LLVM_DIR}/lib/Target/X86/X86RetpolineThunks.cpp
1104 ${LLVM_DIR}/lib/Target/X86/X86SelectionDAGInfo.cpp
1105 ${LLVM_DIR}/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
1106 ${LLVM_DIR}/lib/Target/X86/X86SpeculativeLoadHardening.cpp
1107 ${LLVM_DIR}/lib/Target/X86/X86Subtarget.cpp
1108 ${LLVM_DIR}/lib/Target/X86/X86TargetMachine.cpp
1109 ${LLVM_DIR}/lib/Target/X86/X86TargetObjectFile.cpp
1110 ${LLVM_DIR}/lib/Target/X86/X86TargetTransformInfo.cpp
1111 ${LLVM_DIR}/lib/Target/X86/X86VZeroUpper.cpp
1112 ${LLVM_DIR}/lib/Target/X86/X86WinAllocaExpander.cpp
1113 ${LLVM_DIR}/lib/Target/X86/X86WinEHState.cpp
1114 )
1115elseif(ARCH STREQUAL "mipsel" OR ARCH STREQUAL "mips64el")
1116 list(APPEND LLVM_LIST
1117 ${LLVM_DIR}/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
1118 ${LLVM_DIR}/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
1119 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.cpp
1120 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
1121 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
1122 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp
1123 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
1124 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
1125 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
1126 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp
1127 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
1128 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
1129 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp
1130 ${LLVM_DIR}/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp
1131 ${LLVM_DIR}/lib/Target/Mips/Mips16FrameLowering.cpp
1132 ${LLVM_DIR}/lib/Target/Mips/Mips16HardFloat.cpp
1133 ${LLVM_DIR}/lib/Target/Mips/Mips16HardFloatInfo.cpp
1134 ${LLVM_DIR}/lib/Target/Mips/Mips16InstrInfo.cpp
1135 ${LLVM_DIR}/lib/Target/Mips/Mips16ISelDAGToDAG.cpp
1136 ${LLVM_DIR}/lib/Target/Mips/Mips16ISelLowering.cpp
1137 ${LLVM_DIR}/lib/Target/Mips/Mips16RegisterInfo.cpp
1138 ${LLVM_DIR}/lib/Target/Mips/MipsAnalyzeImmediate.cpp
1139 ${LLVM_DIR}/lib/Target/Mips/MipsAsmPrinter.cpp
1140 ${LLVM_DIR}/lib/Target/Mips/MipsCallLowering.cpp
1141 ${LLVM_DIR}/lib/Target/Mips/MipsCCState.cpp
1142 ${LLVM_DIR}/lib/Target/Mips/MipsConstantIslandPass.cpp
1143 ${LLVM_DIR}/lib/Target/Mips/MipsDelaySlotFiller.cpp
1144 ${LLVM_DIR}/lib/Target/Mips/MipsExpandPseudo.cpp
1145 ${LLVM_DIR}/lib/Target/Mips/MipsFastISel.cpp
1146 ${LLVM_DIR}/lib/Target/Mips/MipsInstrInfo.cpp
1147 ${LLVM_DIR}/lib/Target/Mips/MipsInstructionSelector.cpp
1148 ${LLVM_DIR}/lib/Target/Mips/MipsISelDAGToDAG.cpp
1149 ${LLVM_DIR}/lib/Target/Mips/MipsISelLowering.cpp
1150 ${LLVM_DIR}/lib/Target/Mips/MipsFrameLowering.cpp
1151 ${LLVM_DIR}/lib/Target/Mips/MipsLegalizerInfo.cpp
1152 ${LLVM_DIR}/lib/Target/Mips/MipsBranchExpansion.cpp
1153 ${LLVM_DIR}/lib/Target/Mips/MipsMCInstLower.cpp
1154 ${LLVM_DIR}/lib/Target/Mips/MipsMachineFunction.cpp
1155 ${LLVM_DIR}/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp
1156 ${LLVM_DIR}/lib/Target/Mips/MipsOptimizePICCall.cpp
1157 ${LLVM_DIR}/lib/Target/Mips/MipsOs16.cpp
1158 ${LLVM_DIR}/lib/Target/Mips/MipsRegisterBankInfo.cpp
1159 ${LLVM_DIR}/lib/Target/Mips/MipsRegisterInfo.cpp
1160 ${LLVM_DIR}/lib/Target/Mips/MipsSEFrameLowering.cpp
1161 ${LLVM_DIR}/lib/Target/Mips/MipsSEInstrInfo.cpp
1162 ${LLVM_DIR}/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
1163 ${LLVM_DIR}/lib/Target/Mips/MipsSEISelLowering.cpp
1164 ${LLVM_DIR}/lib/Target/Mips/MipsSERegisterInfo.cpp
1165 ${LLVM_DIR}/lib/Target/Mips/MipsSubtarget.cpp
1166 ${LLVM_DIR}/lib/Target/Mips/MipsTargetMachine.cpp
1167 ${LLVM_DIR}/lib/Target/Mips/MipsTargetObjectFile.cpp
1168 ${LLVM_DIR}/lib/Target/Mips/MicroMipsSizeReduction.cpp
1169 ${LLVM_DIR}/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp
1170 )
1171elseif(ARCH STREQUAL "aarch64")
1172 list(APPEND LLVM_LIST
1173 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
1174 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
1175 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp
1176 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp
1177 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp
1178 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
1179 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
1180 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
1181 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp
1182 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
1183 ${LLVM_DIR}/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp
1184 ${LLVM_DIR}/lib/Target/AArch64/AArch64ISelLowering.cpp
1185 ${LLVM_DIR}/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
1186 ${LLVM_DIR}/lib/Target/AArch64/AArch64FastISel.cpp
1187 ${LLVM_DIR}/lib/Target/AArch64/AArch64InstrInfo.cpp
1188 ${LLVM_DIR}/lib/Target/AArch64/AArch64PromoteConstant.cpp
1189 ${LLVM_DIR}/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp
1190 ${LLVM_DIR}/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp
1191 ${LLVM_DIR}/lib/Target/AArch64/AArch64InstructionSelector.cpp
1192 ${LLVM_DIR}/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp
1193 ${LLVM_DIR}/lib/Target/AArch64/AArch64A53Fix835769.cpp
1194 ${LLVM_DIR}/lib/Target/AArch64/AArch64TargetMachine.cpp
1195 ${LLVM_DIR}/lib/Target/AArch64/AArch64CallLowering.cpp
1196 ${LLVM_DIR}/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp
1197 ${LLVM_DIR}/lib/Target/AArch64/AArch64Subtarget.cpp
1198 ${LLVM_DIR}/lib/Target/AArch64/AArch64TargetObjectFile.cpp
1199 ${LLVM_DIR}/lib/Target/AArch64/AArch64RegisterInfo.cpp
1200 ${LLVM_DIR}/lib/Target/AArch64/AArch64ConditionOptimizer.cpp
1201 ${LLVM_DIR}/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
1202 ${LLVM_DIR}/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp
1203 ${LLVM_DIR}/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp
1204 ${LLVM_DIR}/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp
1205 ${LLVM_DIR}/lib/Target/AArch64/AArch64ConditionalCompares.cpp
1206 ${LLVM_DIR}/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp
1207 ${LLVM_DIR}/lib/Target/AArch64/AArch64LegalizerInfo.cpp
1208 ${LLVM_DIR}/lib/Target/AArch64/AArch64StorePairSuppress.cpp
1209 ${LLVM_DIR}/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp
1210 ${LLVM_DIR}/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp
1211 ${LLVM_DIR}/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp
1212 ${LLVM_DIR}/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
1213 ${LLVM_DIR}/lib/Target/AArch64/AArch64MCInstLower.cpp
1214 ${LLVM_DIR}/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
1215 ${LLVM_DIR}/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp
1216 ${LLVM_DIR}/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp
1217 ${LLVM_DIR}/lib/Target/AArch64/AArch64CollectLOH.cpp
1218 ${LLVM_DIR}/lib/Target/AArch64/AArch64AsmPrinter.cpp
1219 ${LLVM_DIR}/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
1220 ${LLVM_DIR}/lib/Target/AArch64/AArch64RegisterBankInfo.cpp
1221 ${LLVM_DIR}/lib/Target/AArch64/AArch64CondBrTuning.cpp
1222 ${LLVM_DIR}/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
1223 ${LLVM_DIR}/lib/Target/AArch64/AArch64FrameLowering.cpp
1224 ${LLVM_DIR}/lib/Target/AArch64/AArch64MacroFusion.cpp
1225 )
1226elseif(ARCH STREQUAL "arm")
1227 list(APPEND LLVM_LIST
1228 ${LLVM_DIR}/lib/Target/ARM/ARMConstantIslandPass.cpp
1229 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp
1230 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp
1231 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
1232 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
1233 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp
1234 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMMachORelocationInfo.cpp
1235 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp
1236 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
1237 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
1238 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMWinCOFFStreamer.cpp
1239 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
1240 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
1241 ${LLVM_DIR}/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp
1242 ${LLVM_DIR}/lib/Target/ARM/ThumbRegisterInfo.cpp
1243 ${LLVM_DIR}/lib/Target/ARM/ARMMachineFunctionInfo.cpp
1244 ${LLVM_DIR}/lib/Target/ARM/ARMFrameLowering.cpp
1245 ${LLVM_DIR}/lib/Target/ARM/ARMBaseRegisterInfo.cpp
1246 ${LLVM_DIR}/lib/Target/ARM/ARMCallLowering.cpp
1247 ${LLVM_DIR}/lib/Target/ARM/ARMTargetMachine.cpp
1248 ${LLVM_DIR}/lib/Target/ARM/ARMBaseInstrInfo.cpp
1249 ${LLVM_DIR}/lib/Target/ARM/Thumb1FrameLowering.cpp
1250 ${LLVM_DIR}/lib/Target/ARM/ARMRegisterBankInfo.cpp
1251 ${LLVM_DIR}/lib/Target/ARM/Utils/ARMBaseInfo.cpp
1252 ${LLVM_DIR}/lib/Target/ARM/ARMComputeBlockSize.cpp
1253 ${LLVM_DIR}/lib/Target/ARM/ARMSelectionDAGInfo.cpp
1254 ${LLVM_DIR}/lib/Target/ARM/ARMInstructionSelector.cpp
1255 ${LLVM_DIR}/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
1256 ${LLVM_DIR}/lib/Target/ARM/ARMTargetObjectFile.cpp
1257 ${LLVM_DIR}/lib/Target/ARM/ARMISelLowering.cpp
1258 ${LLVM_DIR}/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
1259 ${LLVM_DIR}/lib/Target/ARM/ARMExpandPseudoInsts.cpp
1260 ${LLVM_DIR}/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp
1261 ${LLVM_DIR}/lib/Target/ARM/ARMInstrInfo.cpp
1262 ${LLVM_DIR}/lib/Target/ARM/MLxExpansionPass.cpp
1263 ${LLVM_DIR}/lib/Target/ARM/Thumb2SizeReduction.cpp
1264 ${LLVM_DIR}/lib/Target/ARM/ARMConstantPoolValue.cpp
1265 ${LLVM_DIR}/lib/Target/ARM/Thumb2InstrInfo.cpp
1266 ${LLVM_DIR}/lib/Target/ARM/ARMRegisterInfo.cpp
1267 ${LLVM_DIR}/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
1268 ${LLVM_DIR}/lib/Target/ARM/ARMSubtarget.cpp
1269 ${LLVM_DIR}/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
1270 ${LLVM_DIR}/lib/Target/ARM/ARMParallelDSP.cpp
1271 ${LLVM_DIR}/lib/Target/ARM/ARMISelDAGToDAG.cpp
1272 ${LLVM_DIR}/lib/Target/ARM/A15SDOptimizer.cpp
1273 ${LLVM_DIR}/lib/Target/ARM/Thumb2ITBlockPass.cpp
1274 ${LLVM_DIR}/lib/Target/ARM/ARMFastISel.cpp
1275 ${LLVM_DIR}/lib/Target/ARM/ARMMacroFusion.cpp
1276 ${LLVM_DIR}/lib/Target/ARM/ARMAsmPrinter.cpp
1277 ${LLVM_DIR}/lib/Target/ARM/ARMMCInstLower.cpp
1278 ${LLVM_DIR}/lib/Target/ARM/ARMHazardRecognizer.cpp
1279 ${LLVM_DIR}/lib/Target/ARM/ARMCodeGenPrepare.cpp
1280 ${LLVM_DIR}/lib/Target/ARM/ARMTargetTransformInfo.cpp
1281 ${LLVM_DIR}/lib/Target/ARM/Thumb1InstrInfo.cpp
1282 ${LLVM_DIR}/lib/Target/ARM/ARMLegalizerInfo.cpp
1283 ${LLVM_DIR}/lib/Target/ARM/ARMOptimizeBarriersPass.cpp
1284 )
Ben Claytonac07ed82019-03-26 14:17:41 +00001285endif()
1286
1287if(REACTOR_EMIT_DEBUG_INFO)
1288 list(APPEND LLVM_LIST
1289 ${LLVM_DIR}/lib/Demangle/ItaniumDemangle.cpp
1290 )
1291endif(REACTOR_EMIT_DEBUG_INFO)
Nicolas Capens7d0b8a32018-10-30 16:36:52 -04001292
Logan Chien0eedc8c2018-08-21 09:34:28 +08001293set(LLVM_INCLUDE_DIR "")
1294
1295if(WIN32)
Nicolas Capensd7a21cc2018-09-11 13:09:28 -04001296 list(APPEND LLVM_INCLUDE_DIR ${LLVM_CONFIG_DIR}/windows/include)
Logan Chien0eedc8c2018-08-21 09:34:28 +08001297elseif(LINUX)
1298 list(APPEND LLVM_INCLUDE_DIR ${LLVM_CONFIG_DIR}/linux/include)
Ben Claytonac07ed82019-03-26 14:17:41 +00001299 list(APPEND LIBBACKTRACE_INCLUDE_DIR ${LIBBACKTRACE_CONFIG_DIR}/linux/include)
Logan Chien0eedc8c2018-08-21 09:34:28 +08001300elseif(APPLE)
Nicolas Capens2337f062018-10-30 13:49:46 -04001301 list(APPEND LLVM_INCLUDE_DIR ${LLVM_CONFIG_DIR}/darwin/include)
Ben Claytonac07ed82019-03-26 14:17:41 +00001302 list(APPEND LIBBACKTRACE_INCLUDE_DIR ${LIBBACKTRACE_CONFIG_DIR}/darwin/include)
Stephen Whitee6ab01f2019-04-04 14:31:25 -04001303elseif(ANDROID)
1304 list(APPEND LLVM_INCLUDE_DIR ${LLVM_CONFIG_DIR}/android/include)
Ben Claytonac07ed82019-03-26 14:17:41 +00001305 list(APPEND LIBBACKTRACE_INCLUDE_DIR ${LIBBACKTRACE_CONFIG_DIR}/android/include)
Logan Chien0eedc8c2018-08-21 09:34:28 +08001306endif()
1307
1308list(APPEND LLVM_INCLUDE_DIR
1309 ${LLVM_DIR}/include
Logan Chien009fecb2018-08-21 15:14:16 +08001310 ${LLVM_DIR}/lib/Target/AArch64
1311 ${LLVM_DIR}/lib/Target/ARM
Gordana Cmiljanovic082dfec2018-10-19 11:36:15 +02001312 ${LLVM_DIR}/lib/Target/Mips
Logan Chien0eedc8c2018-08-21 09:34:28 +08001313 ${LLVM_DIR}/lib/Target/X86
1314 ${LLVM_CONFIG_DIR}/common/include
1315 ${LLVM_CONFIG_DIR}/common/lib/IR
Logan Chien009fecb2018-08-21 15:14:16 +08001316 ${LLVM_CONFIG_DIR}/common/lib/Target/AArch64
1317 ${LLVM_CONFIG_DIR}/common/lib/Target/ARM
Gordana Cmiljanovic082dfec2018-10-19 11:36:15 +02001318 ${LLVM_CONFIG_DIR}/common/lib/Target/Mips
Logan Chien0eedc8c2018-08-21 09:34:28 +08001319 ${LLVM_CONFIG_DIR}/common/lib/Target/X86
1320 ${LLVM_CONFIG_DIR}/common/lib/Transforms/InstCombine
1321)
1322
Ben Clayton81be8c62019-02-26 16:50:31 +00001323# Suppress known LLVM warnings
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001324set(LLVM_COMPILE_OPTIONS)
Ben Clayton81be8c62019-02-26 16:50:31 +00001325if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001326 list(APPEND LLVM_COMPILE_OPTIONS
Ben Clayton81be8c62019-02-26 16:50:31 +00001327 "-Wno-noexcept-type" # mangled name for ‘X’ will change in C++17 because the exception specification is part of a function type
1328 "-Wno-maybe-uninitialized" # ‘X’ may be used uninitialized in this function
1329 "-Wno-unused-but-set-variable" # variable ‘X’ set but not used
1330 )
Ben Claytonedd7d412019-04-14 08:41:27 -04001331elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
Antonio Maiorano5bce1f42019-05-10 16:03:49 -04001332 list(APPEND LLVM_COMPILE_OPTIONS
Ben Claytonedd7d412019-04-14 08:41:27 -04001333 "/wd4141" # 'inline': used more than once
1334 "/wd4146" # unary minus operator applied to unsigned type, result still unsigned
1335 "/wd4244" # 'X': conversion from 'uint64_t' to 'const unsigned int', possible loss of data
1336 "/wd4267" # 'X': conversion from 'size_t' to 'unsigned int', possible loss of data
1337 "/wd4291" # 'void X new(size_t,unsigned int,unsigned int)': no matching operator delete found; memory will not be freed if initialization throws an exception
1338 "/wd4319" # 'X': zero extending 'unsigned int' to 'uint64_t' of greater size
1339 "/wd4624" # 'X': destructor was implicitly defined as deleted
1340 "/wd4805" # 'X': unsafe mix of type 'unsigned int' and type 'bool' in operation
1341 "/wd4996" # 'X': Call to 'Y' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct.
1342 )
Ben Clayton81be8c62019-02-26 16:50:31 +00001343endif()
Ben Clayton81be8c62019-02-26 16:50:31 +00001344
Nicolas Capens5a105bc2015-12-22 22:04:28 -05001345add_library(llvm STATIC ${LLVM_LIST})
Corentin Wallez0866b292015-12-09 13:49:40 -05001346set_target_properties(llvm PROPERTIES
1347 POSITION_INDEPENDENT_CODE 1
1348 INCLUDE_DIRECTORIES "${LLVM_INCLUDE_DIR}"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001349 COMPILE_OPTIONS "${LLVM_COMPILE_OPTIONS}"
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001350 COMPILE_DEFINITIONS "__STDC_CONSTANT_MACROS; __STDC_LIMIT_MACROS;"
Corentin Wallez0866b292015-12-09 13:49:40 -05001351 FOLDER "LLVM"
1352)
1353
Ben Clayton8f71f732019-02-01 09:38:45 +00001354# Add required libraries for LLVM
1355if(LINUX)
1356 target_link_libraries(llvm dl)
1357endif(LINUX)
1358
Corentin Wallez0866b292015-12-09 13:49:40 -05001359###########################################################
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001360# Subzero
1361###########################################################
1362
Nicolas Capens26690ed2017-03-31 10:34:20 -04001363if(${REACTOR_BACKEND} STREQUAL "Subzero")
1364 set(SUBZERO_LIST
1365 ${SUBZERO_DIR}/src/IceAssembler.cpp
1366 ${SUBZERO_DIR}/src/IceCfg.cpp
1367 ${SUBZERO_DIR}/src/IceCfgNode.cpp
1368 ${SUBZERO_DIR}/src/IceClFlags.cpp
1369 ${SUBZERO_DIR}/src/IceELFObjectWriter.cpp
1370 ${SUBZERO_DIR}/src/IceELFSection.cpp
1371 ${SUBZERO_DIR}/src/IceFixups.cpp
1372 ${SUBZERO_DIR}/src/IceGlobalContext.cpp
1373 ${SUBZERO_DIR}/src/IceGlobalInits.cpp
1374 ${SUBZERO_DIR}/src/IceInst.cpp
1375 ${SUBZERO_DIR}/src/IceInstrumentation.cpp
1376 ${SUBZERO_DIR}/src/IceIntrinsics.cpp
1377 ${SUBZERO_DIR}/src/IceLiveness.cpp
1378 ${SUBZERO_DIR}/src/IceLoopAnalyzer.cpp
1379 ${SUBZERO_DIR}/src/IceMangling.cpp
1380 ${SUBZERO_DIR}/src/IceMemory.cpp
1381 ${SUBZERO_DIR}/src/IceOperand.cpp
1382 ${SUBZERO_DIR}/src/IceRangeSpec.cpp
1383 ${SUBZERO_DIR}/src/IceRegAlloc.cpp
1384 ${SUBZERO_DIR}/src/IceRevision.cpp
1385 ${SUBZERO_DIR}/src/IceRNG.cpp
1386 ${SUBZERO_DIR}/src/IceSwitchLowering.cpp
1387 ${SUBZERO_DIR}/src/IceTargetLowering.cpp
Nicolas Capens26690ed2017-03-31 10:34:20 -04001388 ${SUBZERO_DIR}/src/IceThreading.cpp
1389 ${SUBZERO_DIR}/src/IceTimerTree.cpp
1390 ${SUBZERO_DIR}/src/IceTypes.cpp
1391 ${SUBZERO_DIR}/src/IceVariableSplitting.cpp
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001392 )
Nicolas Capens26690ed2017-03-31 10:34:20 -04001393
Nicolas Capens75753f92018-10-02 15:01:30 -04001394 # FIXME: Shouldn't depend on external source files directly.
1395 list(APPEND SUBZERO_LIST
1396 ${SOURCE_DIR}/Common/Memory.cpp
1397 )
1398
Nicolas Capens30cd7d42017-04-25 15:17:25 -04001399 if(ARCH STREQUAL "x86_64")
Nicolas Capens26690ed2017-03-31 10:34:20 -04001400 list(APPEND SUBZERO_LIST
Nicolas Capens30cd7d42017-04-25 15:17:25 -04001401 ${SUBZERO_DIR}/src/IceTargetLoweringX86.cpp
Nicolas Capens26690ed2017-03-31 10:34:20 -04001402 ${SUBZERO_DIR}/src/IceInstX8664.cpp
1403 ${SUBZERO_DIR}/src/IceTargetLoweringX8664.cpp
1404 )
1405 set(SUBZERO_TARGET X8664)
Nicolas Capens30cd7d42017-04-25 15:17:25 -04001406 elseif(ARCH STREQUAL "x86")
Nicolas Capens26690ed2017-03-31 10:34:20 -04001407 list(APPEND SUBZERO_LIST
Nicolas Capens30cd7d42017-04-25 15:17:25 -04001408 ${SUBZERO_DIR}/src/IceTargetLoweringX86.cpp
Nicolas Capens26690ed2017-03-31 10:34:20 -04001409 ${SUBZERO_DIR}/src/IceInstX8632.cpp
1410 ${SUBZERO_DIR}/src/IceTargetLoweringX8632.cpp
1411 )
1412 set(SUBZERO_TARGET X8632)
Nicolas Capens30cd7d42017-04-25 15:17:25 -04001413 elseif(ARCH STREQUAL "arm")
1414 list(APPEND SUBZERO_LIST
1415 ${SUBZERO_DIR}/src/IceAssemblerARM32.cpp
1416 ${SUBZERO_DIR}/src/IceInstARM32.cpp
1417 ${SUBZERO_DIR}/src/IceTargetLoweringARM32.cpp
1418 )
1419 set(SUBZERO_TARGET ARM32)
Gordana Cmiljanovic082dfec2018-10-19 11:36:15 +02001420 elseif(ARCH STREQUAL "mipsel")
1421 list(APPEND SUBZERO_LIST
1422 ${SUBZERO_DIR}/src/IceAssemblerMIPS32.cpp
1423 ${SUBZERO_DIR}/src/IceInstMIPS32.cpp
1424 ${SUBZERO_DIR}/src/IceTargetLoweringMIPS32.cpp
1425 )
1426 set(SUBZERO_TARGET MIPS32)
Nicolas Capens30cd7d42017-04-25 15:17:25 -04001427 else()
1428 message(FATAL_ERROR "Architecture '${ARCH}' not supported by Subzero")
Nicolas Capens26690ed2017-03-31 10:34:20 -04001429 endif()
1430
1431 file(GLOB_RECURSE SUBZERO_DEPENDENCIES_LIST
1432 ${SUBZERO_LLVM_DIR}/*.cpp
1433 ${SUBZERO_LLVM_DIR}/*.c
1434 ${SUBZERO_LLVM_DIR}/*.h
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001435 )
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001436
Nicolas Capens26690ed2017-03-31 10:34:20 -04001437 set(SUBZERO_REACTOR_LIST
Nicolas Capensb6d4ce32019-03-12 23:00:24 -04001438 ${SOURCE_DIR}/Reactor/Reactor.cpp
Antonio Maioranof448d8e2019-04-26 16:19:16 -04001439 ${SOURCE_DIR}/Reactor/Reactor.hpp
Nicolas Capens26690ed2017-03-31 10:34:20 -04001440 ${SOURCE_DIR}/Reactor/SubzeroReactor.cpp
1441 ${SOURCE_DIR}/Reactor/Routine.cpp
1442 ${SOURCE_DIR}/Reactor/Optimizer.cpp
1443 ${SOURCE_DIR}/Reactor/Nucleus.hpp
1444 ${SOURCE_DIR}/Reactor/Routine.hpp
Nicolas Capensc07dc4b2018-08-06 14:20:45 -04001445 ${SOURCE_DIR}/Reactor/Debug.cpp
1446 ${SOURCE_DIR}/Reactor/Debug.hpp
Nicolas Capens1a3ce872018-10-10 10:42:36 -04001447 ${SOURCE_DIR}/Reactor/ExecutableMemory.cpp
1448 ${SOURCE_DIR}/Reactor/ExecutableMemory.hpp
Nicolas Capens26690ed2017-03-31 10:34:20 -04001449 )
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001450
Nicolas Capens26690ed2017-03-31 10:34:20 -04001451 set(SUBZERO_INCLUDE_DIR
1452 ${SUBZERO_DIR}/
1453 ${SUBZERO_LLVM_DIR}/include/
1454 ${SUBZERO_DIR}/pnacl-llvm/include/
Nicolas Capensc07dc4b2018-08-06 14:20:45 -04001455 )
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001456
Nicolas Capens26690ed2017-03-31 10:34:20 -04001457 if(WIN32)
1458 list(APPEND SUBZERO_INCLUDE_DIR ${SUBZERO_LLVM_DIR}/build/Windows/include/)
1459 elseif(LINUX)
1460 list(APPEND SUBZERO_INCLUDE_DIR ${SUBZERO_LLVM_DIR}/build/Linux/include/)
1461 elseif(APPLE)
1462 list(APPEND SUBZERO_INCLUDE_DIR ${SUBZERO_LLVM_DIR}/build/MacOS/include/)
1463 endif()
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001464
Antonio Maiorano5bce1f42019-05-10 16:03:49 -04001465 if(WIN32)
1466 list(APPEND SUBZERO_COMPILE_OPTIONS
1467 "/wd4334" # ''operator' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
1468 "/wd4996" # The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: new_name.
1469 )
1470 endif()
1471
Nicolas Capens26690ed2017-03-31 10:34:20 -04001472 add_library(ReactorSubzero STATIC
1473 ${SUBZERO_LIST}
1474 ${SUBZERO_DEPENDENCIES_LIST}
1475 ${SUBZERO_REACTOR_LIST}
1476 )
Nicolas Capens26690ed2017-03-31 10:34:20 -04001477 set_target_properties(ReactorSubzero PROPERTIES
1478 POSITION_INDEPENDENT_CODE 1
1479 INCLUDE_DIRECTORIES "${SUBZERO_INCLUDE_DIR}"
Antonio Maiorano5bce1f42019-05-10 16:03:49 -04001480 COMPILE_OPTIONS "${SUBZERO_COMPILE_OPTIONS};${SWIFTSHADER_COMPILE_OPTIONS}"
Nicolas Capens26690ed2017-03-31 10:34:20 -04001481 COMPILE_DEFINITIONS "SZTARGET=${SUBZERO_TARGET}; ALLOW_DUMP=0; ALLOW_TIMERS=0; ALLOW_LLVM_CL=0; ALLOW_LLVM_IR=0; ALLOW_LLVM_IR_AS_INPUT=0; ALLOW_MINIMAL_BUILD=0; ALLOW_WASM=0; ICE_THREAD_LOCAL_HACK=0;"
1482 FOLDER "Subzero"
1483 )
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001484
Nicolas Capens26690ed2017-03-31 10:34:20 -04001485 if(WIN32)
1486 target_compile_definitions(ReactorSubzero PRIVATE SUBZERO_USE_MICROSOFT_ABI)
1487 endif()
Nicolas Capens19291ef2017-01-09 13:35:14 -05001488endif()
1489
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001490###########################################################
Corentin Wallez0866b292015-12-09 13:49:40 -05001491# Include Directories
1492###########################################################
1493
1494set(COMMON_INCLUDE_DIR
1495 ${SOURCE_DIR}
Erwin Jansend46faeb2018-11-19 16:01:37 -08001496 ${CMAKE_CURRENT_SOURCE_DIR}/include
Corentin Wallez0866b292015-12-09 13:49:40 -05001497 ${LLVM_INCLUDE_DIR}
Ben Claytonac07ed82019-03-26 14:17:41 +00001498 ${LIBBACKTRACE_INCLUDE_DIR}
Corentin Wallez0866b292015-12-09 13:49:40 -05001499)
1500set(OPENGL_INCLUDE_DIR
1501 ${OPENGL_DIR}
Corentin Wallez0866b292015-12-09 13:49:40 -05001502 ${COMMON_INCLUDE_DIR}
1503)
1504
Chris Forbes3d27f2e2018-09-26 09:24:39 -07001505set(VULKAN_INCLUDE_DIR
Chris Forbes3d27f2e2018-09-26 09:24:39 -07001506 ${COMMON_INCLUDE_DIR}
1507)
1508
Corentin Wallez0866b292015-12-09 13:49:40 -05001509###########################################################
1510# File Lists
1511###########################################################
1512
1513file(GLOB_RECURSE SWIFTSHADER_LIST
1514 ${SOURCE_DIR}/Common/*.cpp
1515 ${SOURCE_DIR}/Common/*.h
1516 ${SOURCE_DIR}/Common/*.hpp
1517 ${SOURCE_DIR}/Renderer/*.cpp
1518 ${SOURCE_DIR}/Renderer/*.h
1519 ${SOURCE_DIR}/Renderer/*.hpp
1520 ${SOURCE_DIR}/Shader/*.cpp
1521 ${SOURCE_DIR}/Shader/*.h
1522 ${SOURCE_DIR}/Shader/*.hpp
1523)
1524list(APPEND SWIFTSHADER_LIST
1525 ${SOURCE_DIR}/Main/Config.cpp
1526 ${SOURCE_DIR}/Main/Config.hpp
Corentin Wallez0866b292015-12-09 13:49:40 -05001527 ${SOURCE_DIR}/Main/FrameBuffer.cpp
1528 ${SOURCE_DIR}/Main/FrameBuffer.hpp
Corentin Wallez0866b292015-12-09 13:49:40 -05001529 ${SOURCE_DIR}/Main/SwiftConfig.cpp
1530 ${SOURCE_DIR}/Main/SwiftConfig.hpp
1531)
1532list(REMOVE_ITEM SWIFTSHADER_LIST
1533 ${SOURCE_DIR}/Common/DebugAndroid.cpp
1534 ${SOURCE_DIR}/Common/DebugAndroid.hpp
1535 ${SOURCE_DIR}/Common/GrallocAndroid.cpp
1536 ${SOURCE_DIR}/Common/GrallocAndroid.hpp
1537)
1538
Ben Claytonac07ed82019-03-26 14:17:41 +00001539if(REACTOR_EMIT_DEBUG_INFO)
1540 set(LIBBACKTRACE_LIST
1541 ${LIBBACKTRACE_DIR}/atomic.c
1542 ${LIBBACKTRACE_DIR}/backtrace.c
1543 ${LIBBACKTRACE_DIR}/backtrace.h
1544 ${LIBBACKTRACE_DIR}/dwarf.c
1545 ${LIBBACKTRACE_DIR}/fileline.c
1546 ${LIBBACKTRACE_DIR}/filenames.h
1547 ${LIBBACKTRACE_DIR}/internal.h
1548 ${LIBBACKTRACE_DIR}/mmap.c
1549 ${LIBBACKTRACE_DIR}/mmapio.c
1550 ${LIBBACKTRACE_DIR}/posix.c
1551 ${LIBBACKTRACE_DIR}/print.c
1552 ${LIBBACKTRACE_DIR}/simple.c
1553 ${LIBBACKTRACE_DIR}/sort.c
1554 ${LIBBACKTRACE_DIR}/state.c
1555 ${LIBBACKTRACE_INCLUDE_DIR}/backtrace-supported.h
1556 ${LIBBACKTRACE_INCLUDE_DIR}/config.h
1557 )
1558
1559 if(WIN32)
1560 list(APPEND LIBBACKTRACE_LIST ${LIBBACKTRACE_DIR}/pecoff.c)
1561 elseif(LINUX)
1562 list(APPEND LIBBACKTRACE_LIST ${LIBBACKTRACE_DIR}/elf.c)
1563 elseif(APPLE)
1564 message(FATAL_ERROR "libbacktrace does not support mach-o yet")
1565 endif()
1566endif(REACTOR_EMIT_DEBUG_INFO)
1567
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001568set(REACTOR_LLVM_LIST
Nicolas Capensb6d4ce32019-03-12 23:00:24 -04001569 ${SOURCE_DIR}/Reactor/Reactor.cpp
Antonio Maioranof448d8e2019-04-26 16:19:16 -04001570 ${SOURCE_DIR}/Reactor/Reactor.hpp
Nicolas Capens5763d172016-09-26 13:44:20 -04001571 ${SOURCE_DIR}/Reactor/LLVMReactor.cpp
Ben Claytonac07ed82019-03-26 14:17:41 +00001572 ${SOURCE_DIR}/Reactor/LLVMReactor.hpp
1573 ${SOURCE_DIR}/Reactor/LLVMReactorDebugInfo.cpp
1574 ${SOURCE_DIR}/Reactor/LLVMReactorDebugInfo.hpp
Corentin Wallez0866b292015-12-09 13:49:40 -05001575 ${SOURCE_DIR}/Reactor/Nucleus.hpp
1576 ${SOURCE_DIR}/Reactor/Routine.cpp
1577 ${SOURCE_DIR}/Reactor/Routine.hpp
Nicolas Capensdaa5d912016-09-28 16:56:36 -04001578 ${SOURCE_DIR}/Reactor/LLVMRoutine.cpp
1579 ${SOURCE_DIR}/Reactor/LLVMRoutine.hpp
Nicolas Capensc07dc4b2018-08-06 14:20:45 -04001580 ${SOURCE_DIR}/Reactor/CPUID.cpp
1581 ${SOURCE_DIR}/Reactor/CPUID.hpp
1582 ${SOURCE_DIR}/Reactor/Debug.cpp
1583 ${SOURCE_DIR}/Reactor/Debug.hpp
Nicolas Capens1a3ce872018-10-10 10:42:36 -04001584 ${SOURCE_DIR}/Reactor/ExecutableMemory.cpp
1585 ${SOURCE_DIR}/Reactor/ExecutableMemory.hpp
Corentin Wallez0866b292015-12-09 13:49:40 -05001586)
1587
1588file(GLOB_RECURSE EGL_LIST
1589 ${OPENGL_DIR}/libEGL/*.cpp
1590 ${OPENGL_DIR}/libEGL/*.h
1591 ${OPENGL_DIR}/libEGL/*.hpp
1592 ${OPENGL_DIR}/common/Object.cpp
1593 ${OPENGL_DIR}/common/Object.hpp
1594 ${OPENGL_DIR}/common/debug.cpp
1595 ${OPENGL_DIR}/common/debug.h
Chris Forbesf8374cf2018-12-06 13:25:59 -08001596 ${SOURCE_DIR}/Common/SharedLibrary.cpp
1597 ${SOURCE_DIR}/Common/SharedLibrary.hpp
Erwin Jansend46faeb2018-11-19 16:01:37 -08001598 ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h
Corentin Wallez0866b292015-12-09 13:49:40 -05001599)
1600
Corentin Wallez0866b292015-12-09 13:49:40 -05001601file(GLOB_RECURSE GLES2_LIST
1602 ${OPENGL_DIR}/libGLESv2/*.cpp
1603 ${OPENGL_DIR}/libGLESv2/*.h
1604 ${OPENGL_DIR}/libGLESv2/*.hpp
Nicolas Capens681d97b2016-05-17 16:02:32 -04001605 ${OPENGL_DIR}/common/*.cpp
1606 ${OPENGL_DIR}/common/*.h
1607 ${OPENGL_DIR}/common/*.hpp
Chris Forbesf8374cf2018-12-06 13:25:59 -08001608 ${SOURCE_DIR}/Common/SharedLibrary.cpp
1609 ${SOURCE_DIR}/Common/SharedLibrary.hpp
Erwin Jansend46faeb2018-11-19 16:01:37 -08001610 ${CMAKE_CURRENT_SOURCE_DIR}/include/KHR/*.h
1611 ${CMAKE_CURRENT_SOURCE_DIR}/include/GLES2/*.h
1612 ${CMAKE_CURRENT_SOURCE_DIR}/include/GLES3/*.h
Corentin Wallez0866b292015-12-09 13:49:40 -05001613)
1614
1615file(GLOB_RECURSE GLES_CM_LIST
1616 ${OPENGL_DIR}/libGLES_CM/*.cpp
1617 ${OPENGL_DIR}/libGLES_CM/*.h
1618 ${OPENGL_DIR}/libGLES_CM/*.hpp
Nicolas Capens681d97b2016-05-17 16:02:32 -04001619 ${OPENGL_DIR}/common/*.cpp
1620 ${OPENGL_DIR}/common/*.h
1621 ${OPENGL_DIR}/common/*.hpp
Chris Forbesf8374cf2018-12-06 13:25:59 -08001622 ${SOURCE_DIR}/Common/SharedLibrary.cpp
1623 ${SOURCE_DIR}/Common/SharedLibrary.hpp
Erwin Jansend46faeb2018-11-19 16:01:37 -08001624 ${CMAKE_CURRENT_SOURCE_DIR}/include/KHR/*.h
1625 ${CMAKE_CURRENT_SOURCE_DIR}/include/GLES/*.h
Corentin Wallez0866b292015-12-09 13:49:40 -05001626)
1627
1628file(GLOB_RECURSE OPENGL_COMPILER_LIST
1629 ${OPENGL_COMPILER_DIR}/*.cpp
1630 ${OPENGL_COMPILER_DIR}/*.h
1631 ${OPENGL_COMPILER_DIR}/*.hpp
1632)
1633file(GLOB_RECURSE OPENGL_COMPILER_OS_SPECIFIC_LIST
1634 ${OPENGL_COMPILER_DIR}/ossource*.cpp
1635 ${OPENGL_COMPILER_DIR}/ossource*.h
1636 ${OPENGL_COMPILER_DIR}/ossource*.hpp
1637)
1638list(REMOVE_ITEM OPENGL_COMPILER_LIST ${OPENGL_COMPILER_OS_SPECIFIC_LIST})
1639
Chris Forbes3d27f2e2018-09-26 09:24:39 -07001640file(GLOB_RECURSE VULKAN_LIST
1641 ${VULKAN_DIR}/*.cpp
1642 ${VULKAN_DIR}/*.h
Alexis Hetue70c3512018-10-17 13:18:04 -04001643 ${VULKAN_DIR}/*.hpp
Alexis Hetuc0f92f22018-11-15 16:25:38 -05001644 ${SOURCE_DIR}/System/CPUID.cpp
1645 ${SOURCE_DIR}/System/CPUID.hpp
1646 ${SOURCE_DIR}/System/Configurator.cpp
1647 ${SOURCE_DIR}/System/Configurator.hpp
Chris Forbesc730c382018-12-05 16:48:33 -08001648 ${SOURCE_DIR}/System/Debug.cpp
1649 ${SOURCE_DIR}/System/Debug.hpp
Alexis Hetuc0f92f22018-11-15 16:25:38 -05001650 ${SOURCE_DIR}/System/Half.cpp
1651 ${SOURCE_DIR}/System/Half.hpp
1652 ${SOURCE_DIR}/System/Math.cpp
1653 ${SOURCE_DIR}/System/Math.hpp
1654 ${SOURCE_DIR}/System/Memory.cpp
1655 ${SOURCE_DIR}/System/Memory.hpp
1656 ${SOURCE_DIR}/System/Resource.cpp
1657 ${SOURCE_DIR}/System/Resource.hpp
1658 ${SOURCE_DIR}/System/Socket.cpp
1659 ${SOURCE_DIR}/System/Socket.hpp
Ben Claytoned01f2c2019-05-20 10:42:35 +01001660 ${SOURCE_DIR}/System/Synchronization.hpp
Alexis Hetuc0f92f22018-11-15 16:25:38 -05001661 ${SOURCE_DIR}/System/Thread.hpp
1662 ${SOURCE_DIR}/System/Timer.cpp
1663 ${SOURCE_DIR}/System/Timer.hpp
1664 ${SOURCE_DIR}/Device/*.cpp
1665 ${SOURCE_DIR}/Device/*.hpp
1666 ${SOURCE_DIR}/Pipeline/*.cpp
1667 ${SOURCE_DIR}/Pipeline/*.hpp
Hernan Liatisc6eb41b2019-02-22 11:12:59 -08001668 ${SOURCE_DIR}/WSI/VkSurfaceKHR.cpp
1669 ${SOURCE_DIR}/WSI/VkSurfaceKHR.hpp
Hernan Liatisc7943e92019-02-25 19:29:54 -08001670 ${SOURCE_DIR}/WSI/VkSwapchainKHR.cpp
1671 ${SOURCE_DIR}/WSI/VkSwapchainKHR.hpp
Erwin Jansend46faeb2018-11-19 16:01:37 -08001672 ${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan/*.h}
Chris Forbes3d27f2e2018-09-26 09:24:39 -07001673)
1674
Corentin Wallez0866b292015-12-09 13:49:40 -05001675###########################################################
1676# Append OS specific files to lists
1677###########################################################
1678
1679if(WIN32)
1680 list(APPEND SWIFTSHADER_LIST
1681 ${SOURCE_DIR}/Main/FrameBufferDD.cpp
1682 ${SOURCE_DIR}/Main/FrameBufferDD.hpp
1683 ${SOURCE_DIR}/Main/FrameBufferGDI.cpp
1684 ${SOURCE_DIR}/Main/FrameBufferGDI.hpp
1685 ${SOURCE_DIR}/Main/FrameBufferWin.cpp
1686 ${SOURCE_DIR}/Main/FrameBufferWin.hpp
Corentin Wallez0866b292015-12-09 13:49:40 -05001687 )
1688 list(APPEND OPENGL_COMPILER_LIST ${OPENGL_COMPILER_DIR}/ossource_win.cpp)
1689 list(APPEND EGL_LIST ${OPENGL_DIR}/libEGL/libEGL.rc)
Corentin Wallez0866b292015-12-09 13:49:40 -05001690 list(APPEND GLES2_LIST ${OPENGL_DIR}/libGLESv2/libGLESv2.rc)
1691 list(APPEND GLES_CM_LIST ${OPENGL_DIR}/libGLES_CM/libGLES_CM.rc)
1692elseif(LINUX)
1693 list(APPEND SWIFTSHADER_LIST
1694 ${SOURCE_DIR}/Main/FrameBufferX11.cpp
1695 ${SOURCE_DIR}/Main/FrameBufferX11.hpp
Nicolas Capens681d97b2016-05-17 16:02:32 -04001696 ${SOURCE_DIR}/Common/SharedLibrary.hpp
1697 ${SOURCE_DIR}/Main/libX11.cpp
1698 ${SOURCE_DIR}/Main/libX11.hpp
1699 )
1700 list(APPEND EGL_LIST
1701 ${SOURCE_DIR}/Common/SharedLibrary.hpp
Corentin Wallez0866b292015-12-09 13:49:40 -05001702 ${SOURCE_DIR}/Main/libX11.cpp
1703 ${SOURCE_DIR}/Main/libX11.hpp
1704 )
1705 list(APPEND OPENGL_COMPILER_LIST
1706 ${OPENGL_COMPILER_DIR}/ossource_posix.cpp
1707 )
Hernan Liatisc6eb41b2019-02-22 11:12:59 -08001708
1709 list(APPEND VULKAN_LIST
1710 ${SOURCE_DIR}/WSI/libX11.cpp
1711 ${SOURCE_DIR}/WSI/libX11.hpp
1712 ${SOURCE_DIR}/WSI/XlibSurfaceKHR.cpp
1713 ${SOURCE_DIR}/WSI/XlibSurfaceKHR.hpp
1714 )
Corentin Wallez27654c22015-12-09 15:22:08 -05001715elseif(APPLE)
1716 list(APPEND SWIFTSHADER_LIST
1717 ${SOURCE_DIR}/Main/FrameBufferOSX.mm
1718 ${SOURCE_DIR}/Main/FrameBufferOSX.hpp
1719 )
Corentin Wallezcd0a4572015-12-10 15:59:28 -05001720 list(APPEND EGL_LIST
1721 ${OPENGL_DIR}/libEGL/OSXUtils.mm
1722 ${OPENGL_DIR}/libEGL/OSXUtils.hpp
1723 )
Corentin Wallez27654c22015-12-09 15:22:08 -05001724 list(APPEND OPENGL_COMPILER_LIST
1725 ${OPENGL_COMPILER_DIR}/ossource_posix.cpp
1726 )
Stephen Whitee6ab01f2019-04-04 14:31:25 -04001727elseif(ANDROID)
1728 list(APPEND SWIFTSHADER_LIST
1729 ${SOURCE_DIR}/Main/FrameBufferAndroid.cpp
1730 ${SOURCE_DIR}/Main/FrameBufferAndroid.hpp
1731 )
1732 list(APPEND OPENGL_COMPILER_LIST
1733 ${OPENGL_COMPILER_DIR}/ossource_posix.cpp
1734 )
Corentin Wallez0866b292015-12-09 13:49:40 -05001735endif()
1736
1737if(WIN32)
1738 set(OS_LIBS odbc32 odbccp32 WS2_32 dxguid)
1739elseif(LINUX)
Nicolas Capens681d97b2016-05-17 16:02:32 -04001740 set(OS_LIBS dl pthread)
Corentin Wallezcd0a4572015-12-10 15:59:28 -05001741elseif(APPLE)
1742 find_library(COCOA_FRAMEWORK Cocoa)
1743 find_library(QUARTZ_FRAMEWORK Quartz)
Alexis Hetud23cf632018-04-10 10:48:42 -04001744 find_library(CORE_FOUNDATION_FRAMEWORK CoreFoundation)
1745 find_library(IOSURFACE_FRAMEWORK IOSurface)
1746 set(OS_LIBS "${COCOA_FRAMEWORK}" "${QUARTZ_FRAMEWORK}" "${CORE_FOUNDATION_FRAMEWORK}" "${IOSURFACE_FRAMEWORK}")
Corentin Wallez0866b292015-12-09 13:49:40 -05001747endif()
1748
1749###########################################################
Nicolas Capens5a105bc2015-12-22 22:04:28 -05001750# SwiftShader Targets
Corentin Wallez0866b292015-12-09 13:49:40 -05001751###########################################################
1752
1753add_library(SwiftShader STATIC ${SWIFTSHADER_LIST})
1754set_target_properties(SwiftShader PROPERTIES
1755 INCLUDE_DIRECTORIES "${COMMON_INCLUDE_DIR}"
1756 POSITION_INDEPENDENT_CODE 1
1757 FOLDER "Core"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001758 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Nicolas Capens506cc5e2017-07-24 11:30:55 -04001759 COMPILE_DEFINITIONS "NO_SANITIZE_FUNCTION=;"
Corentin Wallez0866b292015-12-09 13:49:40 -05001760)
1761target_link_libraries(SwiftShader ${OS_LIBS})
1762
Ben Claytonb99bc1f2019-04-15 13:56:08 -04001763if(${REACTOR_BACKEND} STREQUAL "LLVM")
1764 add_library(ReactorLLVM STATIC ${REACTOR_LLVM_LIST})
1765 set_target_properties(ReactorLLVM PROPERTIES
1766 INCLUDE_DIRECTORIES "${COMMON_INCLUDE_DIR}"
Ben Claytonac07ed82019-03-26 14:17:41 +00001767 POSITION_INDEPENDENT_CODE 1
1768 FOLDER "Core"
Ben Clayton09a7f452019-04-25 15:22:43 +01001769 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Ben Claytonac07ed82019-03-26 14:17:41 +00001770 )
Ben Claytonb99bc1f2019-04-15 13:56:08 -04001771 target_link_libraries(ReactorLLVM llvm ${OS_LIBS})
Ben Claytonac07ed82019-03-26 14:17:41 +00001772
Ben Claytonb99bc1f2019-04-15 13:56:08 -04001773 if(REACTOR_EMIT_DEBUG_INFO)
Antonio Maioranof448d8e2019-04-26 16:19:16 -04001774 if(WIN32)
1775 # Boost stacktrace uses COM on Windows.
1776 # On Windows, cache COM instances in TLS for performance.
Antonio Maiorano8b321d12019-05-27 16:15:34 -04001777 target_compile_definitions(ReactorLLVM PRIVATE BOOST_STACKTRACE_USE_WINDBG_CACHED)
Antonio Maioranof448d8e2019-04-26 16:19:16 -04001778 else()
1779 # Boost stacktrace uses libbacktrace
Antonio Maiorano8b321d12019-05-27 16:15:34 -04001780 target_compile_definitions(ReactorLLVM PRIVATE BOOST_STACKTRACE_USE_BACKTRACE)
Antonio Maioranof448d8e2019-04-26 16:19:16 -04001781
1782 # Boost stacktrace uses exceptions, so force enable it
1783 set_cpp_flag("-fexceptions")
1784
1785 add_library(Libbacktrace STATIC ${LIBBACKTRACE_LIST})
1786 set_target_properties(Libbacktrace PROPERTIES
1787 INCLUDE_DIRECTORIES "${LIBBACKTRACE_INCLUDE_DIR}"
1788 POSITION_INDEPENDENT_CODE 1
1789 FOLDER "Core"
1790 )
1791 target_link_libraries(Libbacktrace ${OS_LIBS})
1792 target_link_libraries(ReactorLLVM Libbacktrace)
1793 endif()
Antonio Maiorano8b321d12019-05-27 16:15:34 -04001794
1795 # Download boost and use it
1796 DownloadBoost()
1797 set(BOOST_INCLUDEDIR ${BOOST_THIRD_PARTY_DIR})
1798 find_package(Boost REQUIRED)
1799 target_link_libraries(ReactorLLVM Boost::boost)
1800
Ben Claytonb99bc1f2019-04-15 13:56:08 -04001801 endif(REACTOR_EMIT_DEBUG_INFO)
1802
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001803 set(Reactor ReactorLLVM)
1804elseif(${REACTOR_BACKEND} STREQUAL "Subzero")
1805 set(Reactor ReactorSubzero)
1806else()
1807 message(FATAL_ERROR "REACTOR_BACKEND must be 'LLVM' or 'Subzero'")
1808endif()
Corentin Wallez0866b292015-12-09 13:49:40 -05001809
Corentin Wallez0866b292015-12-09 13:49:40 -05001810add_library(GLCompiler STATIC ${OPENGL_COMPILER_LIST})
1811set_target_properties(GLCompiler PROPERTIES
1812 INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}"
1813 POSITION_INDEPENDENT_CODE 1
1814 FOLDER "OpenGL"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001815 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Corentin Wallez0866b292015-12-09 13:49:40 -05001816)
1817target_link_libraries(GLCompiler ${OS_LIBS})
1818
Nicolas Capens6f422092015-12-23 15:12:45 -05001819if(CMAKE_SIZEOF_VOID_P EQUAL 8)
1820 set(LIB_PREFIX "lib64")
1821else()
1822 set(LIB_PREFIX "lib")
1823endif()
1824
Corentin Wallez0866b292015-12-09 13:49:40 -05001825if(BUILD_EGL)
1826 add_library(libEGL SHARED ${EGL_LIST})
1827 set_target_properties(libEGL PROPERTIES
1828 INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}"
1829 FOLDER "OpenGL"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001830 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Antonio Maioranob0a68ed2019-04-26 15:34:22 -04001831 COMPILE_DEFINITIONS "EGL_EGLEXT_PROTOTYPES; EGLAPI=; NO_SANITIZE_FUNCTION=;$<$<CONFIG:Debug>:DEBUGGER_WAIT_DIALOG>"
Corentin Wallez0866b292015-12-09 13:49:40 -05001832 PREFIX ""
1833 )
Stephen Whitee6ab01f2019-04-04 14:31:25 -04001834 if (ANDROID)
1835 set_target_properties(libEGL PROPERTIES SUFFIX "_swiftshader.so")
1836 endif ()
Nicolas Capens499bb762018-06-29 13:30:57 -04001837 set_shared_library_export_map(libEGL ${SOURCE_DIR}/OpenGL/libEGL)
Corentin Wallez0866b292015-12-09 13:49:40 -05001838 target_link_libraries(libEGL ${OS_LIBS})
Nicolas Capens6f422092015-12-23 15:12:45 -05001839 add_custom_command(
1840 TARGET libEGL
1841 POST_BUILD
1842 COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:libEGL>/translator
1843 COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:libEGL> $<TARGET_FILE_DIR:libEGL>/translator/${LIB_PREFIX}EGL_translator${CMAKE_SHARED_LIBRARY_SUFFIX}
Dan Sinclair1b8cd2d2019-03-14 10:51:05 -04001844 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/
1845 COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:libEGL> ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/
Nicolas Capens6f422092015-12-23 15:12:45 -05001846 )
Corentin Wallez0866b292015-12-09 13:49:40 -05001847endif()
1848
Corentin Wallez0866b292015-12-09 13:49:40 -05001849if(BUILD_GLESv2)
1850 add_library(libGLESv2 SHARED ${GLES2_LIST})
1851 set_target_properties(libGLESv2 PROPERTIES
1852 INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}"
1853 FOLDER "OpenGL"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001854 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Nicolas Capens8e6ed2e2018-05-31 16:21:02 -04001855 COMPILE_DEFINITIONS "GL_GLEXT_PROTOTYPES; GL_API=; GL_APICALL=; GLAPI=; NO_SANITIZE_FUNCTION=;"
Corentin Wallez0866b292015-12-09 13:49:40 -05001856 PREFIX ""
1857 )
Stephen Whitee6ab01f2019-04-04 14:31:25 -04001858 if (ANDROID)
1859 set_target_properties(libGLESv2 PROPERTIES SUFFIX "_swiftshader.so")
1860 endif ()
Nicolas Capens499bb762018-06-29 13:30:57 -04001861 set_shared_library_export_map(libGLESv2 ${SOURCE_DIR}/OpenGL/libGLESv2)
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001862 target_link_libraries(libGLESv2 SwiftShader ${Reactor} GLCompiler ${OS_LIBS})
Nicolas Capens6f422092015-12-23 15:12:45 -05001863 add_custom_command(
1864 TARGET libGLESv2
1865 POST_BUILD
1866 COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:libGLESv2>/translator
1867 COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:libGLESv2> $<TARGET_FILE_DIR:libGLESv2>/translator/${LIB_PREFIX}GLES_V2_translator${CMAKE_SHARED_LIBRARY_SUFFIX}
Dan Sinclair1b8cd2d2019-03-14 10:51:05 -04001868 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/
1869 COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:libGLESv2> ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/
Nicolas Capens6f422092015-12-23 15:12:45 -05001870 )
Corentin Wallez0866b292015-12-09 13:49:40 -05001871endif()
1872
1873if(BUILD_GLES_CM)
1874 add_library(libGLES_CM SHARED ${GLES_CM_LIST})
1875 set_target_properties(libGLES_CM PROPERTIES
1876 INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}"
1877 FOLDER "OpenGL"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001878 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Nicolas Capens8e6ed2e2018-05-31 16:21:02 -04001879 COMPILE_DEFINITIONS "GL_GLEXT_PROTOTYPES; EGLAPI=; GL_API=; GL_APICALL=; GLAPI=;"
Corentin Wallez0866b292015-12-09 13:49:40 -05001880 PREFIX ""
1881 )
Stephen Whitee6ab01f2019-04-04 14:31:25 -04001882 if (ANDROID)
1883 set_target_properties(libGLES_CM PROPERTIES SUFFIX "_swiftshader.so")
1884 endif ()
Nicolas Capens499bb762018-06-29 13:30:57 -04001885 set_shared_library_export_map(libGLES_CM ${SOURCE_DIR}/OpenGL/libGLES_CM)
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001886 target_link_libraries(libGLES_CM SwiftShader ${Reactor} GLCompiler ${OS_LIBS})
Nicolas Capens6f422092015-12-23 15:12:45 -05001887 add_custom_command(
1888 TARGET libGLES_CM
1889 POST_BUILD
1890 COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:libGLES_CM>/translator
1891 COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:libGLES_CM> $<TARGET_FILE_DIR:libGLES_CM>/translator/${LIB_PREFIX}GLES_CM_translator${CMAKE_SHARED_LIBRARY_SUFFIX}
1892 )
Corentin Wallez0866b292015-12-09 13:49:40 -05001893endif()
1894
Chris Forbes3d27f2e2018-09-26 09:24:39 -07001895if(BUILD_VULKAN)
Dan Sinclair6480d4e2019-03-11 10:48:19 -04001896 if (NOT TARGET SPIRV-Tools)
1897 # This variable is also used by SPIRV-Tools to locate SPIRV-Headers
1898 set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/SPIRV-Headers")
1899 list(APPEND VULKAN_INCLUDE_DIR "${SPIRV-Headers_SOURCE_DIR}/include")
Nicolas Capens4e9f5772019-01-31 15:17:13 -05001900
Dan Sinclair6480d4e2019-03-11 10:48:19 -04001901 add_subdirectory(third_party/SPIRV-Tools)
1902 endif()
Nicolas Capens4c9f04b2019-01-31 22:09:03 -05001903
Chris Forbes3d27f2e2018-09-26 09:24:39 -07001904 add_library(libvk_swiftshader SHARED ${VULKAN_LIST})
1905 set_target_properties(libvk_swiftshader PROPERTIES
1906 INCLUDE_DIRECTORIES "${VULKAN_INCLUDE_DIR}"
1907 FOLDER "Vulkan"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001908 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Saman Samif4d2a442019-05-21 15:04:41 -04001909 COMPILE_DEFINITIONS "VK_EXPORT=;NO_SANITIZE_FUNCTION=;$<$<CONFIG:Debug>:DEBUGGER_WAIT_DIALOG>"
Chris Forbes3d27f2e2018-09-26 09:24:39 -07001910 PREFIX ""
1911 )
1912 set_shared_library_export_map(libvk_swiftshader ${SOURCE_DIR}/Vulkan)
Nicolas Capensa69ca602019-02-04 16:23:25 -05001913 target_link_libraries(libvk_swiftshader ${Reactor} ${OS_LIBS} SPIRV-Tools SPIRV-Tools-opt)
Chris Forbes3d27f2e2018-09-26 09:24:39 -07001914 add_custom_command(
1915 TARGET libvk_swiftshader
1916 POST_BUILD
1917 COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:libvk_swiftshader>/translator
1918 COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:libvk_swiftshader> $<TARGET_FILE_DIR:libvk_swiftshader>/translator/${LIB_PREFIX}Vulkan_translator${CMAKE_SHARED_LIBRARY_SUFFIX}
Dan Sinclair1b8cd2d2019-03-14 10:51:05 -04001919 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/
1920 COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:libvk_swiftshader> ${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/
Chris Forbes3d27f2e2018-09-26 09:24:39 -07001921 )
Ben Claytond9ce2582019-02-06 11:54:15 +00001922 configure_file(
1923 "${VULKAN_DIR}/vk_swiftshader_icd.json.tmpl"
Dan Sinclair1b8cd2d2019-03-14 10:51:05 -04001924 "${CMAKE_BINARY_DIR}/${CMAKE_SYSTEM_NAME}/vk_swiftshader_icd.json")
Chris Forbes3d27f2e2018-09-26 09:24:39 -07001925endif()
1926
Corentin Wallez0866b292015-12-09 13:49:40 -05001927###########################################################
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001928# Sample programs
Corentin Wallez0866b292015-12-09 13:49:40 -05001929###########################################################
1930
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001931if(BUILD_SAMPLES)
1932 if(WIN32)
1933 add_executable(OGLES2HelloAPI ${HELLO2_DIR}/OGLES2HelloAPI_Windows.cpp)
1934 set_target_properties(OGLES2HelloAPI PROPERTIES
Erwin Jansend46faeb2018-11-19 16:01:37 -08001935 INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001936 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001937 COMPILE_DEFINITIONS "GL_GLEXT_PROTOTYPES"
1938 FOLDER "Samples"
1939 )
1940 target_link_libraries(OGLES2HelloAPI libEGL libGLESv2)
1941 set_property(TARGET OGLES2HelloAPI APPEND_STRING PROPERTY LINK_FLAGS "/SUBSYSTEM:WINDOWS")
1942 set(CMAKE_DEFAULT_STARTUP_PROJECT OGLES2HelloAPI)
1943 elseif(LINUX)
Chinmay Garde204ec082016-08-10 17:01:21 -07001944 add_executable(OGLES2HelloAPI ${HELLO2_DIR}/OGLES2HelloAPI_LinuxX11.cpp)
Nicolas Capensb94a2fc2016-10-26 16:57:35 -04001945 set_target_properties(OGLES2HelloAPI PROPERTIES
Erwin Jansend46faeb2018-11-19 16:01:37 -08001946 INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001947 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Nicolas Capensb94a2fc2016-10-26 16:57:35 -04001948 COMPILE_DEFINITIONS "GL_GLEXT_PROTOTYPES"
1949 )
Nicolas Capensf53adbd2017-01-06 12:47:46 -05001950 target_link_libraries(OGLES2HelloAPI dl X11 libEGL libGLESv2) # Explicitly link our "lib*" targets, not the platform provided "EGL" and "GLESv2"
Chinmay Garde204ec082016-08-10 17:01:21 -07001951 elseif(APPLE)
1952 add_executable(OGLES2HelloAPI MACOSX_BUNDLE
1953 ${HELLO2_DIR}/OGLES2HelloAPI_OSX.mm
1954 ${HELLO2_DIR}/Build/OSX/en.lproj/MainMenu.xib
1955 )
1956 set_target_properties(OGLES2HelloAPI PROPERTIES
Erwin Jansend46faeb2018-11-19 16:01:37 -08001957 INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001958 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS};-Wno-deprecated-declarations" # 'NSTitledWindowMask', 'NSClosableWindowMask' is deprecated
Chinmay Garde204ec082016-08-10 17:01:21 -07001959 COMPILE_DEFINITIONS "GL_GLEXT_PROTOTYPES"
1960 MACOSX_BUNDLE_INFO_PLIST "${HELLO2_DIR}/Build/OSX/Info.plist"
1961 )
1962 target_link_libraries(OGLES2HelloAPI libEGL libGLESv2 ${OS_LIBS})
1963 set_source_files_properties(${HELLO2_DIR}/Build/OSX/en.lproj/MainMenu.xib PROPERTIES
1964 MACOSX_PACKAGE_LOCATION "Resources"
1965 )
1966 endif()
Corentin Wallez0866b292015-12-09 13:49:40 -05001967endif()
Nicolas Capens16594842017-04-26 10:01:37 -04001968
Nicolas Capensc07dc4b2018-08-06 14:20:45 -04001969if(BUILD_TESTS)
1970 set(REACTOR_UNIT_TESTS_LIST
1971 ${SOURCE_DIR}/Reactor/ReactorUnitTests.cpp
Erwin Jansend46faeb2018-11-19 16:01:37 -08001972 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googletest/src/gtest-all.cc
Nicolas Capens16594842017-04-26 10:01:37 -04001973 )
1974
Nicolas Capensc07dc4b2018-08-06 14:20:45 -04001975 set(REACTOR_UNIT_TESTS_INCLUDE_DIR
Erwin Jansend46faeb2018-11-19 16:01:37 -08001976 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googletest/include
1977 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googletest/
Nicolas Capens16594842017-04-26 10:01:37 -04001978 )
1979
Nicolas Capensc07dc4b2018-08-06 14:20:45 -04001980 add_executable(ReactorUnitTests ${REACTOR_UNIT_TESTS_LIST})
1981 set_target_properties(ReactorUnitTests PROPERTIES
1982 INCLUDE_DIRECTORIES "${REACTOR_UNIT_TESTS_INCLUDE_DIR}"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01001983 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Nicolas Capens16594842017-04-26 10:01:37 -04001984 FOLDER "Tests"
1985 )
Nicolas Capensc07dc4b2018-08-06 14:20:45 -04001986
1987 if(NOT WIN32 AND ${REACTOR_BACKEND} STREQUAL "Subzero")
1988 target_link_libraries(ReactorUnitTests ${Reactor} pthread dl)
Nicolas Capens16594842017-04-26 10:01:37 -04001989 else()
Nicolas Capensc07dc4b2018-08-06 14:20:45 -04001990 target_link_libraries(ReactorUnitTests ${Reactor})
Nicolas Capens16594842017-04-26 10:01:37 -04001991 endif()
1992endif()
Nicolas Capens39760e12018-06-04 15:55:45 -04001993
1994if(BUILD_TESTS)
Ben Claytoneba396c2019-04-07 12:42:43 +01001995 set(GLES_UNITTESTS_LIST
Erwin Jansend46faeb2018-11-19 16:01:37 -08001996 ${CMAKE_CURRENT_SOURCE_DIR}/tests/GLESUnitTests/main.cpp
1997 ${CMAKE_CURRENT_SOURCE_DIR}/tests/GLESUnitTests/unittests.cpp
1998 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googletest/src/gtest-all.cc
Nicolas Capens39760e12018-06-04 15:55:45 -04001999 )
2000
Ben Claytoneba396c2019-04-07 12:42:43 +01002001 set(GLES_UNITTESTS_INCLUDE_DIR
Erwin Jansend46faeb2018-11-19 16:01:37 -08002002 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googletest/include/
2003 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googlemock/include/
2004 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googletest/
2005 ${CMAKE_CURRENT_SOURCE_DIR}/include/
Nicolas Capens39760e12018-06-04 15:55:45 -04002006 )
2007
Ben Claytoneba396c2019-04-07 12:42:43 +01002008 add_executable(gles-unittests ${GLES_UNITTESTS_LIST})
2009 set_target_properties(gles-unittests PROPERTIES
2010 INCLUDE_DIRECTORIES "${GLES_UNITTESTS_INCLUDE_DIR}"
Nicolas Capens39760e12018-06-04 15:55:45 -04002011 FOLDER "Tests"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01002012 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Nicolas Capens39760e12018-06-04 15:55:45 -04002013 COMPILE_DEFINITIONS "STANDALONE"
2014 )
2015
Ben Claytoneba396c2019-04-07 12:42:43 +01002016 target_link_libraries(gles-unittests libEGL libGLESv2 ${OS_LIBS})
Stephen Whitee6ab01f2019-04-04 14:31:25 -04002017 if(ANDROID)
Ben Claytoneba396c2019-04-07 12:42:43 +01002018 target_link_libraries(gles-unittests -landroid)
Stephen Whitee6ab01f2019-04-04 14:31:25 -04002019 endif()
Nicolas Capens39760e12018-06-04 15:55:45 -04002020endif()
Ben Clayton654540e2019-02-01 13:08:23 +00002021
2022if(BUILD_TESTS AND BUILD_VULKAN)
Ben Claytoneba396c2019-04-07 12:42:43 +01002023 set(VK_UNITTESTS_LIST
Ben Claytonabb57852019-03-01 14:33:35 +00002024 ${CMAKE_CURRENT_SOURCE_DIR}/tests/VulkanUnitTests/Device.cpp
Ben Clayton654540e2019-02-01 13:08:23 +00002025 ${CMAKE_CURRENT_SOURCE_DIR}/tests/VulkanUnitTests/Driver.cpp
2026 ${CMAKE_CURRENT_SOURCE_DIR}/tests/VulkanUnitTests/main.cpp
2027 ${CMAKE_CURRENT_SOURCE_DIR}/tests/VulkanUnitTests/unittests.cpp
2028 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googletest/src/gtest-all.cc
2029 )
2030
Ben Claytoneba396c2019-04-07 12:42:43 +01002031 set(VK_UNITTESTS_INCLUDE_DIR
Ben Clayton654540e2019-02-01 13:08:23 +00002032 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googletest/include/
2033 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googlemock/include/
2034 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/googletest/googletest/
Ben Claytonabb57852019-03-01 14:33:35 +00002035 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/SPIRV-Tools/include
Ben Clayton654540e2019-02-01 13:08:23 +00002036 ${CMAKE_CURRENT_SOURCE_DIR}/include/
2037 )
2038
Ben Claytoneba396c2019-04-07 12:42:43 +01002039 add_executable(vk-unittests ${VK_UNITTESTS_LIST})
Ben Clayton654540e2019-02-01 13:08:23 +00002040 set_target_properties(vk-unittests PROPERTIES
Ben Claytoneba396c2019-04-07 12:42:43 +01002041 INCLUDE_DIRECTORIES "${VK_UNITTESTS_INCLUDE_DIR}"
Ben Clayton654540e2019-02-01 13:08:23 +00002042 FOLDER "Tests"
Ben Clayton4ceb77d2019-04-24 12:09:59 +01002043 COMPILE_OPTIONS "${SWIFTSHADER_COMPILE_OPTIONS}"
Ben Clayton654540e2019-02-01 13:08:23 +00002044 COMPILE_DEFINITIONS "STANDALONE"
2045 )
2046
Ben Claytonabb57852019-03-01 14:33:35 +00002047 target_link_libraries(vk-unittests ${OS_LIBS} SPIRV-Tools)
Ben Clayton654540e2019-02-01 13:08:23 +00002048endif()