blob: 2f986cb230b1e85bcd18906329f7180630595e2f [file] [log] [blame]
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -07001# Copyright 2019 The IREE Authors
Ben Vanik185d30c2019-09-19 14:24:11 -07002#
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -07003# Licensed under the Apache License v2.0 with LLVM Exceptions.
4# See https://llvm.org/LICENSE.txt for license information.
5# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Ben Vanik185d30c2019-09-19 14:24:11 -07006
Geoffrey Martin-Nobled89a5af2021-10-26 19:38:21 -07007cmake_minimum_required(VERSION 3.16.3...3.21)
Ben Vanik552c5f42021-06-21 17:39:14 -07008
9# LLVM requires CMP0116 for tblgen: https://reviews.llvm.org/D101083
10# CMP0116: Ninja generators transform `DEPFILE`s from `add_custom_command()`
11# New in CMake 3.20. https://cmake.org/cmake/help/latest/policy/CMP0116.html
12set(CMAKE_POLICY_DEFAULT_CMP0116 OLD)
13
Ben Vanik512d2d32019-09-20 13:22:34 -070014set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Ben Vanik185d30c2019-09-19 14:24:11 -070015
Stella Laurenzo688670f2021-09-24 18:16:25 -070016project(IREE ASM C CXX)
Lei Zhang6c5907b2020-06-02 09:06:08 -070017set(CMAKE_C_STANDARD 11)
18set(CMAKE_CXX_STANDARD 14)
Ben Vanik185d30c2019-09-19 14:24:11 -070019set(IREE_IDE_FOLDER IREE)
20set_property(GLOBAL PROPERTY USE_FOLDERS ON)
21
Ben Vanik96fd2772021-04-19 20:30:56 -070022if(${MSVC})
23 enable_language(ASM_MASM)
24else()
25 enable_language(ASM)
26endif()
27
Lei Zhang7e253da2020-06-10 07:51:19 -070028#-------------------------------------------------------------------------------
29# Project component configuration
30#-------------------------------------------------------------------------------
31
Ben Vanik56d44bf2020-05-15 13:20:50 -070032option(IREE_ENABLE_RUNTIME_TRACING "Enables instrumented runtime tracing." OFF)
Scott Todd1cd9f0a2021-07-29 10:05:44 -070033option(IREE_ENABLE_COMPILER_TRACING "Enables instrumented compiler tracing." OFF)
Geoffrey Martin-Noblefe74bd42021-10-27 22:17:13 -070034option(IREE_ENABLE_THREADING "Builds IREE in with thread library support." ON)
Ben Vanik512d2d32019-09-20 13:22:34 -070035
Marius Brehleredfc57f2019-12-18 11:19:38 -080036option(IREE_BUILD_COMPILER "Builds the IREE compiler." ON)
Ben Vanik512d2d32019-09-20 13:22:34 -070037option(IREE_BUILD_TESTS "Builds IREE unit tests." ON)
Lei Zhangfe4403e2021-06-01 15:09:43 -040038option(IREE_BUILD_BENCHMARKS "Builds IREE benchmark suites." OFF)
Lei Zhang22f0e242020-03-30 12:09:20 -070039option(IREE_BUILD_DOCS "Builds IREE docs." OFF)
Ben Vanik6b112ef2019-10-03 10:45:14 -070040option(IREE_BUILD_SAMPLES "Builds IREE sample projects." ON)
Stella Laurenzod3770ff2021-10-18 22:54:18 -070041option(IREE_BUILD_TRACY "Builds tracy server tools." OFF)
Ben Vanikcd1132f2021-01-29 15:58:17 -080042
Stella Laurenzo6a0313b2021-05-04 22:45:59 +000043option(IREE_BUILD_TENSORFLOW_ALL "Builds all TensorFlow compiler frontends." OFF)
Geoffrey Martin-Noblefe74bd42021-10-27 22:17:13 -070044option(IREE_BUILD_TENSORFLOW_COMPILER "Builds TensorFlow compiler frontend." "${IREE_BUILD_TENSORFLOW_ALL}")
45option(IREE_BUILD_TFLITE_COMPILER "Builds the TFLite compiler frontend." "${IREE_BUILD_TENSORFLOW_ALL}")
46option(IREE_BUILD_XLA_COMPILER "Builds TensorFlow XLA compiler frontend." "${IREE_BUILD_TENSORFLOW_ALL}")
Ben Vanik512d2d32019-09-20 13:22:34 -070047
Scott Todd8b0b0cd2021-12-16 15:13:57 -080048set(IREE_HAL_DRIVERS_TO_BUILD "default"
49 CACHE STRING "Semicolon-separated list of HAL drivers to build, or \"default\"")
50set(IREE_TARGET_BACKENDS_TO_BUILD "default"
51 CACHE STRING "Semicolon-separated list of target backends to build, or \"default\"")
Stella Laurenzo04b7c372020-12-10 00:05:31 +000052
Stella Laurenzobb1de962021-01-05 08:18:33 -080053# Properties controlling version and naming of release artifacts.
54set(IREE_RELEASE_PACKAGE_SUFFIX "-dev" CACHE STRING "Suffix to append to distributed package names")
55set(IREE_RELEASE_VERSION "0.1a1" CACHE STRING "Version to embed in distributed packages")
56set(IREE_RELEASE_REVISION "HEAD" CACHE STRING "Version control revision information to embed in distributed packages")
57
Stella Laurenzoa4137ef2020-12-09 21:28:08 -080058# Master enable for tensorflow build support.
59# Note that this is a normal CMake variable used to gate build features (not
60# a cache variable that is user-settable).
61set(IREE_ENABLE_TENSORFLOW OFF)
Stella Laurenzo6a0313b2021-05-04 22:45:59 +000062if(${IREE_BUILD_TENSORFLOW_ALL} OR
63 ${IREE_BUILD_TENSORFLOW_COMPILER} OR
Stella Laurenzo55fcfab2020-12-10 13:17:25 -080064 ${IREE_BUILD_TFLITE_COMPILER} OR
65 ${IREE_BUILD_XLA_COMPILER})
Stella Laurenzoa4137ef2020-12-09 21:28:08 -080066 set(IREE_ENABLE_TENSORFLOW ON)
67endif()
68
Ben Vanikcd1132f2021-01-29 15:58:17 -080069option(IREE_BUILD_BINDINGS_TFLITE "Builds the IREE TFLite C API compatibility shim" ON)
Kojo Acquah5bf39942021-04-22 16:01:28 -070070option(IREE_BUILD_BINDINGS_TFLITE_JAVA "Builds the IREE TFLite Java bindings with the C API compatibility shim" ON)
Ben Vanikcd1132f2021-01-29 15:58:17 -080071
Stella Laurenzo04b7c372020-12-10 00:05:31 +000072# Default python bindings to enabled for some features.
Geoffrey Martin-Noblefe74bd42021-10-27 22:17:13 -070073option(IREE_BUILD_PYTHON_BINDINGS "Builds the IREE python bindings" "${IREE_ENABLE_TENSORFLOW}")
Stella Laurenzo04b7c372020-12-10 00:05:31 +000074
Stella Laurenzo0f005e52020-12-27 11:54:33 -080075#-------------------------------------------------------------------------------
76# Experimental project flags
77#-------------------------------------------------------------------------------
78
Stella Laurenzo0f005e52020-12-27 11:54:33 -080079option(IREE_BUILD_EXPERIMENTAL_REMOTING "Builds experimental remoting support." OFF)
Scott Todd8b0b0cd2021-12-16 15:13:57 -080080option(IREE_BUILD_EXPERIMENTAL_ROCM "Builds the experimental ROCm Backend." OFF)
Stella Laurenzo0a8a9442021-06-14 22:42:37 -070081option(IREE_ENABLE_NEW_INTEGRATION_TESTS "Enables new integration tests and disables old." OFF)
Stella Laurenzo0f005e52020-12-27 11:54:33 -080082
83#-------------------------------------------------------------------------------
84# Derived flags based on primary options
85#-------------------------------------------------------------------------------
86
Marius Brehler5400f0f2021-08-11 01:41:34 +020087option(IREE_ENABLE_EMITC "Enables MLIR EmitC dependencies." ${IREE_BUILD_COMPILER})
Marius Brehlerfd8be7f2020-06-18 15:59:28 -070088
Ben Vanik185d30c2019-09-19 14:24:11 -070089#-------------------------------------------------------------------------------
Lei Zhang8bea2e82020-06-04 10:17:56 -040090# Target and backend configuration
Ben Vanik185d30c2019-09-19 14:24:11 -070091#-------------------------------------------------------------------------------
92
Scott Todd8b0b0cd2021-12-16 15:13:57 -080093# List of all runtime HAL drivers included in the project:
Marius Brehler0a4b67f2020-05-08 13:19:16 -070094set(IREE_ALL_HAL_DRIVERS
Scott Todd8b0b0cd2021-12-16 15:13:57 -080095 CUDA
96 Dylib
CindyLiua5479652021-09-29 16:32:18 +000097 Dylib_Sync
Ben Vanik0f14db02021-04-19 23:29:29 -070098 VMVX
CindyLiua5479652021-09-29 16:32:18 +000099 VMVX_Sync
Scott Todd6132bb32020-08-11 12:04:40 -0700100 Vulkan
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700101)
102
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800103if(IREE_HAL_DRIVERS_TO_BUILD STREQUAL "default")
Ben Vanik85cdd862020-11-14 11:26:12 -0800104 set(IREE_HAL_DRIVERS_TO_BUILD ${IREE_ALL_HAL_DRIVERS})
Lei Zhang6171a982020-09-08 12:48:25 -0400105
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800106 # Vulkan is not natively supported on Apple platforms.
107 # Metal should generally be used instead, though MoltenVK may also work.
Lei Zhang6171a982020-09-08 12:48:25 -0400108 if(APPLE)
109 list(REMOVE_ITEM IREE_HAL_DRIVERS_TO_BUILD Vulkan)
Lei Zhang6171a982020-09-08 12:48:25 -0400110 endif()
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800111
112 # CUDA is not natively supported on Android or Apple platforms.
Thomasa98c3c02021-02-16 09:56:03 -0800113 if(ANDROID OR APPLE)
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800114 list(REMOVE_ITEM IREE_HAL_DRIVERS_TO_BUILD CUDA)
Thomasa98c3c02021-02-16 09:56:03 -0800115 endif()
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700116endif()
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800117message(STATUS "Building runtime HAL drivers: ${IREE_HAL_DRIVERS_TO_BUILD}")
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700118
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800119# Start each IREE_HAL_DRIVER_* OFF, then enable from IREE_HAL_DRIVERS_TO_BUILD.
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700120foreach(_backend ${IREE_ALL_HAL_DRIVERS})
121 string(TOUPPER "${_backend}" uppercase_backend)
122 set(IREE_HAL_DRIVER_${uppercase_backend} OFF CACHE BOOL "" FORCE)
123endforeach()
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700124foreach(_backend ${IREE_HAL_DRIVERS_TO_BUILD})
125 string(TOUPPER "${_backend}" uppercase_backend)
Marius Brehler30f06a02020-12-18 13:39:26 +0000126 string(REPLACE "\"" "" uppercase_backend ${uppercase_backend})
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700127 set(IREE_HAL_DRIVER_${uppercase_backend} ON CACHE BOOL "" FORCE)
128endforeach()
129
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800130# List of all compiler target backends included in the project:
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700131set(IREE_ALL_TARGET_BACKENDS
Thomasd85738e2021-02-23 11:02:55 -0800132 CUDA
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800133 Dylib-LLVM-AOT
Scott Todd9f0148f2021-03-17 15:14:07 -0700134 WASM-LLVM-AOT
Lei Zhang3cbb28e2020-09-22 15:30:27 -0400135 Metal-SPIRV
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800136 ROCm
Lei Zhang7d90e0e2020-07-23 16:01:13 -0400137 Vulkan-SPIRV
Ben Vanik907f3532021-04-20 13:27:00 -0700138 VMVX
Scott Toddf8519ca2021-12-16 16:01:49 -0800139 WebGPU
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700140)
141
Scott Todd28cacaa2021-06-29 09:31:46 -0700142if(${IREE_BUILD_COMPILER})
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800143 if(IREE_TARGET_BACKENDS_TO_BUILD STREQUAL "default")
Scott Todd28cacaa2021-06-29 09:31:46 -0700144 set(IREE_TARGET_BACKENDS_TO_BUILD ${IREE_ALL_TARGET_BACKENDS})
Scott Toddf8519ca2021-12-16 16:01:49 -0800145
146 # Disable the WebGPU backend by default, as it has complex dependencies and
147 # is still early in its development.
148 list(REMOVE_ITEM IREE_TARGET_BACKENDS_TO_BUILD WebGPU)
Scott Todd28cacaa2021-06-29 09:31:46 -0700149 endif()
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800150 message(STATUS "Building compiler target backends: ${IREE_TARGET_BACKENDS_TO_BUILD}")
Scott Todd28cacaa2021-06-29 09:31:46 -0700151else()
152 set(IREE_TARGET_BACKENDS_TO_BUILD "" CACHE STRING "" FORCE)
153 message(STATUS "Compiler is disabled, building no target backends")
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700154endif()
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700155
156# Default every IREE_TARGET_BACKEND_* to OFF
157foreach(_backend ${IREE_ALL_TARGET_BACKENDS})
158 string(TOUPPER "${_backend}" uppercase_backend)
159 set(IREE_TARGET_BACKEND_${uppercase_backend} OFF CACHE BOOL "" FORCE)
160endforeach()
161
162# Set IREE_TARGET_BACKEND_* based on configuration
163foreach(_backend ${IREE_TARGET_BACKENDS_TO_BUILD})
164 string(TOUPPER "${_backend}" uppercase_backend)
Marius Brehler30f06a02020-12-18 13:39:26 +0000165 string(REPLACE "\"" "" uppercase_backend ${uppercase_backend})
Marius Brehler0a4b67f2020-05-08 13:19:16 -0700166 set(IREE_TARGET_BACKEND_${uppercase_backend} ON CACHE BOOL "" FORCE)
167endforeach()
168
Ben Vanik185d30c2019-09-19 14:24:11 -0700169list(APPEND CMAKE_MODULE_PATH
170 ${CMAKE_CURRENT_LIST_DIR}/build_tools/cmake/
Marius Brehlerf3d73c92020-01-16 16:11:52 -0800171 ${CMAKE_CURRENT_LIST_DIR}/bindings/python/build_tools/cmake/
Ben Vanik185d30c2019-09-19 14:24:11 -0700172)
Ben Vanik512d2d32019-09-20 13:22:34 -0700173
Lei Zhang0d281b72020-06-01 20:00:23 -0400174#-------------------------------------------------------------------------------
Lei Zhange88470f2020-09-08 13:21:09 -0400175# IREE compilation toolchain configuration
176#-------------------------------------------------------------------------------
177
178# Enable using lld as the linker for C/C++ targets. This affects IREE and all
179# dependency projects.
180option(IREE_ENABLE_LLD "Use lld when linking" OFF)
181option(IREE_ENABLE_ASAN "Enable address sanitizer" OFF)
182option(IREE_ENABLE_MSAN "Enable memory sanitizer" OFF)
183option(IREE_ENABLE_TSAN "Enable thread sanitizer" OFF)
bjacobe694d952020-11-03 12:05:35 -0500184option(IREE_ENABLE_CCACHE "Use ccache if installed to speed up rebuilds." OFF)
185
Ben Vanik85cdd862020-11-14 11:26:12 -0800186if(${IREE_ENABLE_CCACHE})
bjacobe694d952020-11-03 12:05:35 -0500187 find_program(CCACHE_PROGRAM ccache)
188 if(CCACHE_PROGRAM)
189 set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
190 endif()
191endif()
Lei Zhange88470f2020-09-08 13:21:09 -0400192
Geoffrey Martin-Noble3fa4f8d2021-09-10 09:25:27 -0700193option(IREE_DEV_MODE "Configure settings to optimize for IREE development (as opposed to CI or release)" OFF)
Stella Laurenzo5b639122021-06-18 14:44:10 -0700194
195#-------------------------------------------------------------------------------
196# IREE assertions
197# We don't love the way this is done, but we have to line it up with how LLVM
198# does it and not diverge, since all implementations and all header users must
199# have the same definition of NDEBUG.
200#
201# LLVM defaults LLVM_ENABLE_ASSERTIONS to ON for Debug builds only but then
202# conditions itself to only update flags if not building Debug. We just let
203# IREE_ENABLE_ASSERTIONS be not conditioned on anything and only update the
204# flags in appropriate build types.
205#
206# If IREE_ENABLE_ASSERTIONS is set ON manually, then
207# - NDEBUG must be undefined
208# - LLVM_ENABLE_ASSERTIONS is forced off in order to keep multiple parties
209# from mucking with globals.
210#
211# Since CMake forces NDEBUG for !Debug builds, some surgery needs to be done
212# at the top level to avoid divergence.
213#-------------------------------------------------------------------------------
214
215option(IREE_ENABLE_ASSERTIONS "Force unset of NDEBUG compile option" OFF)
216
217# Filter -DNDEBUG from CMAKE_CXX_FLAGS_* and CMAKE_C_FLAGS_* (if
218# CMAKE_BUILD_TYPE is not Debug).
219function(iree_fix_ndebug)
220 string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
221 if(IREE_ENABLE_ASSERTIONS AND NOT "${uppercase_CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
222 # Also remove /D NDEBUG to avoid MSVC warnings about conflicting defines.
223 foreach (flags_var_to_scrub
224 CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}
225 CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE})
226 set(original_flags "${${flags_var_to_scrub}}")
227 string (REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " "
228 altered_flags "${original_flags}")
229 if(NOT "${original_flags}" STREQUAL "${altered_flags}")
230 message(STATUS
231 "IREE_ENABLE_ASSERTIONS force disabled NDEBUG for ${flags_var_to_scrub}: '${original_flags}' -> '${altered_flags}'")
232 set(${flags_var_to_scrub} "${altered_flags}" PARENT_SCOPE)
233 endif()
234 endforeach()
235
236 # Make sure that LLVM doesn't add its own logic for assertion disabling.
237 # We'd like to make sure that we are not dueling over globals.
238 set(LLVM_ENABLE_ASSERTIONS OFF PARENT_SCOPE)
239 endif()
240endfunction()
241iree_fix_ndebug()
242
Lei Zhange88470f2020-09-08 13:21:09 -0400243#-------------------------------------------------------------------------------
Lei Zhang7e253da2020-06-10 07:51:19 -0700244# IREE utility definitions
Lei Zhang0d281b72020-06-01 20:00:23 -0400245#-------------------------------------------------------------------------------
246
Ben Vanik512d2d32019-09-20 13:22:34 -0700247include(iree_macros)
Ben Vanik185d30c2019-09-19 14:24:11 -0700248include(iree_copts)
bjacobc12ba3b2020-11-03 10:32:00 -0500249include(sanitizers)
Ben Vanik6b112ef2019-10-03 10:45:14 -0700250include(iree_cc_binary)
Ben Vanik185d30c2019-09-19 14:24:11 -0700251include(iree_cc_library)
252include(iree_cc_test)
Ben Vanikcc2aff92019-09-24 10:23:55 -0700253include(iree_tablegen_library)
Lei Zhang22f0e242020-03-30 12:09:20 -0700254include(iree_tablegen_doc)
Stella Laurenzo275215d2021-08-06 11:50:28 -0700255include(iree_third_party_cmake_options)
CindyLiu40ed02d2021-04-22 16:16:28 +0000256include(iree_c_embed_data)
Scott Todd11adcab2019-12-18 14:10:44 -0800257include(iree_bytecode_module)
Marius Brehler46e83312021-03-25 00:11:39 +0100258include(iree_c_module)
Stella Laurenzo94363e22020-12-15 13:46:14 -0800259include(iree_python)
Geoffrey Martin-Noblef0eaf372020-01-28 10:03:14 -0800260include(iree_lit_test)
Geoffrey Martin-Noble4526dcc2020-03-09 11:59:52 -0700261include(iree_add_all_subdirs)
Geoffrey Martin-Noblee5fd5b52020-03-31 11:31:30 -0700262include(iree_check_test)
bjacob5feef482021-10-21 16:53:58 -0400263include(iree_trace_runner_test)
Geoffrey Martin-Noble48896122021-01-05 21:04:18 -0800264include(iree_run_binary_test)
Geoffrey Martin-Noble66d48892021-10-29 12:24:58 -0700265include(iree_benchmark_suite)
Scott Todd434ff0e2021-12-21 10:38:36 -0800266include(iree_hal_cts_test_suite)
Ben Vanik185d30c2019-09-19 14:24:11 -0700267
Marius Brehlerc4b6b912020-01-15 08:44:23 -0800268set(DEFAULT_CMAKE_BUILD_TYPE "Release")
Ben Vanik85cdd862020-11-14 11:26:12 -0800269if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
Marius Brehlerc4b6b912020-01-15 08:44:23 -0800270 message(STATUS "No build type selected, default to ${DEFAULT_CMAKE_BUILD_TYPE}")
271 set(CMAKE_BUILD_TYPE "${DEFAULT_CMAKE_BUILD_TYPE}" CACHE STRING "Build type (default ${DEFAULT_CMAKE_BUILD_TYPE})" FORCE)
272endif()
273
Marius Brehler06ac36e2020-01-10 14:44:11 -0800274set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
275
Ben Vanik185d30c2019-09-19 14:24:11 -0700276#-------------------------------------------------------------------------------
Lei Zhange88470f2020-09-08 13:21:09 -0400277# IREE compilation flags
Scott Todd29d654e2020-06-11 15:24:17 -0700278#-------------------------------------------------------------------------------
279
Lei Zhangdd21f322020-09-10 10:47:33 -0400280iree_append_list_to_string(CMAKE_C_FLAGS_DEBUG ${IREE_C_FLAGS_DEBUG_LIST})
281iree_append_list_to_string(CMAKE_CXX_FLAGS_DEBUG ${IREE_CXX_FLAGS_DEBUG_LIST})
Scott Todd29d654e2020-06-11 15:24:17 -0700282
283set(CMAKE_CXX_FLAGS_FASTBUILD "-gmlt" CACHE STRING "Flags used by the C++ compiler during fast builds." FORCE)
284set(CMAKE_C_FLAGS_FASTBUILD "-gmlt" CACHE STRING "Flags used by the C compiler during fast builds." FORCE)
285set(CMAKE_EXE_LINKER_FLAGS_FASTBUILD "-Wl,-S" CACHE STRING "Flags used for linking binaries during fast builds." FORCE)
286set(CMAKE_SHARED_LINKER_FLAGS_FASTBUILD "-Wl,-S" CACHE STRING "Flags used by the shared libraries linker binaries during fast builds." FORCE)
287mark_as_advanced(
288 CMAKE_CXX_FLAGS_FASTBUILD
289 CMAKE_C_FLAGS_FASTBUILD
290 CMAKE_EXE_LINKER_FLAGS_FASTBUILD
291 CMAKE_SHARED_LINKER_FLAGS_FASTBUILD
292)
293
294include(iree_setup_toolchain)
295
296#-------------------------------------------------------------------------------
Stella Laurenzo29032b82021-10-14 15:21:44 -0700297# Python
298# If building features that require Python development, find them early in
299# one invocation (some CMake versions are sensitive to resolving out of order).
300# Otherwise, for features that just require the interpreter, find that alone.
Stella Laurenzoa3e97f12020-12-05 23:29:13 -0800301#-------------------------------------------------------------------------------
302
Stella Laurenzo29032b82021-10-14 15:21:44 -0700303if(IREE_BUILD_PYTHON_BINDINGS)
304 # After CMake 3.18, we are able to limit the scope of the search to just
305 # Development.Module. Searching for Development will fail in situations where
306 # the Python libraries are not available. When possible, limit to just
307 # Development.Module.
308 # See https://pybind11.readthedocs.io/en/stable/compiling.html#findpython-mode
309 if(CMAKE_VERSION VERSION_LESS "3.18.0")
310 message(WARNING
311 "This version of CMake is not compatible with statically built Python "
312 "installations. If Python fails to detect below this may apply to you. "
313 "Recommend upgrading to at least CMake 3.18. "
314 "Detected current version: ${CMAKE_VERSION}"
315 )
316 find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
317 else()
318 find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
319 endif()
Stella Laurenzo3149b6d2021-10-24 18:45:17 -0700320elseif(IREE_BUILD_COMPILER OR IREE_BUILD_TESTS)
Stella Laurenzoa3e97f12020-12-05 23:29:13 -0800321 find_package(Python3 COMPONENTS Interpreter REQUIRED)
322endif()
323
Stella Laurenzo3149b6d2021-10-24 18:45:17 -0700324# Extended Python environment checks.
325if(Python3_FOUND)
326 iree_detect_pyyaml()
327endif()
328
329if(IREE_BUILD_TESTS AND NOT IREE_PYYAML_FOUND)
330 message(WARNING "IREE's regression test suite requires PyYAML to run all tests. It is not installed, so some tests will be disabled.")
331endif()
332
Stella Laurenzoa3e97f12020-12-05 23:29:13 -0800333#-------------------------------------------------------------------------------
Niloy Sikdar47238df2021-07-28 23:37:33 +0530334# Check if git submodules have been initialized.
335# This will only run if python3 is available.
336#-------------------------------------------------------------------------------
337
Marius Brehler776d7e62021-12-21 22:50:52 +0100338option(IREE_ERROR_ON_MISSING_SUBMODULES "Error if submodules have not been initialized." ON)
339
Niloy Sikdar47238df2021-07-28 23:37:33 +0530340find_package(Python3 COMPONENTS Interpreter QUIET)
Scott Todde5b269a2021-11-16 15:25:02 -0800341find_package(Git)
Marius Brehler776d7e62021-12-21 22:50:52 +0100342if(IREE_ERROR_ON_MISSING_SUBMODULES AND Python3_FOUND AND Git_FOUND)
Scott Todde5b269a2021-11-16 15:25:02 -0800343 # Only check submodule status when the git commit changes.
Niloy Sikdar47238df2021-07-28 23:37:33 +0530344 execute_process(
Scott Todde5b269a2021-11-16 15:25:02 -0800345 COMMAND git rev-parse --short HEAD
Niloy Sikdar47238df2021-07-28 23:37:33 +0530346 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
Scott Todde5b269a2021-11-16 15:25:02 -0800347 RESULT_VARIABLE SHORT_HASH_RESULT
348 OUTPUT_VARIABLE SHORT_HASH)
349 string(REGEX REPLACE "\n$" "" SHORT_HASH "${SHORT_HASH}")
Scott Todd2a8cd3b2021-12-13 11:58:44 -0800350 if(SHORT_HASH_RESULT EQUAL "0" AND NOT "${IREE_GIT_SHORT_HASH}" STREQUAL "${SHORT_HASH}")
Scott Todde5b269a2021-11-16 15:25:02 -0800351 execute_process(
352 COMMAND ${Python3_EXECUTABLE} scripts/git/check_submodule_init.py
353 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
354 RESULT_VARIABLE SUBMODULE_INIT_RESULT
355 )
356 if(NOT SUBMODULE_INIT_RESULT EQUAL "0")
357 message(FATAL_ERROR "check_submodule_init.py failed, see the logs above")
358 else()
359 set(IREE_GIT_SHORT_HASH "${SHORT_HASH}" CACHE STRING "" FORCE)
360 endif()
Niloy Sikdar47238df2021-07-28 23:37:33 +0530361 endif()
362endif()
363
364#-------------------------------------------------------------------------------
Stella Laurenzo382122d2020-06-11 16:18:09 -0700365# MLIR/LLVM Dependency
Stella Laurenzo382122d2020-06-11 16:18:09 -0700366#-------------------------------------------------------------------------------
367
Stella Laurenzo275215d2021-08-06 11:50:28 -0700368if(NOT IREE_BUILD_COMPILER)
369 message(STATUS "Not adding LLVM/MLIR because the configuration does not require it")
370elseif(TARGET LLVMSupport)
371 message(STATUS "Not adding IREE bundled LLVM because it has already been included")
372 if(NOT TARGET MLIRIR)
373 message(FATAL_ERROR "Detected externally provided LLVM project but could not find MLIR projects (is it enabled/installed?)")
Stella Laurenzo382122d2020-06-11 16:18:09 -0700374 endif()
Stella Laurenzo275215d2021-08-06 11:50:28 -0700375else()
376 message(STATUS "Adding bundled LLVM source dependency")
377 iree_set_llvm_cmake_options()
Stella Laurenzo382122d2020-06-11 16:18:09 -0700378
Stella Laurenzo688670f2021-09-24 18:16:25 -0700379 # Enable MLIR Python bindings if IREE Python bindings enabled.
380 if(IREE_BUILD_PYTHON_BINDINGS)
381 set(MLIR_ENABLE_BINDINGS_PYTHON ON CACHE BOOL "" FORCE)
382 set(MHLO_ENABLE_BINDINGS_PYTHON ON CACHE BOOL "" FORCE)
383 endif()
384
Stella Laurenzo275215d2021-08-06 11:50:28 -0700385 # Disable LLVM's warnings.
386 set(LLVM_ENABLE_WARNINGS OFF CACHE BOOL "don't use global flags /facepalm")
387
Ben Vanik89a77fa2020-10-07 17:19:31 -0700388 # Stash cmake build type in case LLVM messes with it.
389 set(_CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
390
Stella Laurenzo62fbef02021-08-09 20:52:48 -0700391 # Add default external projects.
Stella Laurenzo02230c12021-08-10 03:58:42 +0000392 iree_add_llvm_external_project(mlir-iree-dialects MLIR_IREE_DIALECTS ${CMAKE_CURRENT_SOURCE_DIR}/llvm-external-projects/iree-dialects)
Stella Laurenzo62fbef02021-08-09 20:52:48 -0700393 iree_add_llvm_external_project(mlir-hlo MLIR_HLO ${CMAKE_CURRENT_SOURCE_DIR}/third_party/mlir-hlo)
394
Stella Laurenzo275215d2021-08-06 11:50:28 -0700395 add_subdirectory("third_party/llvm-project/llvm" EXCLUDE_FROM_ALL)
Stella Laurenzo382122d2020-06-11 16:18:09 -0700396
Ben Vanik89a77fa2020-10-07 17:19:31 -0700397 # Reset CMAKE_BUILD_TYPE to its previous setting.
Stella Laurenzo382122d2020-06-11 16:18:09 -0700398 set(CMAKE_BUILD_TYPE "${_CMAKE_BUILD_TYPE}" CACHE STRING "Build type (default ${DEFAULT_CMAKE_BUILD_TYPE})" FORCE)
Stella Laurenzo382122d2020-06-11 16:18:09 -0700399
Stella Laurenzo275215d2021-08-06 11:50:28 -0700400 # Extend module path to allow submodules to use LLVM and MLIR CMake modules.
401 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/mlir")
402 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_BINARY_DIR}/third_party/llvm-project/llvm/lib/cmake/llvm/")
Marius Brehler71f76cb2020-11-10 20:56:55 +0100403
Stella Laurenzo275215d2021-08-06 11:50:28 -0700404 # Add the bundled include directories for cmake files looking for them.
405 list(APPEND LLVM_INCLUDE_DIRS
406 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/llvm-project/llvm/include
407 ${CMAKE_CURRENT_BINARY_DIR}/third_party/llvm-project/llvm/include
408 )
409 list(APPEND MLIR_INCLUDE_DIRS
410 ${CMAKE_CURRENT_SOURCE_DIR}/third_party/llvm-project/mlir/include
411 ${CMAKE_CURRENT_BINARY_DIR}/third_party/llvm-project/llvm/tools/mlir/include
412 )
Marius Brehler71f76cb2020-11-10 20:56:55 +0100413
Stella Laurenzo62fbef02021-08-09 20:52:48 -0700414 function(_hack_llvm_include_paths)
415 set(_common_include_dirs
416 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/third_party/llvm-project/llvm/include>
417 $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/third_party/llvm-project/llvm/include>
418 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/third_party/llvm-project/mlir/include>
419 $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/third_party/llvm-project/llvm/tools/mlir/include>
420 $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/third_party/llvm-project/llvm/tools/mlir-hlo/include>
421 )
422 # Avoid globally modifying paths by instead adding the include paths to the
423 # rules that really should have them in the first place.
424 target_include_directories(LLVMSupport PUBLIC ${_common_include_dirs})
425 target_include_directories(MLIRSupport PUBLIC ${_common_include_dirs})
426 endfunction()
427 _hack_llvm_include_paths()
Stella Laurenzo382122d2020-06-11 16:18:09 -0700428endif()
429
Stella Laurenzo382122d2020-06-11 16:18:09 -0700430#-------------------------------------------------------------------------------
Scott Todd8b0b0cd2021-12-16 15:13:57 -0800431# Other dependencies
Stella Laurenzoa3e97f12020-12-05 23:29:13 -0800432#-------------------------------------------------------------------------------
433
Ben Vanik512d2d32019-09-20 13:22:34 -0700434include(external_cc_library)
Ben Vanik2d1808b2020-07-17 19:02:16 -0700435include(flatbuffer_c_library)
Ben Vanik512d2d32019-09-20 13:22:34 -0700436
Thomas3079fb12021-05-12 20:31:20 -0700437add_subdirectory(build_tools/third_party/cuda EXCLUDE_FROM_ALL)
Ben Vanika9036492021-06-25 09:39:53 -0700438add_subdirectory(build_tools/third_party/libyaml EXCLUDE_FROM_ALL)
CindyLiu807f4572021-05-12 23:41:41 +0000439add_subdirectory(build_tools/third_party/stblib EXCLUDE_FROM_ALL)
Ben Vanika9036492021-06-25 09:39:53 -0700440add_subdirectory(build_tools/third_party/vulkan_memory_allocator EXCLUDE_FROM_ALL)
Ben Vanik512d2d32019-09-20 13:22:34 -0700441
Stella Laurenzo275215d2021-08-06 11:50:28 -0700442iree_set_googletest_cmake_options()
Marius Brehlerf5022e82019-12-13 15:20:25 -0800443add_subdirectory(third_party/googletest EXCLUDE_FROM_ALL)
Stella Laurenzo275215d2021-08-06 11:50:28 -0700444
445if(IREE_ENABLE_THREADING)
446 iree_set_benchmark_cmake_options()
Cindy Liu331946c2021-06-01 12:20:30 -0700447 add_subdirectory(third_party/benchmark EXCLUDE_FROM_ALL)
Stella Laurenzo275215d2021-08-06 11:50:28 -0700448 iree_set_cpuinfo_cmake_options()
Cindy Liu331946c2021-06-01 12:20:30 -0700449 add_subdirectory(third_party/cpuinfo EXCLUDE_FROM_ALL)
Cindy Liu331946c2021-06-01 12:20:30 -0700450endif()
Stella Laurenzo275215d2021-08-06 11:50:28 -0700451
Stella Laurenzo275215d2021-08-06 11:50:28 -0700452add_subdirectory(build_tools/third_party/flatcc EXCLUDE_FROM_ALL)
Stella Laurenzo275215d2021-08-06 11:50:28 -0700453
Ben Vanik512d2d32019-09-20 13:22:34 -0700454add_subdirectory(third_party/vulkan_headers EXCLUDE_FROM_ALL)
Ben Vanik185d30c2019-09-19 14:24:11 -0700455
Scott Todd4e1a69b2021-01-25 15:29:49 -0800456# TODO(scotttodd): Iterate some more and find a better place for this.
457if (NOT CMAKE_CROSSCOMPILING)
Ben Vanik68747192021-10-26 20:38:45 -0700458 install(
459 TARGETS iree-flatcc-cli
460 COMPONENT iree-flatcc-cli
461 RUNTIME DESTINATION bin
462 )
Lei Zhang0d281b72020-06-01 20:00:23 -0400463endif()
464
Stella Laurenzo275215d2021-08-06 11:50:28 -0700465if(IREE_BUILD_COMPILER)
Marius Brehler3eaf4442021-01-13 18:22:08 +0100466 add_subdirectory(build_tools/third_party/mlir-hlo EXCLUDE_FROM_ALL)
Ben Vanikcc2aff92019-09-24 10:23:55 -0700467endif()
468
Stella Laurenzo275215d2021-08-06 11:50:28 -0700469if(IREE_BUILD_TESTS)
Marius Brehler575b63a2020-01-07 09:39:24 -0800470 enable_testing(iree)
Marius Brehler29676502019-12-27 17:07:10 -0800471endif()
472
MaheshRavishankar1547ac22021-09-23 15:22:46 -0700473if(IREE_BUILD_PYTHON_BINDINGS)
Stella Laurenzo95ad84c2021-09-24 14:56:01 -0700474 if(NOT TARGET pybind11::module)
475 message(STATUS "Using bundled pybind11")
476 add_subdirectory(third_party/pybind11 EXCLUDE_FROM_ALL)
477 else()
478 message(STATUS "Not including bundled pybind11 (already configured)")
479 endif()
Marius Brehlerf3d73c92020-01-16 16:11:52 -0800480endif()
481
Stella Laurenzo275215d2021-08-06 11:50:28 -0700482if(IREE_TARGET_BACKEND_METAL-SPIRV)
483 iree_set_spirv_cross_cmake_options()
Lei Zhang3cbb28e2020-09-22 15:30:27 -0400484 # SPIRV-Cross is needed to cross compile SPIR-V into MSL source code.
485 add_subdirectory(third_party/spirv_cross EXCLUDE_FROM_ALL)
486endif()
487
Scott Toddf8519ca2021-12-16 16:01:49 -0800488if(IREE_TARGET_BACKEND_WEBGPU)
489 # Tint is needed to compile SPIR-V into WGSL source code.
490 # Tint also requires SPIRV-Tools, which requires SPIRV-Headers.
491 iree_set_spirv_headers_cmake_options()
492 add_subdirectory(third_party/spirv_headers EXCLUDE_FROM_ALL)
493 add_subdirectory(build_tools/third_party/spirv-tools EXCLUDE_FROM_ALL)
494 add_subdirectory(build_tools/third_party/tint EXCLUDE_FROM_ALL)
495endif()
496
Ben Vanik185d30c2019-09-19 14:24:11 -0700497#-------------------------------------------------------------------------------
Lei Zhang22f0e242020-03-30 12:09:20 -0700498# IREE top-level targets
499#-------------------------------------------------------------------------------
500
Lei Zhangfe4403e2021-06-01 15:09:43 -0400501if(${IREE_BUILD_BENCHMARKS})
502 # Add a top-level custom target to drive generating benchmark suites.
503 add_custom_target(iree-benchmark-suites)
504endif()
505
Lei Zhang22f0e242020-03-30 12:09:20 -0700506if(${IREE_BUILD_DOCS})
507 # Add a top-level custom target to drive generating all documentation.
508 # Register it to the default target given that IREE_BUILD_DOCS is explicitly
509 # requested.
510 add_custom_target(iree-doc ALL)
511endif()
512
513#-------------------------------------------------------------------------------
Ben Vanik185d30c2019-09-19 14:24:11 -0700514# IREE top-level libraries
515#-------------------------------------------------------------------------------
516
Marius Brehlerf5022e82019-12-13 15:20:25 -0800517add_subdirectory(build_tools/embed_data/)
518
Ben Vanik185d30c2019-09-19 14:24:11 -0700519add_subdirectory(iree/base)
Ben Vanik658cf6c2021-11-22 10:35:41 -0800520add_subdirectory(iree/builtins)
Ben Vanik512d2d32019-09-20 13:22:34 -0700521add_subdirectory(iree/hal)
Marius Brehler9317d1f2020-01-08 10:34:11 -0800522add_subdirectory(iree/modules)
Ben Vanikb69d0cc2021-05-05 18:16:22 -0700523add_subdirectory(iree/runtime)
Ben Vanik512d2d32019-09-20 13:22:34 -0700524add_subdirectory(iree/schemas)
Ben Vanik01600a52020-12-15 17:18:04 -0800525add_subdirectory(iree/task)
Marius Brehler29676502019-12-27 17:07:10 -0800526add_subdirectory(iree/testing)
Marius Brehler476031a2020-03-24 16:14:30 -0700527add_subdirectory(iree/test)
not-jennibd3610e2020-12-23 17:00:22 -0800528add_subdirectory(iree/vm)
Lei Zhangff38a682021-06-08 21:12:24 -0400529
530if(${IREE_BUILD_BENCHMARKS})
Lei Zhang08cea042021-07-20 12:44:01 -0400531 add_subdirectory(benchmarks)
Lei Zhangff38a682021-06-08 21:12:24 -0400532endif()
533
raikonenfnu4b31bd92021-05-18 18:20:25 -0700534if(${IREE_BUILD_EXPERIMENTAL_ROCM})
535 add_subdirectory(build_tools/third_party/rocm EXCLUDE_FROM_ALL)
536 add_subdirectory(experimental/rocm)
raikonenfnu4b31bd92021-05-18 18:20:25 -0700537endif()
Ben Vanikcc2aff92019-09-24 10:23:55 -0700538
539if(${IREE_BUILD_COMPILER})
540 add_subdirectory(iree/compiler)
541endif()
Ben Vanik6b112ef2019-10-03 10:45:14 -0700542
543add_subdirectory(iree/tools)
544
Stella Laurenzod3770ff2021-10-18 22:54:18 -0700545if(IREE_BUILD_TRACY)
Stella Laurenzo3149b6d2021-10-24 18:45:17 -0700546 if(NOT CMAKE_SYSTEM_NAME MATCHES "Linux")
Stella Laurenzod3770ff2021-10-18 22:54:18 -0700547 message(WARNING "Building Tracy (IREE_BUILD_TRACY) on non-Linux is unsupported and may fail below.")
548 endif()
549 add_subdirectory(build_tools/third_party/tracy ${CMAKE_CURRENT_BINARY_DIR}/tracy)
550 if(NOT TARGET IREETracyCaptureServer)
551 message(SEND_ERROR "Could not build Tracy. Either unset IREE_BUILD_TRACY or look for missing dependencies above and install them.")
552 endif()
553endif()
554
Stella Laurenzo77a63cd2021-01-04 17:29:54 -0800555# Order constraint: The python bindings install tools targets from iree/tools
Stella Laurenzod3770ff2021-10-18 22:54:18 -0700556# and tracy, and must come after it.
Stella Laurenzo77a63cd2021-01-04 17:29:54 -0800557if(${IREE_BUILD_PYTHON_BINDINGS})
558 add_subdirectory(bindings/python)
559endif()
560
Ben Vanikcd1132f2021-01-29 15:58:17 -0800561if(${IREE_BUILD_BINDINGS_TFLITE})
562 add_subdirectory(bindings/tflite)
563endif()
564
Ben Vanik6b112ef2019-10-03 10:45:14 -0700565if(${IREE_BUILD_SAMPLES})
566 add_subdirectory(iree/samples)
567endif()
Ben Vanikb64e9182020-01-30 15:19:37 -0800568
Stella Laurenzo0f005e52020-12-27 11:54:33 -0800569if(${IREE_BUILD_EXPERIMENTAL_REMOTING})
570 # NOTE: Currently liburing is only used by the experimental remoting
571 # support, so keeping it scoped here. If this broadens, then include along
572 # with other dependencies as normal.
573 if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
574 message(STATUS "Enabling liburing")
575 add_subdirectory(build_tools/third_party/liburing EXCLUDE_FROM_ALL)
576 endif()
577 add_subdirectory(experimental/remoting)
Ben Vanikb64e9182020-01-30 15:19:37 -0800578endif()
Scott Toddee30e1b2020-02-03 16:44:15 -0800579
Stella Laurenzoa4137ef2020-12-09 21:28:08 -0800580if(${IREE_ENABLE_TENSORFLOW})
Stella Laurenzoa3e97f12020-12-05 23:29:13 -0800581 add_subdirectory(integrations/tensorflow)
582endif()
583
Stella Laurenzo03e48db2020-06-11 18:35:13 -0700584set(IREE_PUBLIC_INCLUDE_DIRS "${IREE_COMMON_INCLUDE_DIRS}"
585 CACHE INTERNAL "IREE: Include Directories" FORCE)
Stella Laurenzo688670f2021-09-24 18:16:25 -0700586
587# Include the iree-compiler-api sub-project. We do this for development
588# and CI so that developers have access to the API and tools it provides
589# (otherwise, they would need to build multiple top-level projects).
590# However, logically, iree-compiler-api depends on iree, and for deployment
591# is always built standalone, taking responsibility to include iree and LLVM
592# as sub-projects.
593# The dependency mode is controlled by the variables
594# IREE_COMPILER_API_STANDALONE, which will be set if iree-compiler-api is
595# top-level. Otherwise, we set IREE_COMPILER_API_SUB_PROJECT, indicating it
596# is being embedded as a sub project.
597if(IREE_BUILD_COMPILER AND IREE_BUILD_PYTHON_BINDINGS)
598 if(NOT IREE_COMPILER_API_STANDALONE)
599 message(STATUS "Including iree-compiler-api as a sub-project")
600 set(IREE_COMPILER_API_SUB_PROJECT ON)
601 add_subdirectory(llvm-external-projects/iree-compiler-api
602 "${CMAKE_CURRENT_BINARY_DIR}/compiler-api")
Stella Laurenzo48a43302021-09-28 17:49:33 -0700603
604 # Write out a .env file to make IDEs and developers happy.
605 # Yes, we are writing this to the source dir. It is only for IDEs and if
606 # it gets clobbered, it is fine.
607 set(_pythonpath_env "PYTHONPATH=$<SHELL_PATH:${CMAKE_CURRENT_BINARY_DIR}/compiler-api/python_package;${CMAKE_CURRENT_BINARY_DIR}/bindings/python>\n")
608 file(GENERATE OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/.env"
609 CONTENT "${_pythonpath_env}"
610 )
611 file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/.env"
612 CONTENT "${_pythonpath_env}"
613 )
614
615 # TODO: Remove this after about Dec-2021
616 if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/bindings/python/iree/compiler")
617 message(FATAL_ERROR "You are running in a build directory which needs some manual cleanup. Please delete the directory ${CMAKE_CURRENT_BINARY_DIR}/bindings/python/iree/compiler")
618 endif()
Stella Laurenzo688670f2021-09-24 18:16:25 -0700619 endif()
620endif()