Merge main into google.
* Ignores local changes to deleted file.
diff --git a/.gitmodules b/.gitmodules
index dcedcea..c6ec233 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -26,12 +26,6 @@
[submodule "third_party/benchmark"]
path = third_party/benchmark
url = https://github.com/google/benchmark.git
-[submodule "third_party/sdl2"]
- path = third_party/sdl2
- url = https://github.com/SDL-mirror/SDL.git
-[submodule "third_party/dear_imgui"]
- path = third_party/dear_imgui
- url = https://github.com/ocornut/imgui.git
[submodule "third_party/ruy"]
path = third_party/ruy
url = https://github.com/google/ruy
diff --git a/BUILD.bazel b/BUILD.bazel
index f3de1d2..4926889 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -30,7 +30,6 @@
# "@iree_pybind11//"
# "@renderdoc_api//"
# "@com_google_ruy//"
-# "@sdl2//"
# "@org_tensorflow//tensorflow/"
# "@com_google_tracing_framework_cpp//"
# "@iree_vulkan_headers//"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f08720..d46965d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -450,17 +450,6 @@
add_subdirectory(build_tools/third_party/tensorflow/tensorflow/compiler/mlir/hlo EXCLUDE_FROM_ALL)
endif()
-if(${IREE_BUILD_DEBUGGER} OR ${IREE_BUILD_SAMPLES})
- # sdl2 logs are spammy - change log level while adding
- function(include_sdl2)
- set(CMAKE_MESSAGE_LOG_LEVEL "WARNING")
- add_subdirectory(third_party/sdl2 EXCLUDE_FROM_ALL)
- endfunction()
- include_sdl2()
-
- add_subdirectory(build_tools/third_party/dear_imgui EXCLUDE_FROM_ALL)
-endif()
-
if(${IREE_BUILD_TESTS})
add_subdirectory(third_party/benchmark EXCLUDE_FROM_ALL)
enable_testing(iree)
diff --git a/SUBMODULE_VERSIONS b/SUBMODULE_VERSIONS
index 4475e30..d1af81b 100644
--- a/SUBMODULE_VERSIONS
+++ b/SUBMODULE_VERSIONS
@@ -1,7 +1,6 @@
6ec136281086b71da32b5fb068bd6e46b78a5c79 third_party/abseil-cpp
daff5fead3fbe22c6fc58310ca3f49caf117f185 third_party/benchmark
63b254577ed77a8004a9be6ac707f3dccc4e1fd9 third_party/cpuinfo
-4c13807b7d43ff0946b7ffea0ae3aee9e611d778 third_party/dear_imgui
4fb0ff7069bd88ee85902f4d0bb62794e5f6d021 third_party/flatcc
b1fbd33c06cdb0024c67733c6fdec2009d17b384 third_party/googletest
bfc60e6cfe4d298f1662042f21f55c0ddd409749 third_party/llvm-bazel
@@ -10,7 +9,6 @@
74d7261be17cf659d5930d4830609406bd7553e3 third_party/pffft
d8c7ee00a687ac369e62e2032514a93a9b413502 third_party/pybind11
d79362c24fd70eab3196672273dbfd8f0dd6124c third_party/ruy
-a1390ed39ec77ecfb574bc6fcd5bfc5e3adbdea9 third_party/sdl2
685f86471e9d26b3eb7676695a2e2cefb4551ae9 third_party/spirv_cross
f8bf11a0253a32375c32cad92c841237b96696c0 third_party/spirv_headers
49d9c97061d3ff3d957af4d60d8a1ad701a5d106 third_party/tensorflow
diff --git a/WORKSPACE b/WORKSPACE
index d0b6ecf..0830b20 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -253,30 +253,6 @@
maybe(
new_local_repository,
- name = "sdl2",
- build_file = "build_tools/third_party/sdl2/BUILD.overlay",
- path = "third_party/sdl2",
-)
-
-maybe(
- new_local_repository,
- name = "sdl2_config",
- build_file_content = """
-package(default_visibility = ["//visibility:public"])
-cc_library(name = "headers", srcs = glob(["*.h"]))
-""",
- path = "build_tools/third_party/sdl2",
-)
-
-maybe(
- new_local_repository,
- name = "dear_imgui",
- build_file = "build_tools/third_party/dear_imgui/BUILD.overlay",
- path = "third_party/dear_imgui",
-)
-
-maybe(
- new_local_repository,
name = "renderdoc_api",
build_file = "build_tools/third_party/renderdoc_api/BUILD.overlay",
path = "third_party/renderdoc_api",
diff --git a/bindings/python/build_tools/python/generate_build.py b/bindings/python/build_tools/python/generate_build.py
index 5d3a5d5..71d3491 100644
--- a/bindings/python/build_tools/python/generate_build.py
+++ b/bindings/python/build_tools/python/generate_build.py
@@ -42,8 +42,8 @@
minor=sys.version_info[1])
implib_abs_path = os.path.join(exec_prefix, "libs", implib_basename)
if not os.path.exists(implib_abs_path):
- raise RuntimeError("Could not find Windows python import library: %s" %
- (implib_abs_path,))
+ raise RuntimeError(
+ f"Could not find Windows python import library: {implib_abs_path}")
implib_ws_path = "libs/" + implib_basename
print("# SYMLINK: {abs}\t{ws}".format(abs=implib_abs_path, ws=implib_ws_path))
extra_srcs.append(implib_ws_path)
diff --git a/bindings/python/pyiree/compiler2/core.py b/bindings/python/pyiree/compiler2/core.py
index 7ea85d5..849e229 100644
--- a/bindings/python/pyiree/compiler2/core.py
+++ b/bindings/python/pyiree/compiler2/core.py
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# TODO(#4131) python>=3.7: Use postponed type annotations.
+
from enum import Enum
import subprocess
from typing import Any, Dict, List, Optional, Sequence, Union
@@ -58,6 +60,7 @@
return OutputFormat[spec]
+# TODO(#4131) python>=3.7: Consider using a dataclass.
class CompilerOptions:
"""Options to the compiler backend.
diff --git a/bindings/python/pyiree/compiler2/tf.py b/bindings/python/pyiree/compiler2/tf.py
index 90423c5..9ac0eae 100644
--- a/bindings/python/pyiree/compiler2/tf.py
+++ b/bindings/python/pyiree/compiler2/tf.py
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# TODO(#4131) python>=3.7: Use postponed type annotations.
+
from enum import Enum
import logging
import tempfile
@@ -76,6 +78,7 @@
return ImportType[spec]
+# TODO(#4131) python>=3.7: Consider using a dataclass.
class ImportOptions(CompilerOptions):
"""Import options layer on top of the backend compiler options."""
diff --git a/bindings/python/pyiree/compiler2/tools.py b/bindings/python/pyiree/compiler2/tools.py
index 6083840..1d32a15 100644
--- a/bindings/python/pyiree/compiler2/tools.py
+++ b/bindings/python/pyiree/compiler2/tools.py
@@ -149,7 +149,7 @@
run_args["input"] = immediate_input
# Capture output.
- # Upgrade note: Python >= 3.7 can just use capture_output=True
+ # TODO(#4131) python>=3.7: Use capture_output=True.
run_args["stdout"] = subprocess.PIPE
run_args["stderr"] = subprocess.PIPE
process = subprocess.run(command_line, **run_args)
diff --git a/bindings/python/pyiree/rt/system_api.py b/bindings/python/pyiree/rt/system_api.py
index c75fbad..427e318 100644
--- a/bindings/python/pyiree/rt/system_api.py
+++ b/bindings/python/pyiree/rt/system_api.py
@@ -23,6 +23,8 @@
# pylint: disable=unused-argument
# pylint: disable=g-explicit-length-test
+# TODO(#4131) python>=3.7: Use postponed type annotations.
+
__all__ = ["load_module", "load_modules", "Config", "SystemContext"]
import os
@@ -58,7 +60,7 @@
driver_exceptions = {}
for driver_name in driver_names:
if driver_name not in available_driver_names:
- print("Could not create driver %s (not registered)" % driver_name,
+ print(f"Could not create driver {driver_name} (not registered)",
file=sys.stderr)
continue
try:
@@ -66,7 +68,7 @@
# TODO(laurenzo): Remove these prints to stderr (for now, more information
# is better and there is no better way to report it yet).
except Exception as ex: # pylint: disable=broad-except
- print("Could not create default driver %s: %r" % (driver_name, ex),
+ print(f"Could not create default driver {driver_name}: {ex:!r}",
file=sys.stderr)
driver_exceptions[driver_name] = ex
continue
@@ -78,18 +80,18 @@
try:
device = driver.create_default_device()
except Exception as ex:
- print("Could not create default driver device %s: %r" % (driver_name, ex),
+ print(f"Could not create default driver device {driver_name}: {ex:!r}",
file=sys.stderr)
driver_exceptions[driver_name] = ex
continue
- print("Created IREE driver %s: %r" % (driver_name, driver), file=sys.stderr)
+ print("Created IREE driver {driver_name}: {driver:!r}", file=sys.stderr)
return driver
# All failed.
- raise RuntimeError("Could not create any requested driver "
- "%r (available=%r) : %r" %
- (driver_names, available_driver_names, driver_exceptions))
+ raise RuntimeError(
+ f"Could not create any requested driver {repr(driver_names)} (available="
+ f"{repr(available_driver_names)}) : {repr(driver_exceptions)}")
class Config:
@@ -147,10 +149,7 @@
return unpacked_results
def __repr__(self):
- return "<BoundFunction %r (%r)>" % (
- self._abi,
- self._vm_function,
- )
+ return f"<BoundFunction {repr(self._abi)} ({repr(self._vm_function)})>"
def get_serialized_values(self):
if self._serialized_inputs is None:
@@ -187,14 +186,13 @@
vm_function = self._vm_module.lookup_function(name)
if vm_function is None:
- raise KeyError("Function '%s' not found in module '%s'" %
- (name, self.name))
+ raise KeyError(f"Function '{name}' not found in module '{self.name}'")
bound_function = BoundFunction(self._context, vm_function)
self._lazy_functions[name] = bound_function
return bound_function
def __repr__(self):
- return "<BoundModule %r>" % (self._vm_module,)
+ return f"<BoundModule {self._vm_module:!r}>"
class Modules(dict):
@@ -212,7 +210,8 @@
def __init__(self, modules=None, config: Optional[Config] = None):
self._config = config if config is not None else _get_global_config()
- print("SystemContext driver=%r" % self._config.driver, file=sys.stderr)
+ # :!r does not work with the _binding.HalDriver class.
+ print(f"SystemContext driver={repr(self._config.driver)}", file=sys.stderr)
self._is_dynamic = modules is None
if not self._is_dynamic:
init_modules = self._config.default_modules + tuple(modules)
@@ -258,7 +257,7 @@
for m in modules:
name = m.name
if name in self._modules:
- raise ValueError("Attempt to register duplicate module: '%s'" % (name,))
+ raise ValueError(f"Attempt to register duplicate module: '{name}'")
self._modules[m.name] = BoundModule(self, m)
self._vm_context.register_modules(modules)
diff --git a/bindings/python/setup.py b/bindings/python/setup.py
index 3a669cc..f0f7cec 100644
--- a/bindings/python/setup.py
+++ b/bindings/python/setup.py
@@ -30,7 +30,7 @@
sub_path = os.path.join(this_dir, f"{name}.py")
args = [sys.executable, sub_path] + sys.argv[1:]
print(f"##### Running sub setup: {' '.join(args)}")
- subprocess.check_call(args)
+ subprocess.run(args, check=True)
print("")
diff --git a/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py b/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
index f20ae3d..07a508b 100644
--- a/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
+++ b/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
@@ -22,11 +22,6 @@
# absl
"@com_google_absl//absl/flags:flag": ["absl::flags"],
"@com_google_absl//absl/flags:parse": ["absl::flags_parse"],
- # dear_imgui
- "@dear_imgui": ["dear_imgui::dear_imgui"],
- "@dear_imgui//:imgui_sdl_vulkan": [
- "dear_imgui::impl_sdl", "dear_imgui::impl_vulkan"
- ],
# MLIR
"@llvm-project//mlir:AllPassesAndDialects": ["MLIRAllDialects"],
"@llvm-project//mlir:AllPassesAndDialectsNoRegistration": [
@@ -70,7 +65,6 @@
"@com_google_googletest//:gtest": ["gmock", "gtest"],
"@renderdoc_api//:renderdoc_app": ["renderdoc_api::renderdoc_app"],
"@pffft": ["pffft"],
- "@sdl2//:SDL2": ["SDL2-static"],
"@com_github_pytorch_cpuinfo//:cpuinfo": ["cpuinfo"],
"@half//:half": ["half"],
"@vulkan_memory_allocator//:impl_header_only": ["vulkan_memory_allocator"],
@@ -137,4 +131,4 @@
# All Bazel targets map to a single CMake target.
return ["ruy"]
- raise KeyError("No conversion found for target '%s'" % target)
+ raise KeyError(f"No conversion found for target '{target}'")
diff --git a/build_tools/docker/utils.py b/build_tools/docker/utils.py
index f9a041b..5fc68c9 100644
--- a/build_tools/docker/utils.py
+++ b/build_tools/docker/utils.py
@@ -25,23 +25,25 @@
dry_run: bool = False,
check: bool = True,
capture_output: bool = False,
- universal_newlines: bool = True,
+ text: bool = True,
**run_kwargs) -> subprocess.CompletedProcess:
"""Thin wrapper around subprocess.run"""
print(f"Running: `{' '.join(command)}`")
- if not dry_run:
- if capture_output:
- # Hardcode support for python <= 3.6.
- run_kwargs["stdout"] = subprocess.PIPE
- run_kwargs["stderr"] = subprocess.PIPE
+ if dry_run:
+ # Dummy CompletedProess with successful returncode.
+ return subprocess.CompletedProcess(command, returncode=0)
- completed_process = subprocess.run(command,
- universal_newlines=universal_newlines,
- check=check,
- **run_kwargs)
- return completed_process
- # Dummy CompletedProess with successful returncode.
- return subprocess.CompletedProcess(command, returncode=0)
+ if capture_output:
+ # TODO(#4131) python>=3.7: Use capture_output=True.
+ run_kwargs["stdout"] = subprocess.PIPE
+ run_kwargs["stderr"] = subprocess.PIPE
+
+ # TODO(#4131) python>=3.7: Replace 'universal_newlines' with 'text'.
+ completed_process = subprocess.run(command,
+ universal_newlines=text,
+ check=check,
+ **run_kwargs)
+ return completed_process
def check_gcloud_auth(dry_run: bool = False):
diff --git a/build_tools/manylinux_py_setup.py b/build_tools/manylinux_py_setup.py
index abdd11d..5a049b9 100755
--- a/build_tools/manylinux_py_setup.py
+++ b/build_tools/manylinux_py_setup.py
@@ -47,7 +47,7 @@
"numpy",
]
print("EXEC:", " ".join(args))
- subprocess.check_call(args)
+ subprocess.run(args, check=True)
def dump_current(identifier):
@@ -65,8 +65,8 @@
identifier = python_exe.parent.parent.name
versions_ids.append(identifier)
# Invoke ourselves with a different interpreter/args to dump config.
- subprocess.check_call(
- [str(python_exe), __file__, "_current_args", identifier])
+ subprocess.run([str(python_exe), __file__, "_current_args", identifier],
+ check=True)
print("-DIREE_MULTIPY_VERSIONS='{}'".format(";".join(versions_ids)))
diff --git a/build_tools/third_party/dear_imgui/BUILD.overlay b/build_tools/third_party/dear_imgui/BUILD.overlay
deleted file mode 100644
index 0825f19..0000000
--- a/build_tools/third_party/dear_imgui/BUILD.overlay
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-package(default_visibility = ["//visibility:public"])
-
-cc_library(
- name = "dear_imgui",
- hdrs = [
- "imgui.h",
- "imstb_textedit.h",
- "imstb_truetype.h",
- "imstb_rectpack.h",
- ],
- include_prefix = "third_party/dear_imgui",
- deps = [":dear_imgui_srcs"],
-)
-
-# Split into two rules so that include_prefix can be used.
-cc_library(
- name = "dear_imgui_srcs",
- srcs = [
- "imgui.cpp",
- "imgui_demo.cpp",
- "imgui_draw.cpp",
- "imgui_widgets.cpp",
- ],
- hdrs = [
- "imconfig.h",
- "imgui.h",
- "imgui_internal.h",
- "imstb_textedit.h",
- "imstb_truetype.h",
- "imstb_rectpack.h",
- ],
-)
-
-cc_library(
- name = "imgui_sdl_vulkan",
- hdrs = [
- "examples/imgui_impl_vulkan.h",
- "examples/imgui_impl_sdl.h",
- ],
- deps = [":imgui_sdl_vulkan_srcs"],
- include_prefix = "third_party/dear_imgui",
-)
-
-# Split into two rules so that include_prefix can be used.
-cc_library(
- name = "imgui_sdl_vulkan_srcs",
- srcs = [
- "examples/imgui_impl_vulkan.cpp",
- "examples/imgui_impl_sdl.cpp",
- ],
- hdrs = [
- "examples/imgui_impl_vulkan.h",
- "examples/imgui_impl_sdl.h",
- ],
- deps = [
- ":dear_imgui_srcs",
- "@iree_vulkan_headers//:vulkan_headers",
- "@vulkan_sdk//:sdk",
- "@sdl2//:SDL2",
- ],
-)
-
-cc_binary(
- name = "example_sdl_vulkan",
- srcs = [
- "examples/example_sdl_vulkan/main.cpp",
- ],
- deps = [
- ":dear_imgui_srcs",
- ":imgui_sdl_vulkan_srcs",
- ],
- includes = ["examples/"],
-)
diff --git a/build_tools/third_party/dear_imgui/CMakeLists.txt b/build_tools/third_party/dear_imgui/CMakeLists.txt
deleted file mode 100644
index 6600566..0000000
--- a/build_tools/third_party/dear_imgui/CMakeLists.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set(IMGUI_ROOT "${IREE_ROOT_DIR}/third_party/dear_imgui/")
-
-external_cc_library(
- PACKAGE
- dear_imgui
- NAME
- dear_imgui
- ROOT
- ${IMGUI_ROOT}
- SRCS
- "imgui.cpp"
- "imgui_demo.cpp"
- "imgui_draw.cpp"
- "imgui_widgets.cpp"
- HDRS
- "imconfig.h"
- "imgui.h"
- "imgui_internal.h"
- "imstb_rectpack.h"
- "imstb_textedit.h"
- "imstb_truetype.h"
-)
-
-external_cc_library(
- PACKAGE
- dear_imgui
- NAME
- impl_sdl
- ROOT
- ${IMGUI_ROOT}
- SRCS
- "examples/imgui_impl_sdl.cpp"
- HDRS
- "examples/imgui_impl_sdl.h"
- INCLUDES
- ${IMGUI_ROOT}
- DEPS
- dear_imgui::dear_imgui
- SDL2-static
-)
-
-# Dear ImGui's Vulkan implementation requires statically link against Vulkan.
-# One way to achieve this is by installing the Vulkan SDK from
-# https://vulkan.lunarg.com/.
-# If Vulkan is not found, omit these targets (and users must do the same).
-include(FindVulkan)
-if(NOT Vulkan_FOUND)
- message(NOTICE "Vulkan was not found, skipping Dear ImGui Vulkan support")
-else()
- external_cc_library(
- PACKAGE
- dear_imgui
- NAME
- impl_vulkan
- ROOT
- ${IMGUI_ROOT}
- SRCS
- "examples/imgui_impl_vulkan.cpp"
- HDRS
- "examples/imgui_impl_vulkan.h"
- INCLUDES
- ${IMGUI_ROOT}
- DEPS
- dear_imgui::dear_imgui
- Vulkan::Vulkan
- )
-
- add_executable(dear_imgui_example_sdl_vulkan
- ${IMGUI_ROOT}/examples/example_sdl_vulkan/main.cpp
- )
- target_include_directories(dear_imgui_example_sdl_vulkan
- PUBLIC
- ${IMGUI_ROOT}/examples/
- )
- target_link_libraries(dear_imgui_example_sdl_vulkan
- PRIVATE
- dear_imgui::dear_imgui
- dear_imgui::impl_sdl
- dear_imgui::impl_vulkan
- )
-endif()
diff --git a/build_tools/third_party/sdl2/BUILD.overlay b/build_tools/third_party/sdl2/BUILD.overlay
deleted file mode 100644
index ba663f0..0000000
--- a/build_tools/third_party/sdl2/BUILD.overlay
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-package(default_visibility = ["//visibility:public"])
-
-sdl_includes = ["include"]
-
-SDL_DEFAULT_SRC_EXCLUDES = [
- # Ignore test files.
- "src/test/*.c",
- # Unfortunately, thread/generic does not contain any guards to
- # prevent collisions against thread/pthread.
- "src/thread/generic/*.c",
- # Don't include Windows support.
- "src/render/direct3d*/**",
- "src/render/SDL_d3d*",
- "src/haptic/windows/**",
- "src/locale/windows/**",
- "src/locale/winrt/**",
- # Ignore Android and Emscripten locales
- "src/locale/android/**",
- "src/locale/emscripten/**",
- # Remove support for QNX
- "src/video/qnx/**",
- # No dbus -> don't try to compile this file
- "src/core/linux/SDL_fcitx.c",
-]
-
-sdl_sources = select({
- "@bazel_tools//src/conditions:windows": glob(
- include = [
- "src/**/*.c",
- "src/**/*.h",
- ],
- exclude = [
- # Ignore test files
- "src/test/*.c",
- # Ignore Linux/Unix
- "src/core/linux/**",
- "src/core/unix/**",
- # Ignore Android and Emscripten locales
- "src/locale/android/**",
- "src/locale/emscripten/**",
- # Ignore thread (exclude for thread/windows)
- "src/thread/**",
- # Remove support for QNX
- "src/video/qnx/**",
- ],
- ) + glob([
- "src/thread/*",
- "src/thread/windows/*",
- "src/thread/generic/SDL_syscond.*",
- ]),
- "//conditions:default": glob(
- include = [
- "src/**/*.c",
- "src/**/*.h",
- ],
- exclude = SDL_DEFAULT_SRC_EXCLUDES,
- ),
-})
-
-sdl_headers = [
- "include/begin_code.h",
- "include/close_code.h",
- "include/SDL.h",
- "include/SDL_assert.h",
- "include/SDL_atomic.h",
- "include/SDL_audio.h",
- "include/SDL_bits.h",
- "include/SDL_blendmode.h",
- "include/SDL_clipboard.h",
- "include/SDL_config_minimal.h",
- "include/SDL_cpuinfo.h",
- "include/SDL_egl.h",
- "include/SDL_endian.h",
- "include/SDL_error.h",
- "include/SDL_events.h",
- "include/SDL_filesystem.h",
- "include/SDL_gamecontroller.h",
- "include/SDL_gesture.h",
- "include/SDL_haptic.h",
- "include/SDL_hints.h",
- "include/SDL_joystick.h",
- "include/SDL_keyboard.h",
- "include/SDL_keycode.h",
- "include/SDL_loadso.h",
- "include/SDL_locale.h",
- "include/SDL_log.h",
- "include/SDL_main.h",
- "include/SDL_messagebox.h",
- "include/SDL_metal.h",
- "include/SDL_mouse.h",
- "include/SDL_mutex.h",
- "include/SDL_name.h",
- "include/SDL_opengl.h",
- "include/SDL_opengl_glext.h",
- "include/SDL_opengles.h",
- "include/SDL_opengles2.h",
- "include/SDL_pixels.h",
- "include/SDL_platform.h",
- "include/SDL_power.h",
- "include/SDL_quit.h",
- "include/SDL_rect.h",
- "include/SDL_render.h",
- "include/SDL_revision.h",
- "include/SDL_rwops.h",
- "include/SDL_scancode.h",
- "include/SDL_sensor.h",
- "include/SDL_shape.h",
- "include/SDL_stdinc.h",
- "include/SDL_surface.h",
- "include/SDL_system.h",
- "include/SDL_syswm.h",
- "include/SDL_thread.h",
- "include/SDL_timer.h",
- "include/SDL_touch.h",
- "include/SDL_version.h",
- "include/SDL_video.h",
- "include/SDL_vulkan.h",
-]
-
-sdl_copts = select({
- "@bazel_tools//src/conditions:windows": [],
- "//conditions:default": [
- "-Wno-string-conversion",
- "-pthread",
- "-includestdio.h", # Adds `#include <stdio.h>`, which some files need.
- ],
-})
-
-sdl_linkopts = select({
- "@bazel_tools//src/conditions:windows": [
- "-DEFAULTLIB:user32",
- "-DEFAULTLIB:gdi32",
- "-DEFAULTLIB:winmm",
- "-DEFAULTLIB:imm32",
- "-DEFAULTLIB:ole32",
- "-DEFAULTLIB:oleaut32",
- "-DEFAULTLIB:version",
- "-DEFAULTLIB:uuid",
- "-DEFAULTLIB:shell32",
- "-DEFAULTLIB:advapi32",
- "-DEFAULTLIB:hid",
- "-DEFAULTLIB:setupapi",
- ],
- "//conditions:default": [
- "-ldl",
- "-lrt",
- ],
-})
-
-sdl_deps = [
- "@sdl2_config//:headers",
-]
-
-cc_library(
- name = "SDL2",
- srcs = sdl_sources,
- hdrs = sdl_headers,
- copts = sdl_copts,
- includes = sdl_includes,
- linkopts = sdl_linkopts,
- linkstatic = 1,
- deps = sdl_deps,
-)
diff --git a/build_tools/third_party/sdl2/SDL_config.h b/build_tools/third_party/sdl2/SDL_config.h
deleted file mode 100644
index 8b2b893..0000000
--- a/build_tools/third_party/sdl2/SDL_config.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef SDL_config_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/**
- * \file SDL_config.h
- */
-
-/* Add any platform that doesn't build using the configure system. */
-#if defined(__WIN32__)
-#include "SDL_config_windows.h"
-#elif defined(__MACOSX__)
-#include "SDL_config_macosx.h"
-#elif defined(__IPHONEOS__)
-#include "SDL_config_iphoneos.h"
-#elif defined(__ANDROID__)
-#include "SDL_config_android.h"
-#elif defined(__LINUX__)
-#include "SDL_config_linux.h"
-#elif defined(__EMSCRIPTEN__)
-#include "SDL_config_emscripten.h"
-#else
-/* This is a minimal configuration just to get SDL running on new platforms */
-#include "SDL_config_minimal.h"
-#endif /* platform config */
-
-#ifdef USING_GENERATED_CONFIG_H
-#error Wrong SDL_config.h, check your include path?
-#endif
-
-#endif /* SDL_config_h_ */
diff --git a/build_tools/third_party/sdl2/SDL_config_android.h b/build_tools/third_party/sdl2/SDL_config_android.h
deleted file mode 100644
index 8107d6c..0000000
--- a/build_tools/third_party/sdl2/SDL_config_android.h
+++ /dev/null
@@ -1,150 +0,0 @@
-#ifndef SDL_config_android_h_
-#define SDL_config_android_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/**
- * \file SDL_config_android.h
- *
- * This is a configuration that can be used to build SDL for Android
- */
-
-#include <stdarg.h>
-
-#define HAVE_GCC_ATOMICS 1
-
-#define STDC_HEADERS 1
-#define HAVE_ALLOCA_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_TYPES_H 1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_SETENV 1
-#define HAVE_UNSETENV 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_BCOPY 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE_STRLCPY 1
-#define HAVE_STRLCAT 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_VSSCANF 1
-#define HAVE_VSNPRINTF 1
-#define HAVE_ACOS 1
-#define HAVE_ACOSF 1
-#define HAVE_ASIN 1
-#define HAVE_ASINF 1
-#define HAVE_ATAN 1
-#define HAVE_ATANF 1
-#define HAVE_ATAN2 1
-#define HAVE_ATAN2F 1
-#define HAVE_CEIL 1
-#define HAVE_CEILF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_COPYSIGNF 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FABSF 1
-#define HAVE_FLOOR 1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD 1
-#define HAVE_FMODF 1
-#define HAVE_LOG 1
-#define HAVE_LOGF 1
-#define HAVE_LOG10 1
-#define HAVE_LOG10F 1
-#define HAVE_POW 1
-#define HAVE_POWF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#define HAVE_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP 1
-#define HAVE_SYSCONF 1
-#define HAVE_CLOCK_GETTIME 1
-
-#define SIZEOF_VOIDP 4
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_ANDROID 1
-#define SDL_AUDIO_DRIVER_DUMMY 1
-
-/* Enable various input drivers */
-#define SDL_JOYSTICK_ANDROID 1
-#define SDL_HAPTIC_ANDROID 1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN 1
-
-/* Enable various threading systems */
-#define SDL_THREAD_PTHREAD 1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
-
-/* Enable various timer systems */
-#define SDL_TIMER_UNIX 1
-
-/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_ANDROID 1
-
-/* Enable OpenGL ES */
-#define SDL_VIDEO_OPENGL_ES 1
-#define SDL_VIDEO_OPENGL_ES2 1
-#define SDL_VIDEO_OPENGL_EGL 1
-#define SDL_VIDEO_RENDER_OGL_ES 1
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-
-/* Enable Vulkan support */
-/* Android does not support Vulkan in native code using the "armeabi" ABI. */
-#if defined(__ARM_ARCH) && __ARM_ARCH < 7
-#define SDL_VIDEO_VULKAN 0
-#else
-#define SDL_VIDEO_VULKAN 1
-#endif
-
-/* Enable system power support */
-#define SDL_POWER_ANDROID 1
-
-/* Enable the filesystem driver */
-#define SDL_FILESYSTEM_ANDROID 1
-
-#endif /* SDL_config_android_h_ */
diff --git a/build_tools/third_party/sdl2/SDL_config_emscripten.h b/build_tools/third_party/sdl2/SDL_config_emscripten.h
deleted file mode 100644
index 53187d4..0000000
--- a/build_tools/third_party/sdl2/SDL_config_emscripten.h
+++ /dev/null
@@ -1,388 +0,0 @@
-#ifndef _SDL_config_emscripten_h
-#define _SDL_config_emscripten_h
-
-/**
- * \file SDL_config_emscripten.h
- *
- * This is a configuration that can be used to build SDL for Emscripten
- */
-
-/* General platform specific identifiers */
-#include "SDL_platform.h"
-
-/* Make sure that this isn't included by Visual C++ */
-#ifdef _MSC_VER
-#error You should run hg revert SDL_config.h
-#endif
-
-/* C language features */
-/* #undef const */
-/* #undef inline */
-/* #undef volatile */
-
-/* C datatypes */
-#ifdef __LP64__
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-#define HAVE_GCC_ATOMICS 1
-/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
-
-/* Comment this if you want to build without any C library requirements */
-#define HAVE_LIBC 1
-#if HAVE_LIBC
-
-/* Useful headers */
-#define STDC_HEADERS 1
-#define HAVE_ALLOCA_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_ICONV_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MALLOC_H 1
-#define HAVE_MATH_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDARG_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_WCHAR_H 1
-/* #undef HAVE_PTHREAD_NP_H */
-/* #undef HAVE_LIBUNWIND_H */
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_UNSETENV 1
-#endif
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_BCOPY 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_WCSLEN 1
-/* #undef HAVE_WCSLCPY */
-/* #undef HAVE_WCSLCAT */
-#define HAVE_WCSCMP 1
-#define HAVE_STRLEN 1
-/* #undef HAVE_STRLCPY */
-/* #undef HAVE_STRLCAT */
-/* #undef HAVE__STRREV */
-/* #undef HAVE__STRUPR */
-/* #undef HAVE__STRLWR */
-/* #undef HAVE_INDEX */
-/* #undef HAVE_RINDEX */
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-/* #undef HAVE_ITOA */
-/* #undef HAVE__LTOA */
-/* #undef HAVE__UITOA */
-/* #undef HAVE__ULTOA */
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-/* #undef HAVE__I64TOA */
-/* #undef HAVE__UI64TOA */
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-/* #undef HAVE__STRICMP */
-#define HAVE_STRCASECMP 1
-/* #undef HAVE__STRNICMP */
-#define HAVE_STRNCASECMP 1
-/* #undef HAVE_SSCANF */
-#define HAVE_VSSCANF 1
-/* #undef HAVE_SNPRINTF */
-#define HAVE_VSNPRINTF 1
-#define HAVE_M_PI /**/
-#define HAVE_ACOS 1
-#define HAVE_ACOSF 1
-#define HAVE_ASIN 1
-#define HAVE_ASINF 1
-#define HAVE_ATAN 1
-#define HAVE_ATANF 1
-#define HAVE_ATAN2 1
-#define HAVE_ATAN2F 1
-#define HAVE_CEIL 1
-#define HAVE_CEILF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_COPYSIGNF 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FABSF 1
-#define HAVE_FLOOR 1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD 1
-#define HAVE_FMODF 1
-#define HAVE_LOG 1
-#define HAVE_LOGF 1
-#define HAVE_LOG10 1
-#define HAVE_LOG10F 1
-#define HAVE_POW 1
-#define HAVE_POWF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#define HAVE_FOPEN64 1
-#define HAVE_FSEEKO 1
-/* #undef HAVE_FSEEKO64 */
-#define HAVE_SIGACTION 1
-#define HAVE_SA_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP 1
-#define HAVE_SYSCONF 1
-#define HAVE_SYSCTLBYNAME 1
-/* #undef HAVE_CLOCK_GETTIME */
-/* #undef HAVE_GETPAGESIZE */
-#define HAVE_MPROTECT 1
-#define HAVE_ICONV 1
-/* #undef HAVE_PTHREAD_SETNAME_NP */
-/* #undef HAVE_PTHREAD_SET_NAME_NP */
-/* #undef HAVE_SEM_TIMEDWAIT */
-/* #undef HAVE_GETAUXVAL */
-/* #undef HAVE_POLL */
-
-#else
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-#define HAVE_STDINT_H 1
-#endif /* HAVE_LIBC */
-
-/* #undef HAVE_ALTIVEC_H */
-/* #undef HAVE_LIBUDEV_H */
-/* #undef HAVE_DBUS_DBUS_H */
-/* #undef HAVE_IBUS_IBUS_H */
-/* #undef HAVE_FCITX_FRONTEND_H */
-/* #undef HAVE_IMMINTRIN_H */
-/* #undef HAVE_LIBSAMPLERATE_H */
-
-/* #undef HAVE_DDRAW_H */
-/* #undef HAVE_DINPUT_H */
-/* #undef HAVE_DSOUND_H */
-/* #undef HAVE_DXGI_H */
-/* #undef HAVE_XINPUT_H */
-/* #undef HAVE_XINPUT_GAMEPAD_EX */
-/* #undef HAVE_XINPUT_STATE_EX */
-
-/* SDL internal assertion support */
-/* #undef SDL_DEFAULT_ASSERT_LEVEL */
-
-/* Allow disabling of core subsystems */
-#define SDL_ATOMIC_DISABLED 1
-/* #undef SDL_AUDIO_DISABLED */
-#define SDL_CPUINFO_DISABLED 1
-/* #undef SDL_EVENTS_DISABLED */
-/* #undef SDL_FILE_DISABLED */
-/* #undef SDL_JOYSTICK_DISABLED */
-#define SDL_HAPTIC_DISABLED 1
-#define SDL_LOADSO_DISABLED 1
-/* #undef SDL_RENDER_DISABLED */
-#define SDL_THREADS_DISABLED 1
-/* #undef SDL_TIMERS_DISABLED */
-/* #undef SDL_VIDEO_DISABLED */
-/* #undef SDL_POWER_DISABLED */
-/* #undef SDL_FILESYSTEM_DISABLED */
-
-/* Enable various audio drivers */
-/* #undef SDL_AUDIO_DRIVER_ALSA */
-/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_ARTS */
-/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
-#define SDL_AUDIO_DRIVER_DISK 1
-/* #undef SDL_AUDIO_DRIVER_DSOUND */
-#define SDL_AUDIO_DRIVER_DUMMY 1
-#define SDL_AUDIO_DRIVER_EMSCRIPTEN 1
-/* #undef SDL_AUDIO_DRIVER_ESD */
-/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
-/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_HAIKU */
-/* #undef SDL_AUDIO_DRIVER_JACK */
-/* #undef SDL_AUDIO_DRIVER_JACK_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_NACL */
-/* #undef SDL_AUDIO_DRIVER_NAS */
-/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_NETBSD */
-/* #undef SDL_AUDIO_DRIVER_OSS 1 */
-/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
-/* #undef SDL_AUDIO_DRIVER_PAUDIO */
-/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
-/* #undef SDL_AUDIO_DRIVER_QSA */
-/* #undef SDL_AUDIO_DRIVER_SNDIO */
-/* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
-/* #undef SDL_AUDIO_DRIVER_WASAPI */
-/* #undef SDL_AUDIO_DRIVER_WINMM */
-
-/* Enable various input drivers */
-/* #undef SDL_INPUT_LINUXEV */
-/* #undef SDL_INPUT_LINUXKD */
-/* #undef SDL_INPUT_TSLIB */
-/* #undef SDL_JOYSTICK_HAIKU */
-/* #undef SDL_JOYSTICK_DINPUT */
-/* #undef SDL_JOYSTICK_XINPUT */
-/* #undef SDL_JOYSTICK_DUMMY */
-/* #undef SDL_JOYSTICK_IOKIT */
-/* #undef SDL_JOYSTICK_LINUX */
-/* #undef SDL_JOYSTICK_ANDROID */
-/* #undef SDL_JOYSTICK_WINMM */
-/* #undef SDL_JOYSTICK_USBHID */
-/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
-#define SDL_JOYSTICK_EMSCRIPTEN 1
-/* #undef SDL_HAPTIC_DUMMY */
-/* #undef SDL_HAPTIC_ANDROID */
-/* #undef SDL_HAPTIC_LINUX */
-/* #undef SDL_HAPTIC_IOKIT */
-/* #undef SDL_HAPTIC_DINPUT */
-/* #undef SDL_HAPTIC_XINPUT */
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN 1
-/* #undef SDL_LOADSO_DUMMY */
-/* #undef SDL_LOADSO_LDG */
-/* #undef SDL_LOADSO_WINDOWS */
-
-/* Enable various threading systems */
-/* #undef SDL_THREAD_PTHREAD */
-/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX */
-/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
-/* #undef SDL_THREAD_WINDOWS */
-
-/* Enable various timer systems */
-/* #undef SDL_TIMER_HAIKU */
-/* #undef SDL_TIMER_DUMMY */
-#define SDL_TIMER_UNIX 1
-/* #undef SDL_TIMER_WINDOWS */
-
-/* Enable various video drivers */
-/* #undef SDL_VIDEO_DRIVER_HAIKU */
-/* #undef SDL_VIDEO_DRIVER_COCOA */
-/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
-/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-/* #undef SDL_VIDEO_DRIVER_WINDOWS */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON */
-/* #undef SDL_VIDEO_DRIVER_MIR */
-/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON */
-/* #undef SDL_VIDEO_DRIVER_X11 */
-/* #undef SDL_VIDEO_DRIVER_RPI */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM */
-/* #undef SDL_VIDEO_DRIVER_ANDROID */
-#define SDL_VIDEO_DRIVER_EMSCRIPTEN 1
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS */
-/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE */
-/* #undef SDL_VIDEO_DRIVER_X11_XCURSOR */
-/* #undef SDL_VIDEO_DRIVER_X11_XDBE */
-/* #undef SDL_VIDEO_DRIVER_X11_XINERAMA */
-/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2 */
-/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH */
-/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */
-/* #undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER */
-/* #undef SDL_VIDEO_DRIVER_X11_XSHAPE */
-/* #undef SDL_VIDEO_DRIVER_X11_XVIDMODE */
-/* #undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */
-/* #undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY */
-/* #undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM */
-/* #undef SDL_VIDEO_DRIVER_NACL */
-/* #undef SDL_VIDEO_DRIVER_VIVANTE */
-/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
-/* #undef SDL_VIDEO_DRIVER_QNX */
-/* #undef SDL_VIDEO_DRIVER_HEADLESS */
-
-/* #undef SDL_VIDEO_RENDER_D3D */
-/* #undef SDL_VIDEO_RENDER_D3D11 */
-/* #undef SDL_VIDEO_RENDER_OGL */
-/* #undef SDL_VIDEO_RENDER_OGL_ES */
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-/* #undef SDL_VIDEO_RENDER_DIRECTFB */
-/* #undef SDL_VIDEO_RENDER_METAL */
-
-/* Enable OpenGL support */
-/* #undef SDL_VIDEO_OPENGL */
-/* #undef SDL_VIDEO_OPENGL_ES */
-#define SDL_VIDEO_OPENGL_ES2 1
-/* #undef SDL_VIDEO_OPENGL_BGL */
-/* #undef SDL_VIDEO_OPENGL_CGL */
-#define SDL_VIDEO_OPENGL_EGL 1
-/* #undef SDL_VIDEO_OPENGL_GLX */
-/* #undef SDL_VIDEO_OPENGL_OSMESA */
-/* #undef SDL_VIDEO_OPENGL_WGL */
-/* #undef SDL_VIDEO_OPENGL_OSMESA */
-/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
-
-/* Enable Vulkan support */
-/* #undef SDL_VIDEO_VULKAN */
-
-/* Enable system power support */
-/* #undef SDL_POWER_LINUX */
-/* #undef SDL_POWER_WINDOWS */
-/* #undef SDL_POWER_MACOSX */
-/* #undef SDL_POWER_HAIKU */
-/* #undef SDL_POWER_ANDROID */
-#define SDL_POWER_EMSCRIPTEN 1
-/* #undef SDL_POWER_HARDWIRED */
-
-/* Enable system filesystem support */
-/* #undef SDL_FILESYSTEM_HAIKU */
-/* #undef SDL_FILESYSTEM_COCOA */
-/* #undef SDL_FILESYSTEM_DUMMY */
-/* #undef SDL_FILESYSTEM_UNIX */
-/* #undef SDL_FILESYSTEM_WINDOWS */
-/* #undef SDL_FILESYSTEM_NACL */
-/* #undef SDL_FILESYSTEM_ANDROID */
-#define SDL_FILESYSTEM_EMSCRIPTEN 1
-
-/* Enable assembly routines */
-/* #undef SDL_ASSEMBLY_ROUTINES */
-/* #undef SDL_ALTIVEC_BLITTERS */
-
-/* Enable ime support */
-/* #undef SDL_USE_IME */
-
-/* Enable dynamic udev support */
-/* #undef SDL_UDEV_DYNAMIC */
-
-/* Enable dynamic libsamplerate support */
-/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
-
-#endif /* _SDL_config_emscripten_h */
diff --git a/build_tools/third_party/sdl2/SDL_config_linux.h b/build_tools/third_party/sdl2/SDL_config_linux.h
deleted file mode 100644
index 60e324f..0000000
--- a/build_tools/third_party/sdl2/SDL_config_linux.h
+++ /dev/null
@@ -1,405 +0,0 @@
-#ifndef SDL_config_linux_h
-#define SDL_config_linux_h
-#define SDL_config_h_
-
-/**
- * \file SDL_config_linux.h
- *
- * This is a configuration that can be used to build SDL for Linux
- */
-
-/* General platform specific identifiers */
-#include "SDL_platform.h"
-
-/* Make sure that this isn't included by Visual C++ */
-#ifdef _MSC_VER
-#error You should run hg revert SDL_config.h
-#endif
-
-/* C language features */
-/* #undef const */
-/* #undef inline */
-/* #undef volatile */
-
-/* C datatypes */
-#ifdef __LP64__
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-#define HAVE_GCC_ATOMICS 1
-/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
-
-/* Comment this if you want to build without any C library requirements */
-#define HAVE_LIBC 1
-#if HAVE_LIBC
-
-/* Useful headers */
-#define STDC_HEADERS 1
-#define HAVE_ALLOCA_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_ICONV_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MALLOC_H 1
-#define HAVE_MATH_H 1
-#define HAVE_MEMORY_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDARG_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRINGS_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_WCHAR_H 1
-/* #undef HAVE_PTHREAD_NP_H */
-/* #undef HAVE_LIBUNWIND_H */
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_UNSETENV 1
-#endif
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_BCOPY 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_WCSLEN 1
-/* #undef HAVE_WCSLCPY */
-/* #undef HAVE_WCSLCAT */
-#define HAVE_WCSCMP 1
-#define HAVE_STRLEN 1
-/* #undef HAVE_STRLCPY */
-/* #undef HAVE_STRLCAT */
-/* #undef HAVE__STRREV */
-/* #undef HAVE__STRUPR */
-/* #undef HAVE__STRLWR */
-/* #undef HAVE_INDEX */
-/* #undef HAVE_RINDEX */
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-/* #undef HAVE_ITOA */
-/* #undef HAVE__LTOA */
-/* #undef HAVE__UITOA */
-/* #undef HAVE__ULTOA */
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-/* #undef HAVE__I64TOA */
-/* #undef HAVE__UI64TOA */
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-/* #undef HAVE__STRICMP */
-#define HAVE_STRCASECMP 1
-/* #undef HAVE__STRNICMP */
-#define HAVE_STRNCASECMP 1
-/* #undef HAVE_SSCANF */
-#define HAVE_VSSCANF 1
-/* #undef HAVE_SNPRINTF */
-#define HAVE_VSNPRINTF 1
-#define HAVE_M_PI /**/
-#define HAVE_ACOS 1
-#define HAVE_ACOSF 1
-#define HAVE_ASIN 1
-#define HAVE_ASINF 1
-#define HAVE_ATAN 1
-#define HAVE_ATANF 1
-#define HAVE_ATAN2 1
-#define HAVE_ATAN2F 1
-#define HAVE_CEIL 1
-#define HAVE_CEILF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_COPYSIGNF 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_EXP 1
-#define HAVE_EXPF 1
-#define HAVE_FABS 1
-#define HAVE_FABSF 1
-#define HAVE_FLOOR 1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD 1
-#define HAVE_FMODF 1
-#define HAVE_LOG 1
-#define HAVE_LOGF 1
-#define HAVE_LOG10 1
-#define HAVE_LOG10F 1
-#define HAVE_POW 1
-#define HAVE_POWF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-/* #define HAVE_FOPEN64 1 */
-#define HAVE_FSEEKO 1
-/* #define HAVE_FSEEKO64 1 */
-#define HAVE_SIGACTION 1
-#define HAVE_SA_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP 1
-#define HAVE_SYSCONF 1
-/* #undef HAVE_SYSCTLBYNAME */
-#define HAVE_CLOCK_GETTIME 1
-/* #undef HAVE_GETPAGESIZE */
-#define HAVE_MPROTECT 1
-#define HAVE_ICONV 1
-#define HAVE_PTHREAD_SETNAME_NP 1
-/* #undef HAVE_PTHREAD_SET_NAME_NP */
-#define HAVE_SEM_TIMEDWAIT 1
-#define HAVE_GETAUXVAL 1
-#define HAVE_POLL 1
-#define HAVE__EXIT 1
-
-#else
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-#define HAVE_STDINT_H 1
-#endif /* HAVE_LIBC */
-
-/* #undef HAVE_ALTIVEC_H */
-/* #define HAVE_DBUS_DBUS_H 1 */
-/* #undef HAVE_FCITX_FRONTEND_H */
-/* #define HAVE_IBUS_IBUS_H 1 */
-#define HAVE_IMMINTRIN_H 1
-/* #undef HAVE_LIBSAMPLERATE_H */
-#define HAVE_LIBUDEV_H 1
-
-/* #undef HAVE_DDRAW_H */
-/* #undef HAVE_DINPUT_H */
-/* #undef HAVE_DSOUND_H */
-/* #undef HAVE_DXGI_H */
-/* #undef HAVE_XINPUT_H */
-/* #undef HAVE_MMDEVICEAPI_H */
-/* #undef HAVE_AUDIOCLIENT_H */
-/* #undef HAVE_XINPUT_GAMEPAD_EX */
-/* #undef HAVE_XINPUT_STATE_EX */
-
-/* SDL internal assertion support */
-/* #undef SDL_DEFAULT_ASSERT_LEVEL */
-
-/* Allow disabling of core subsystems */
-/* #undef SDL_ATOMIC_DISABLED */
-/* #undef SDL_AUDIO_DISABLED */
-/* #undef SDL_CPUINFO_DISABLED */
-/* #undef SDL_EVENTS_DISABLED */
-/* #undef SDL_FILE_DISABLED */
-/* #undef SDL_JOYSTICK_DISABLED */
-/* #undef SDL_HAPTIC_DISABLED */
-/* #undef SDL_SENSOR_DISABLED */
-/* #undef SDL_LOADSO_DISABLED */
-/* #undef SDL_RENDER_DISABLED */
-/* #undef SDL_THREADS_DISABLED */
-/* #undef SDL_TIMERS_DISABLED */
-/* #undef SDL_VIDEO_DISABLED */
-/* #undef SDL_POWER_DISABLED */
-/* #undef SDL_FILESYSTEM_DISABLED */
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_ALSA 1
-#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC "libasound.so.2"
-/* #undef SDL_AUDIO_DRIVER_ANDROID */
-/* #undef SDL_AUDIO_DRIVER_ARTS */
-/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
-#define SDL_AUDIO_DRIVER_DISK 1
-/* #undef SDL_AUDIO_DRIVER_DSOUND */
-#define SDL_AUDIO_DRIVER_DUMMY 1
-/* #undef SDL_AUDIO_DRIVER_EMSCRIPTEN */
-/* #undef SDL_AUDIO_DRIVER_ESD */
-/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
-/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_HAIKU */
-/* #undef SDL_AUDIO_DRIVER_JACK */
-/* #undef SDL_AUDIO_DRIVER_JACK_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_NACL */
-/* #undef SDL_AUDIO_DRIVER_NAS */
-/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
-/* #undef SDL_AUDIO_DRIVER_NETBSD */
-#define SDL_AUDIO_DRIVER_OSS 1
-/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
-/* #undef SDL_AUDIO_DRIVER_PAUDIO */
-#define SDL_AUDIO_DRIVER_PULSEAUDIO 1
-#define SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "libpulse-simple.so.0"
-/* #undef SDL_AUDIO_DRIVER_QSA */
-#define SDL_AUDIO_DRIVER_SNDIO 1
-#define SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "libsndio.so.7.0"
-/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
-/* #undef SDL_AUDIO_DRIVER_WASAPI */
-/* #undef SDL_AUDIO_DRIVER_WINMM */
-
-/* Enable various input drivers */
-#define SDL_INPUT_LINUXEV 1
-#define SDL_INPUT_LINUXKD 1
-/* #undef SDL_INPUT_TSLIB */
-/* #undef SDL_JOYSTICK_HAIKU */
-/* #undef SDL_JOYSTICK_DINPUT */
-/* #undef SDL_JOYSTICK_XINPUT */
-/* #undef SDL_JOYSTICK_DUMMY */
-/* #undef SDL_JOYSTICK_IOKIT */
-#define SDL_JOYSTICK_LINUX 1
-/* #undef SDL_JOYSTICK_ANDROID */
-/* #undef SDL_JOYSTICK_WINMM */
-/* #undef SDL_JOYSTICK_USBHID */
-/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
-/* #undef SDL_JOYSTICK_HIDAPI */
-/* #undef SDL_JOYSTICK_EMSCRIPTEN */
-/* #undef SDL_HAPTIC_DUMMY */
-/* #undef SDL_HAPTIC_ANDROID */
-#define SDL_HAPTIC_LINUX 1
-/* #undef SDL_HAPTIC_IOKIT */
-/* #undef SDL_HAPTIC_DINPUT */
-/* #undef SDL_HAPTIC_XINPUT */
-
-/* Enable various sensor drivers */
-/* #undef SDL_SENSOR_ANDROID */
-#define SDL_SENSOR_DUMMY 1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN 1
-/* #undef SDL_LOADSO_DUMMY */
-/* #undef SDL_LOADSO_LDG */
-/* #undef SDL_LOADSO_WINDOWS */
-
-/* Enable various threading systems */
-#define SDL_THREAD_PTHREAD 1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
-/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
-/* #undef SDL_THREAD_WINDOWS */
-
-/* Enable various timer systems */
-/* #undef SDL_TIMER_HAIKU */
-/* #undef SDL_TIMER_DUMMY */
-#define SDL_TIMER_UNIX 1
-/* #undef SDL_TIMER_WINDOWS */
-
-/* Enable various video drivers */
-/* #undef SDL_VIDEO_DRIVER_HAIKU */
-/* #undef SDL_VIDEO_DRIVER_COCOA */
-/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
-/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-/* #undef SDL_VIDEO_DRIVER_WINDOWS */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR */
-/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON */
-#define SDL_VIDEO_DRIVER_X11 1
-/* #undef SDL_VIDEO_DRIVER_RPI */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC */
-/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM */
-/* #undef SDL_VIDEO_DRIVER_ANDROID */
-/* #undef SDL_VIDEO_DRIVER_EMSCRIPTEN */
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC "libX11.so.6"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "libXext.so.6"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "libXcursor.so.1"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "libXinerama.so.1"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "libXi.so.6"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "libXrandr.so.2"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "libXss.so.1"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "libXxf86vm.so.1"
-#define SDL_VIDEO_DRIVER_X11_XCURSOR 1
-#define SDL_VIDEO_DRIVER_X11_XDBE 1
-#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
-#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
-#define SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH 1
-#define SDL_VIDEO_DRIVER_X11_XRANDR 1
-#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
-#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
-#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
-#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
-#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
-#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
-/* #undef SDL_VIDEO_DRIVER_NACL */
-/* #undef SDL_VIDEO_DRIVER_VIVANTE */
-/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
-/* #undef SDL_VIDEO_DRIVER_QNX */
-
-/* #undef SDL_VIDEO_RENDER_D3D */
-/* #undef SDL_VIDEO_RENDER_D3D11 */
-#define SDL_VIDEO_RENDER_OGL 1
-/* #undef SDL_VIDEO_RENDER_OGL_ES */
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-/* #undef SDL_VIDEO_RENDER_DIRECTFB */
-/* #undef SDL_VIDEO_RENDER_METAL */
-
-/* Enable OpenGL support */
-#define SDL_VIDEO_OPENGL 1
-/* #undef SDL_VIDEO_OPENGL_ES */
-#define SDL_VIDEO_OPENGL_ES2 1
-/* #undef SDL_VIDEO_OPENGL_BGL */
-/* #undef SDL_VIDEO_OPENGL_CGL */
-#define SDL_VIDEO_OPENGL_EGL 1
-#define SDL_VIDEO_OPENGL_GLX 1
-/* #undef SDL_VIDEO_OPENGL_WGL */
-/* #undef SDL_VIDEO_OPENGL_OSMESA */
-/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
-
-/* Enable Vulkan support */
-#define SDL_VIDEO_VULKAN 1
-
-/* Enable Metal support */
-/* #undef SDL_VIDEO_METAL */
-
-/* Enable system power support */
-#define SDL_POWER_LINUX 1
-/* #undef SDL_POWER_WINDOWS */
-/* #undef SDL_POWER_MACOSX */
-/* #undef SDL_POWER_HAIKU */
-/* #undef SDL_POWER_ANDROID */
-/* #undef SDL_POWER_EMSCRIPTEN */
-/* #undef SDL_POWER_HARDWIRED */
-
-/* Enable system filesystem support */
-/* #undef SDL_FILESYSTEM_HAIKU */
-/* #undef SDL_FILESYSTEM_COCOA */
-/* #undef SDL_FILESYSTEM_DUMMY */
-#define SDL_FILESYSTEM_UNIX 1
-/* #undef SDL_FILESYSTEM_WINDOWS */
-/* #undef SDL_FILESYSTEM_NACL */
-/* #undef SDL_FILESYSTEM_ANDROID */
-/* #undef SDL_FILESYSTEM_EMSCRIPTEN */
-
-/* Enable assembly routines */
-#define SDL_ASSEMBLY_ROUTINES 1
-/* #undef SDL_ALTIVEC_BLITTERS */
-/* #undef SDL_ARM_SIMD_BLITTERS */
-/* #undef SDL_ARM_NEON_BLITTERS */
-
-/* Enable ime support */
-#define SDL_USE_IME 1
-
-/* Enable dynamic udev support */
-#define SDL_UDEV_DYNAMIC "libudev.so.1"
-
-/* Enable dynamic libusb support */
-/* #undef SDL_LIBUSB_DYNAMIC */
-
-/* Enable dynamic libsamplerate support */
-/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
-
-#endif /* SDL_config_linux_h */
diff --git a/build_tools/third_party/sdl2/SDL_config_macosx.h b/build_tools/third_party/sdl2/SDL_config_macosx.h
deleted file mode 100644
index 2fdcf73..0000000
--- a/build_tools/third_party/sdl2/SDL_config_macosx.h
+++ /dev/null
@@ -1,215 +0,0 @@
-#ifndef SDL_config_macosx_h_
-#define SDL_config_macosx_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
-#include <AvailabilityMacros.h>
-
-/* This is a set of defines to configure the SDL features */
-
-#ifdef __LP64__
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-
-/* Useful headers */
-#define STDC_HEADERS 1
-#define HAVE_ALLOCA_H 1
-#define HAVE_CTYPE_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_INTTYPES_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDINT_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STRING_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_LIBUNWIND_H 1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_GETENV 1
-#define HAVE_SETENV 1
-#define HAVE_PUTENV 1
-#define HAVE_UNSETENV 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_BCOPY 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE_STRLCPY 1
-#define HAVE_STRLCAT 1
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOLL 1
-#define HAVE_STRTOULL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE_STRCASECMP 1
-#define HAVE_STRNCASECMP 1
-#define HAVE_VSSCANF 1
-#define HAVE_VSNPRINTF 1
-#define HAVE_M_PI 1
-#define HAVE_ACOS 1
-#define HAVE_ACOSF 1
-#define HAVE_ASIN 1
-#define HAVE_ASINF 1
-#define HAVE_ATAN 1
-#define HAVE_ATANF 1
-#define HAVE_ATAN2 1
-#define HAVE_ATAN2F 1
-#define HAVE_CEIL 1
-#define HAVE_CEILF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_COPYSIGNF 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FABSF 1
-#define HAVE_FLOOR 1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD 1
-#define HAVE_FMODF 1
-#define HAVE_LOG 1
-#define HAVE_LOGF 1
-#define HAVE_LOG10 1
-#define HAVE_LOG10F 1
-#define HAVE_POW 1
-#define HAVE_POWF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#define HAVE_SIGACTION 1
-#define HAVE_SETJMP 1
-#define HAVE_NANOSLEEP 1
-#define HAVE_SYSCONF 1
-#define HAVE_SYSCTLBYNAME 1
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_COREAUDIO 1
-#define SDL_AUDIO_DRIVER_DISK 1
-#define SDL_AUDIO_DRIVER_DUMMY 1
-
-/* Enable various input drivers */
-#define SDL_JOYSTICK_IOKIT 1
-#define SDL_HAPTIC_IOKIT 1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_DLOPEN 1
-
-/* Enable various threading systems */
-#define SDL_THREAD_PTHREAD 1
-#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
-
-/* Enable various timer systems */
-#define SDL_TIMER_UNIX 1
-
-/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_COCOA 1
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#undef SDL_VIDEO_DRIVER_X11
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA \
- "/usr/X11R6/lib/libXinerama.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE \
- "/usr/X11R6/lib/libXxf86vm.1.dylib"
-#define SDL_VIDEO_DRIVER_X11_XDBE 1
-#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
-#define SDL_VIDEO_DRIVER_X11_XRANDR 1
-#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
-#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
-#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
-#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
-
-#ifdef MAC_OS_X_VERSION_10_8
-/*
- * No matter the versions targeted, this is the 10.8 or later SDK, so you have
- * to use the external Xquartz, which is a more modern Xlib. Previous SDKs
- * used an older Xlib.
- */
-#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
-#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
-#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
-#endif
-
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 1
-#endif
-
-/*#ifndef SDL_VIDEO_RENDER_OGL_ES2*/
-/*#define SDL_VIDEO_RENDER_OGL_ES2 1*/
-/*#endif*/
-
-/*#ifndef SDL_VIDEO_RENDER_METAL*/
-/* Metal only supported on 64-bit architectures with 10.11+ */
-/*#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)*/
-/*#define SDL_VIDEO_RENDER_METAL 1*/
-/*#else*/
-/*#define SDL_VIDEO_RENDER_METAL 0*/
-/*#endif*/
-/*#endif*/
-
-/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 1
-#endif
-/*#ifndef SDL_VIDEO_OPENGL_ES2*/
-/*#define SDL_VIDEO_OPENGL_ES2 1*/
-/*#endif*/
-/*#ifndef SDL_VIDEO_OPENGL_EGL*/
-/*#define SDL_VIDEO_OPENGL_EGL 1*/
-/*#endif*/
-#ifndef SDL_VIDEO_OPENGL_CGL
-#define SDL_VIDEO_OPENGL_CGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_GLX
-#define SDL_VIDEO_OPENGL_GLX 1
-#endif
-
-/* Enable Vulkan support */
-/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */
-#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
-#define SDL_VIDEO_VULKAN 1
-#else
-#define SDL_VIDEO_VULKAN 0
-#endif
-
-/* Enable system power support */
-#define SDL_POWER_MACOSX 1
-
-/* enable filesystem support */
-#define SDL_FILESYSTEM_COCOA 1
-
-/* Enable assembly routines */
-#define SDL_ASSEMBLY_ROUTINES 1
-#ifdef __ppc__
-#define SDL_ALTIVEC_BLITTERS 1
-#endif
-
-#endif /* SDL_config_macosx_h_ */
diff --git a/build_tools/third_party/sdl2/SDL_config_minimal.h b/build_tools/third_party/sdl2/SDL_config_minimal.h
deleted file mode 100644
index 0ef59a9..0000000
--- a/build_tools/third_party/sdl2/SDL_config_minimal.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef SDL_config_minimal_h_
-#define SDL_config_minimal_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-/**
- * \file SDL_config_minimal.h
- *
- * This is the minimal configuration that can be used to build SDL.
- */
-
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-
-/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
-#if defined(_MSC_VER) && (_MSC_VER < 1600)
-/* Here are some reasonable defaults */
-typedef unsigned int size_t;
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-typedef unsigned long uintptr_t;
-#else
-#define HAVE_STDINT_H 1
-#endif /* Visual Studio 2008 */
-
-#ifdef __GNUC__
-#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
-#endif
-
-/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
-#define SDL_AUDIO_DRIVER_DUMMY 1
-
-/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
-#define SDL_JOYSTICK_DISABLED 1
-
-/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
-#define SDL_HAPTIC_DISABLED 1
-
-/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
-#define SDL_LOADSO_DISABLED 1
-
-/* Enable the stub thread support (src/thread/generic/\*.c) */
-#define SDL_THREADS_DISABLED 1
-
-/* Enable the stub timer support (src/timer/dummy/\*.c) */
-#define SDL_TIMERS_DISABLED 1
-
-/* Enable the dummy video driver (src/video/dummy/\*.c) */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-
-/* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */
-#define SDL_FILESYSTEM_DUMMY 1
-
-#endif /* SDL_config_minimal_h_ */
diff --git a/build_tools/third_party/sdl2/SDL_config_windows.h b/build_tools/third_party/sdl2/SDL_config_windows.h
deleted file mode 100644
index 7626de6..0000000
--- a/build_tools/third_party/sdl2/SDL_config_windows.h
+++ /dev/null
@@ -1,238 +0,0 @@
-#ifndef SDL_config_windows_h_
-#define SDL_config_windows_h_
-#define SDL_config_h_
-
-#include "SDL_platform.h"
-
-// Explicitly include headers for SSE intrinsics.
-// SDL itself conditionally chooses to not include these on Windows, but they
-// appear to be needed on some systems anyway.
-#include <intrin.h>
-#include <xmmintrin.h>
-
-/* This is a set of defines to configure the SDL features */
-
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
-#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
-#define HAVE_STDINT_H 1
-#elif defined(_MSC_VER)
-typedef signed __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef signed __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef signed __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#ifndef _UINTPTR_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
-#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
-#define DWORD_PTR DWORD
-#endif
-#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
-#define LONG_PTR LONG
-#endif
-#else /* !__GNUC__ && !_MSC_VER */
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned int size_t;
-#endif
-typedef unsigned int uintptr_t;
-#endif /* __GNUC__ || _MSC_VER */
-#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
-
-#ifdef _WIN64
-#define SIZEOF_VOIDP 8
-#else
-#define SIZEOF_VOIDP 4
-#endif
-
-#define HAVE_DDRAW_H 1
-#define HAVE_DINPUT_H 1
-#define HAVE_DSOUND_H 1
-#define HAVE_DXGI_H 1
-#define HAVE_XINPUT_H 1
-
-/* This is disabled by default to avoid C runtime dependencies and manifest
- * requirements */
-#define HAVE_LIBC 1 // Enable it anyway :D
-#ifdef HAVE_LIBC
-/* Useful headers */
-#define STDC_HEADERS 1
-#define HAVE_CTYPE_H 1
-#define HAVE_FLOAT_H 1
-#define HAVE_LIMITS_H 1
-#define HAVE_MATH_H 1
-#define HAVE_SIGNAL_H 1
-#define HAVE_STDIO_H 1
-#define HAVE_STRING_H 1
-
-/* C library functions */
-#define HAVE_MALLOC 1
-#define HAVE_CALLOC 1
-#define HAVE_REALLOC 1
-#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
-#define HAVE_QSORT 1
-#define HAVE_ABS 1
-#define HAVE_MEMSET 1
-#define HAVE_MEMCPY 1
-#define HAVE_MEMMOVE 1
-#define HAVE_MEMCMP 1
-#define HAVE_STRLEN 1
-#define HAVE__STRREV 1
-/* These functions have security warnings, so we won't use them */
-/* #undef HAVE__STRUPR */
-/* #undef HAVE__STRLWR */
-#define HAVE_STRCHR 1
-#define HAVE_STRRCHR 1
-#define HAVE_STRSTR 1
-/* These functions have security warnings, so we won't use them */
-/* #undef HAVE__LTOA */
-/* #undef HAVE__ULTOA */
-#define HAVE_STRTOL 1
-#define HAVE_STRTOUL 1
-#define HAVE_STRTOD 1
-#define HAVE_ATOI 1
-#define HAVE_ATOF 1
-#define HAVE_STRCMP 1
-#define HAVE_STRNCMP 1
-#define HAVE__STRICMP 1
-#define HAVE__STRNICMP 1
-#define HAVE_ACOS 1
-#define HAVE_ACOSF 1
-#define HAVE_ASIN 1
-#define HAVE_ASINF 1
-#define HAVE_ATAN 1
-#define HAVE_ATANF 1
-#define HAVE_ATAN2 1
-#define HAVE_ATAN2F 1
-#define HAVE_CEILF 1
-#define HAVE__COPYSIGN 1
-#define HAVE_COS 1
-#define HAVE_COSF 1
-#define HAVE_FABS 1
-#define HAVE_FABSF 1
-#define HAVE_FLOOR 1
-#define HAVE_FLOORF 1
-#define HAVE_FMOD 1
-#define HAVE_FMODF 1
-#define HAVE_LOG 1
-#define HAVE_LOGF 1
-#define HAVE_LOG10 1
-#define HAVE_LOG10F 1
-#define HAVE_POW 1
-#define HAVE_POWF 1
-#define HAVE_SIN 1
-#define HAVE_SINF 1
-#define HAVE_SQRT 1
-#define HAVE_SQRTF 1
-#define HAVE_TAN 1
-#define HAVE_TANF 1
-#if defined(_MSC_VER)
-/* These functions were added with the VC++ 2013 C runtime library */
-#if _MSC_VER >= 1800
-#define HAVE_STRTOLL 1
-#define HAVE_VSSCANF 1
-#define HAVE_SCALBN 1
-#define HAVE_SCALBNF 1
-#endif
-/* This function is available with at least the VC++ 2008 C runtime library */
-#if _MSC_VER >= 1400
-#define HAVE__FSEEKI64 1
-#endif
-#endif
-#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
-#define HAVE_M_PI 1
-#endif
-#else
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-#endif
-
-/* Enable various audio drivers */
-#define SDL_AUDIO_DRIVER_WASAPI 1
-#define SDL_AUDIO_DRIVER_DSOUND 1
-#define SDL_AUDIO_DRIVER_WINMM 1
-#define SDL_AUDIO_DRIVER_DISK 1
-#define SDL_AUDIO_DRIVER_DUMMY 1
-
-/* Enable various input drivers */
-#define SDL_JOYSTICK_DINPUT 1
-#define SDL_JOYSTICK_XINPUT 1
-#define SDL_HAPTIC_DINPUT 1
-#define SDL_HAPTIC_XINPUT 1
-
-/* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS 1
-
-/* Enable various threading systems */
-#define SDL_THREAD_WINDOWS 1
-
-/* Enable various timer systems */
-#define SDL_TIMER_WINDOWS 1
-
-/* Enable/disable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_WINDOWS 1
-
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D 0
-#endif
-#ifndef SDL_VIDEO_RENDER_D3D11
-#define SDL_VIDEO_RENDER_D3D11 0
-#endif
-
-/* Disable OpenGL support, just use Vulkan */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 0
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL 0
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 0
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2 0
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2 0
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL 0
-#endif
-
-/* Enable Vulkan support */
-#define SDL_VIDEO_VULKAN 1
-
-/* Enable system power support */
-#define SDL_POWER_WINDOWS 1
-
-/* Enable filesystem support */
-#define SDL_FILESYSTEM_WINDOWS 1
-
-/* Disable sensor support */
-#define SDL_SENSOR_DISABLED 1
-
-/* Enable assembly routines (Win64 doesn't have inline asm) */
-#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES 1
-#endif
-
-#endif /* SDL_config_windows_h_ */
diff --git a/colab/start_colab_kernel.py b/colab/start_colab_kernel.py
index 3a9b3a1..77bfab9 100755
--- a/colab/start_colab_kernel.py
+++ b/colab/start_colab_kernel.py
@@ -53,36 +53,43 @@
# Determine the repository root (one dir-level up).
repo_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- print("Repository root: %s" % (repo_root,))
+ print(f"Repository root: {repo_root}")
# Use 'bazelisk' instead of 'bazel' if it exists on the path.
# Bazelisk is an optional utility that pick versions of Bazel to use and
# passes through all command-line arguments to the real Bazel binary:
# https://github.com/bazelbuild/bazelisk
bazel_exe = "bazelisk" if shutil.which("bazelisk") else "bazel"
- print("Using bazel executable: %s" % (bazel_exe))
+ print(f"Using bazel executable: {bazel_exe}")
# Detect python and query bazel for its output.
- print("Setting Bazel PYTHON_BIN=%s" % (sys.executable,))
+ print(f"Setting Bazel PYTHON_BIN={sys.executable}")
bazel_env["PYTHON_BIN"] = sys.executable
- bazel_bin = subprocess.check_output([bazel_exe, "info", "bazel-bin"],
- cwd=repo_root,
- env=bazel_env).decode("utf-8")
- bazel_bin = bazel_bin.splitlines()[0]
+ completed_process = subprocess.run(
+ [bazel_exe, "info", "bazel-bin"],
+ cwd=repo_root,
+ env=bazel_env,
+ check=True,
+ # TODO(#4131) python>=3.7: Replace 'universal_newlines' with 'text'.
+ universal_newlines=True,
+ # TODO(#4131) python>=3.7: Use capture_output=True.
+ stdout=subprocess.PIPE)
+ bazel_bin = completed_process.stdout.splitlines()[0]
# Bazel always reports the path with '/'. On windows, switch it
# since we need native path manipulation code below to have it the
# right way.
if os.path.sep == "\\":
bazel_bin = bazel_bin.replace("/", "\\")
- print("Found Bazel bin: %s" % (bazel_bin))
+ print(f"Found Bazel bin: {bazel_bin}")
def build():
"""Builds the python bundle."""
print("Building python bindings...")
- subprocess.check_call([bazel_exe, "build", "//colab:everything_for_colab"],
- cwd=repo_root,
- env=bazel_env)
+ subprocess.run([bazel_exe, "build", "//colab:everything_for_colab"],
+ cwd=repo_root,
+ env=bazel_env,
+ check=True)
def run():
@@ -139,9 +146,9 @@
def show_install_instructions():
"""Prints some install instructions."""
print("ERROR: Unable to load Jupyter. Ensure that it is installed:")
- print(" %s -m pip install --upgrade pip" % (sys.executable,))
- print(" %s -m pip install jupyter" % (sys.executable,))
- print(" %s -m pip install jupyter_http_over_ws" % (sys.executable,))
+ print(f" {sys.executable} -m pip install --upgrade pip")
+ print(f" {sys.executable} -m pip install jupyter")
+ print(f" {sys.executable} -m pip install jupyter_http_over_ws")
print(" jupyter serverextension enable --py jupyter_http_over_ws")
diff --git a/configure_bazel.py b/configure_bazel.py
index 18be4a4..b86b34f 100644
--- a/configure_bazel.py
+++ b/configure_bazel.py
@@ -46,8 +46,15 @@
# For some reason, bazel doesn't always find the user site path, which
# is typically where "pip install --user" libraries end up. Inject it.
try:
- user_site = subprocess.check_output(
- [sys.executable, "-m", "site", "--user-site"]).decode("utf-8").strip()
+ user_site = subprocess.run(
+ [sys.executable, "-m", "site", "--user-site"],
+ check=True,
+ # TODO(#4131) python>=3.7: Use capture_output=True.
+ stderr=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ # TODO(#4131) python>=3.7: Replace 'universal_newlines' with 'text'.
+ universal_newlines=True,
+ ).stdout.strip()
print("Found user site directory:", user_site)
except subprocess.CalledProcessError:
print("Could not resolve user site directory")
diff --git a/docs/developing_iree/repository_management.md b/docs/developing_iree/repository_management.md
index c481dc8..1cc7030 100644
--- a/docs/developing_iree/repository_management.md
+++ b/docs/developing_iree/repository_management.md
@@ -103,13 +103,11 @@
```text
6ec136281086b71da32b5fb068bd6e46b78a5c79 third_party/abseil-cpp
309de5988eb949a27e077a24a1d83c0687d10d57 third_party/benchmark
-4c13807b7d43ff0946b7ffea0ae3aee9e611d778 third_party/dear_imgui
97f3aa91746a7d207513a73725e92cee7c35bb87 third_party/flatbuffers
3d62e9545bd15c5df9ccfdd8453b93d64a6dd8eb third_party/ruy
f2fb48c3b3d79a75a88a99fba6576b25d42ec528 third_party/googletest
a21beccea2020f950845cbb68db663d0737e174c third_party/llvm-project
80d452484c5409444b0ec19383faa84bb7a4d351 third_party/pybind11
-b73f111094da3e380a1774b56b15f16c90ae8e23 third_party/sdl2
b252a50953ac4375cb1864e94f4b0234db9d215d third_party/spirv_headers
6652f0b6428777b5a4a3d191cc30d8b31366b999 third_party/swiftshader
9b32b2db1142166b190ea30757f48d8dd0fb00e3 third_party/tensorflow
diff --git a/docs/get_started/getting_started_linux_vulkan.md b/docs/get_started/getting_started_linux_vulkan.md
index 0133538..0035825 100644
--- a/docs/get_started/getting_started_linux_vulkan.md
+++ b/docs/get_started/getting_started_linux_vulkan.md
@@ -142,13 +142,12 @@
## Running IREE's Vulkan Samples
+> Note:<br>
+> The Vulkan samples are CMake-only.
+
Install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/), then run:
```shell
-# -- CMake --
$ cmake --build ../iree-build/ --target iree_samples_vulkan_vulkan_inference_gui
$ ../iree-build/iree/samples/vulkan/vulkan_inference_gui
-
-# -- Bazel --
-$ bazel run iree/samples/vulkan:vulkan_inference_gui
```
diff --git a/docs/get_started/getting_started_windows_vulkan.md b/docs/get_started/getting_started_windows_vulkan.md
index 94d1138..0ce7911 100644
--- a/docs/get_started/getting_started_windows_vulkan.md
+++ b/docs/get_started/getting_started_windows_vulkan.md
@@ -140,13 +140,12 @@
## Running IREE's Vulkan Samples
+> Note:<br>
+> The Vulkan samples are CMake-only.
+
Install the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/), then run:
```powershell
-# -- CMake --
> cmake --build ..\iree-build\ --target iree_samples_vulkan_vulkan_inference_gui
> ..\iree-build\iree\samples\vulkan\vulkan_inference_gui.exe
-
-# -- Bazel --
-> bazel run iree/samples/vulkan:vulkan_inference_gui
```
diff --git a/integrations/tensorflow/bindings/python/pyiree/tf/support/module_utils.py b/integrations/tensorflow/bindings/python/pyiree/tf/support/module_utils.py
index 5a799c6..305b7d6 100644
--- a/integrations/tensorflow/bindings/python/pyiree/tf/support/module_utils.py
+++ b/integrations/tensorflow/bindings/python/pyiree/tf/support/module_utils.py
@@ -14,6 +14,8 @@
# limitations under the License.
"""Utilities for compiling 'tf.Module's"""
+# TODO(#4131) python>=3.7: Use postponed type annotations.
+
import collections
import os
import tempfile
diff --git a/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_test_utils.py b/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_test_utils.py
index 1961a9a..24e83aa 100644
--- a/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_test_utils.py
+++ b/integrations/tensorflow/bindings/python/pyiree/tf/support/tf_test_utils.py
@@ -22,6 +22,8 @@
# ref: reference – for the reference CompiledModule
# tar: target - for one of the target CompiledModules
+# TODO(#4131) python>=3.7: Use postponed type annotations.
+
import collections
import copy
import itertools
@@ -111,7 +113,7 @@
backends = module_utils.BackendInfo.get_all_backends()
return backends
-
+# TODO(#4131) python>=3.7: Consider using a (frozen) dataclass.
Modules = collections.namedtuple("Modules",
["ref_module", "tar_modules", "artifacts_dir"])
diff --git a/integrations/tensorflow/bindings/python/pyiree/tf/support/trace_utils.py b/integrations/tensorflow/bindings/python/pyiree/tf/support/trace_utils.py
index 1a0c789..e6c4265 100644
--- a/integrations/tensorflow/bindings/python/pyiree/tf/support/trace_utils.py
+++ b/integrations/tensorflow/bindings/python/pyiree/tf/support/trace_utils.py
@@ -18,6 +18,8 @@
# ref: reference – for the reference CompiledModule
# tar: target - for one of the target CompiledModules
+# TODO(#4131) python>=3.7: Use postponed type annotations.
+
import copy
import glob
import inspect
diff --git a/iree/samples/vulkan/BUILD b/iree/samples/vulkan/BUILD
deleted file mode 100644
index f005ede..0000000
--- a/iree/samples/vulkan/BUILD
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Samples demonstrating use of the VM and HAL APIs with Vulkan.
-
-load("//iree/tools:compilation.bzl", "iree_bytecode_module")
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
- licenses = ["notice"], # Apache 2.0
-)
-
-iree_bytecode_module(
- name = "simple_mul_bytecode_module",
- src = "simple_mul.mlir",
- cc_namespace = "iree::samples::vulkan",
- flags = [
- "-iree-mlir-to-vm-bytecode-module",
- "-iree-hal-target-backends=vulkan-spirv",
- ],
-)
-
-cc_binary(
- name = "vulkan_inference_gui",
- srcs = ["vulkan_inference_gui.cc"],
- linkopts = select({
- "@bazel_tools//src/conditions:windows": [
- "-SUBSYSTEM:WINDOWS",
- ],
- "//conditions:default": [],
- }),
- tags = [
- "manual",
- "nokokoro",
- ],
- deps = [
- ":simple_mul_bytecode_module_cc",
- "//iree/base:main",
- "//iree/hal/vulkan/registration",
- "//iree/modules/hal",
- "//iree/testing/vulkan:vulkan_gui_util",
- "//iree/vm",
- "//iree/vm:bytecode_module",
- "//iree/vm:cc",
- "@com_google_absl//absl/base:core_headers",
- "@com_google_absl//absl/types:span",
- ],
-)
diff --git a/iree/samples/vulkan/CMakeLists.txt b/iree/samples/vulkan/CMakeLists.txt
index 4c7f665..785eb2c 100644
--- a/iree/samples/vulkan/CMakeLists.txt
+++ b/iree/samples/vulkan/CMakeLists.txt
@@ -28,14 +28,12 @@
"-iree-hal-target-backends=vulkan-spirv"
)
-# bazel_to_cmake: DO NOT EDIT (special Vulkan and Windows logic is needed)
-
# This sample statically links against Vulkan.
# One way to achieve this is by installing the Vulkan SDK from
# https://vulkan.lunarg.com/.
# If Vulkan is not found, omit the target.
if(NOT TARGET iree::testing::vulkan::vulkan_gui_util)
- message(NOTICE "Vulkan was not found, skipping vulkan_inference_gui sample")
+ message(VERBOSE "Missing Vulkan dependencies, skipping vulkan_inference_gui sample")
return()
endif()
diff --git a/iree/samples/vulkan/vulkan_inference_gui.cc b/iree/samples/vulkan/vulkan_inference_gui.cc
index 25967ef..45e4ab4 100644
--- a/iree/samples/vulkan/vulkan_inference_gui.cc
+++ b/iree/samples/vulkan/vulkan_inference_gui.cc
@@ -316,10 +316,10 @@
if (g_SwapChainRebuild) {
g_SwapChainRebuild = false;
ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount);
- ImGui_ImplVulkanH_CreateWindow(g_Instance, g_PhysicalDevice, g_Device,
- &g_MainWindowData, g_QueueFamily,
- g_Allocator, g_SwapChainResizeWidth,
- g_SwapChainResizeHeight, g_MinImageCount);
+ ImGui_ImplVulkanH_CreateOrResizeWindow(
+ g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData,
+ g_QueueFamily, g_Allocator, g_SwapChainResizeWidth,
+ g_SwapChainResizeHeight, g_MinImageCount);
g_MainWindowData.FrameIndex = 0;
}
diff --git a/iree/testing/vulkan/BUILD b/iree/testing/vulkan/BUILD
deleted file mode 100644
index 3f40467..0000000
--- a/iree/testing/vulkan/BUILD
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-package(
- default_visibility = ["//visibility:public"],
- features = ["layering_check"],
- licenses = ["notice"], # Apache 2.0
-)
-
-cc_library(
- name = "vulkan_gui_util",
- srcs = ["vulkan_gui_util.cc"],
- hdrs = ["vulkan_gui_util.h"],
- tags = [
- "manual",
- "nokokoro",
- ],
- deps = [
- "//iree/base:api",
- "//iree/base:logging",
- "//iree/hal/vulkan:api",
- "@dear_imgui",
- "@dear_imgui//:imgui_sdl_vulkan",
- "@iree_vulkan_headers//:vulkan_headers",
- "@sdl2//:SDL2",
- "@vulkan_sdk//:sdk",
- ],
-)
-
-cc_binary(
- name = "iree-run-module-vulkan-gui",
- srcs = ["iree-run-module-vulkan-gui-main.cc"],
- linkopts = select({
- "@bazel_tools//src/conditions:windows": [
- "-SUBSYSTEM:WINDOWS",
- ],
- "//conditions:default": [],
- }),
- tags = [
- "manual",
- "nokokoro",
- ],
- deps = [
- ":vulkan_gui_util",
- "//iree/base:flags",
- "//iree/base:main",
- "//iree/base:status",
- "//iree/base:tracing",
- "//iree/hal/vulkan/registration",
- "//iree/modules/hal",
- "//iree/tools/utils:vm_util",
- "//iree/vm",
- "//iree/vm:bytecode_module",
- "//iree/vm:cc",
- "@com_google_absl//absl/flags:flag",
- "@sdl2//:SDL2",
- ],
-)
diff --git a/iree/testing/vulkan/CMakeLists.txt b/iree/testing/vulkan/CMakeLists.txt
index a4e6a03..8b650aa 100644
--- a/iree/testing/vulkan/CMakeLists.txt
+++ b/iree/testing/vulkan/CMakeLists.txt
@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# bazel_to_cmake: DO NOT EDIT (special Vulkan logic is needed)
-
if(NOT ${IREE_HAL_DRIVER_VULKAN} OR NOT ${IREE_BUILD_SAMPLES})
return()
endif()
@@ -24,6 +22,21 @@
# If Vulkan is not found, omit the target.
include(FindVulkan)
if(NOT Vulkan_FOUND)
+ message(VERBOSE "Could not find Vulkan, disabling Vulkan GUI programs")
+ return()
+endif()
+
+# vcpkg install imgui[vulkan-binding,sdl2-binding]
+find_package(imgui CONFIG QUIET)
+if(NOT imgui_FOUND)
+ message(VERBOSE "Could not find Dear ImGui, disabling Vulkan GUI programs")
+ return()
+endif()
+
+# vcpkg install sdl2[vulkan]
+find_package(SDL2 CONFIG QUIET)
+if(NOT SDL2_FOUND)
+ message(VERBOSE "Could not find SDL2, disabling Vulkan GUI programs")
return()
endif()
@@ -35,13 +48,11 @@
SRCS
"vulkan_gui_util.cc"
DEPS
- dear_imgui::dear_imgui
- dear_imgui::impl_sdl
- dear_imgui::impl_vulkan
+ imgui::imgui
iree::base::api
iree::base::logging
iree::hal::vulkan::api
- SDL2-static
+ SDL2::SDL2
Vulkan::Vulkan
)
diff --git a/iree/testing/vulkan/vulkan_gui_util.cc b/iree/testing/vulkan/vulkan_gui_util.cc
index 4c93bb3..c633c2c 100644
--- a/iree/testing/vulkan/vulkan_gui_util.cc
+++ b/iree/testing/vulkan/vulkan_gui_util.cc
@@ -295,9 +295,9 @@
// Create SwapChain, RenderPass, Framebuffer, etc.
IM_ASSERT(min_image_count >= 2);
- ImGui_ImplVulkanH_CreateWindow(instance, physical_device, device, wd,
- queue_family_index, allocator, width, height,
- min_image_count);
+ ImGui_ImplVulkanH_CreateOrResizeWindow(instance, physical_device, device, wd,
+ queue_family_index, allocator, width,
+ height, min_image_count);
// Set clear color.
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
diff --git a/iree/testing/vulkan/vulkan_gui_util.h b/iree/testing/vulkan/vulkan_gui_util.h
index c43cc5d..05288bd 100644
--- a/iree/testing/vulkan/vulkan_gui_util.h
+++ b/iree/testing/vulkan/vulkan_gui_util.h
@@ -14,18 +14,15 @@
#include <SDL.h>
#include <SDL_vulkan.h>
+#include <imgui.h>
+#include <imgui_impl_sdl.h>
+#include <imgui_impl_vulkan.h>
#include <vulkan/vulkan.h>
#include <vector>
#include "iree/hal/vulkan/api.h"
-// NOTE: order matters here, imgui must come first:
-#include "third_party/dear_imgui/imgui.h"
-// NOTE: must follow imgui.h:
-#include "third_party/dear_imgui/examples/imgui_impl_sdl.h"
-#include "third_party/dear_imgui/examples/imgui_impl_vulkan.h"
-
namespace iree {
// Returns the names of the Vulkan instance layers needed for the given IREE
diff --git a/iree/vm/BUILD b/iree/vm/BUILD
index f69b517..e613f40 100644
--- a/iree/vm/BUILD
+++ b/iree/vm/BUILD
@@ -13,7 +13,6 @@
# limitations under the License.
load("//iree/tools:compilation.bzl", "iree_bytecode_module")
-load("//build_tools/bazel:tblgen.bzl", "gentbl")
package(
default_visibility = ["//visibility:public"],
@@ -179,13 +178,12 @@
"bytecode_dispatch_util.h",
"bytecode_module.c",
"bytecode_module_impl.h",
- "bytecode_op_table.h",
+ "generated/bytecode_op_table.h",
],
hdrs = [
"bytecode_module.h",
],
deps = [
- ":bytecode_op_table_gen",
":vm",
"//iree/base:api",
"//iree/base:core_headers",
@@ -195,24 +193,24 @@
],
)
-# TODO(benvanik): see if we can remove this; not good to have this dep.
-gentbl(
- name = "bytecode_op_table_gen",
- tbl_outs = [
- ("-gen-iree-vm-op-table-defs", "bytecode_op_table.h"),
- ],
- tblgen = "//iree/tools:iree-tblgen",
- td_file = "//iree/compiler/Dialect/VM/IR:VMOps.td",
- td_srcs = [
- "//iree/compiler/Dialect/IREE/IR:td_files",
- "//iree/compiler/Dialect/VM/IR:td_files",
- "@llvm-project//mlir:OpBaseTdFiles",
- "@llvm-project//mlir:include/mlir/IR/SymbolInterfaces.td",
- "@llvm-project//mlir:include/mlir/Interfaces/CallInterfaces.td",
- "@llvm-project//mlir:include/mlir/Interfaces/ControlFlowInterfaces.td",
- "@llvm-project//mlir:SideEffectTdFiles",
- ],
-)
+# TODO(#357): Add a script to update bytecode_op_table.h.
+# gentbl(
+# name = "bytecode_op_table_gen",
+# tbl_outs = [
+# ("-gen-iree-vm-op-table-defs", "bytecode_op_table.h"),
+# ],
+# tblgen = "//iree/tools:iree-tblgen",
+# td_file = "//iree/compiler/Dialect/VM/IR:VMOps.td",
+# td_srcs = [
+# "//iree/compiler/Dialect/IREE/IR:td_files",
+# "//iree/compiler/Dialect/VM/IR:td_files",
+# "@llvm-project//mlir:OpBaseTdFiles",
+# "@llvm-project//mlir:include/mlir/IR/SymbolInterfaces.td",
+# "@llvm-project//mlir:include/mlir/Interfaces/CallInterfaces.td",
+# "@llvm-project//mlir:include/mlir/Interfaces/ControlFlowInterfaces.td",
+# "@llvm-project//mlir:SideEffectTdFiles",
+# ],
+# )
cc_test(
name = "bytecode_module_test",
diff --git a/iree/vm/CMakeLists.txt b/iree/vm/CMakeLists.txt
index 2546732..dd6d63e 100644
--- a/iree/vm/CMakeLists.txt
+++ b/iree/vm/CMakeLists.txt
@@ -166,7 +166,7 @@
"bytecode_dispatch_util.h"
"bytecode_module.c"
"bytecode_module_impl.h"
- "bytecode_op_table.h"
+ "generated/bytecode_op_table.h"
DEPS
::vm
iree::base::api
@@ -177,17 +177,6 @@
PUBLIC
)
-iree_tablegen_library(
- NAME
- bytecode_op_table_gen
- TD_FILE
- "${IREE_ROOT_DIR}/iree/compiler/Dialect/VM/IR/VMOps.td"
- OUTS
- -gen-iree-vm-op-table-defs bytecode_op_table.h
- TBLGEN
- IREE
-)
-
iree_cc_test(
NAME
bytecode_module_test
diff --git a/iree/vm/bytecode_dispatch_util.h b/iree/vm/bytecode_dispatch_util.h
index ace3a32..ea3aab3 100644
--- a/iree/vm/bytecode_dispatch_util.h
+++ b/iree/vm/bytecode_dispatch_util.h
@@ -21,7 +21,7 @@
#include "iree/base/alignment.h"
#include "iree/base/target_platform.h"
#include "iree/vm/bytecode_module_impl.h"
-#include "iree/vm/bytecode_op_table.h"
+#include "iree/vm/generated/bytecode_op_table.h"
// TODO(benvanik): make a compiler setting.
#define IREE_VM_EXT_I64_ENABLE 1
diff --git a/iree/vm/generated/.clang-format b/iree/vm/generated/.clang-format
new file mode 100644
index 0000000..0419c8d
--- /dev/null
+++ b/iree/vm/generated/.clang-format
@@ -0,0 +1,17 @@
+# Copyright 2019 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Disable formatting for generated code.
+DisableFormat: true
+
diff --git a/iree/vm/generated/bytecode_op_table.h b/iree/vm/generated/bytecode_op_table.h
new file mode 100644
index 0000000..b63eb6c
--- /dev/null
+++ b/iree/vm/generated/bytecode_op_table.h
@@ -0,0 +1,1042 @@
+/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
+|* *|
+|* IREE VM Operation Tables *|
+|* *|
+|* Automatically generated file, do not edit! *|
+|* *|
+\*===----------------------------------------------------------------------===*/
+
+typedef enum {
+ IREE_VM_OP_CORE_GlobalLoadI32 = 0x00,
+ IREE_VM_OP_CORE_GlobalStoreI32 = 0x01,
+ IREE_VM_OP_CORE_GlobalLoadIndirectI32 = 0x02,
+ IREE_VM_OP_CORE_GlobalStoreIndirectI32 = 0x03,
+ IREE_VM_OP_CORE_GlobalLoadRef = 0x04,
+ IREE_VM_OP_CORE_GlobalStoreRef = 0x05,
+ IREE_VM_OP_CORE_GlobalLoadIndirectRef = 0x06,
+ IREE_VM_OP_CORE_GlobalStoreIndirectRef = 0x07,
+ IREE_VM_OP_CORE_ConstI32Zero = 0x08,
+ IREE_VM_OP_CORE_ConstI32 = 0x09,
+ IREE_VM_OP_CORE_ConstRefZero = 0x0A,
+ IREE_VM_OP_CORE_ConstRefRodata = 0x0B,
+ IREE_VM_OP_CORE_RSV_0x0C,
+ IREE_VM_OP_CORE_RSV_0x0D,
+ IREE_VM_OP_CORE_RSV_0x0E,
+ IREE_VM_OP_CORE_RSV_0x0F,
+ IREE_VM_OP_CORE_ListAlloc = 0x10,
+ IREE_VM_OP_CORE_ListReserve = 0x11,
+ IREE_VM_OP_CORE_ListSize = 0x12,
+ IREE_VM_OP_CORE_ListResize = 0x13,
+ IREE_VM_OP_CORE_ListGetI32 = 0x14,
+ IREE_VM_OP_CORE_ListSetI32 = 0x15,
+ IREE_VM_OP_CORE_ListGetRef = 0x16,
+ IREE_VM_OP_CORE_ListSetRef = 0x17,
+ IREE_VM_OP_CORE_RSV_0x18,
+ IREE_VM_OP_CORE_RSV_0x19,
+ IREE_VM_OP_CORE_RSV_0x1A,
+ IREE_VM_OP_CORE_RSV_0x1B,
+ IREE_VM_OP_CORE_RSV_0x1C,
+ IREE_VM_OP_CORE_RSV_0x1D,
+ IREE_VM_OP_CORE_SelectI32 = 0x1E,
+ IREE_VM_OP_CORE_SelectRef = 0x1F,
+ IREE_VM_OP_CORE_SwitchI32 = 0x20,
+ IREE_VM_OP_CORE_SwitchRef = 0x21,
+ IREE_VM_OP_CORE_AddI32 = 0x22,
+ IREE_VM_OP_CORE_SubI32 = 0x23,
+ IREE_VM_OP_CORE_MulI32 = 0x24,
+ IREE_VM_OP_CORE_DivI32S = 0x25,
+ IREE_VM_OP_CORE_DivI32U = 0x26,
+ IREE_VM_OP_CORE_RemI32S = 0x27,
+ IREE_VM_OP_CORE_RemI32U = 0x28,
+ IREE_VM_OP_CORE_NotI32 = 0x29,
+ IREE_VM_OP_CORE_AndI32 = 0x2A,
+ IREE_VM_OP_CORE_OrI32 = 0x2B,
+ IREE_VM_OP_CORE_XorI32 = 0x2C,
+ IREE_VM_OP_CORE_ShlI32 = 0x2D,
+ IREE_VM_OP_CORE_ShrI32S = 0x2E,
+ IREE_VM_OP_CORE_ShrI32U = 0x2F,
+ IREE_VM_OP_CORE_RSV_0x30,
+ IREE_VM_OP_CORE_TruncI32I8 = 0x31,
+ IREE_VM_OP_CORE_TruncI32I16 = 0x32,
+ IREE_VM_OP_CORE_ExtI8I32S = 0x33,
+ IREE_VM_OP_CORE_ExtI8I32U = 0x34,
+ IREE_VM_OP_CORE_ExtI16I32S = 0x35,
+ IREE_VM_OP_CORE_ExtI16I32U = 0x36,
+ IREE_VM_OP_CORE_RSV_0x37,
+ IREE_VM_OP_CORE_RSV_0x38,
+ IREE_VM_OP_CORE_RSV_0x39,
+ IREE_VM_OP_CORE_RSV_0x3A,
+ IREE_VM_OP_CORE_RSV_0x3B,
+ IREE_VM_OP_CORE_RSV_0x3C,
+ IREE_VM_OP_CORE_RSV_0x3D,
+ IREE_VM_OP_CORE_RSV_0x3E,
+ IREE_VM_OP_CORE_RSV_0x3F,
+ IREE_VM_OP_CORE_CmpEQI32 = 0x40,
+ IREE_VM_OP_CORE_CmpNEI32 = 0x41,
+ IREE_VM_OP_CORE_CmpLTI32S = 0x42,
+ IREE_VM_OP_CORE_CmpLTI32U = 0x43,
+ IREE_VM_OP_CORE_RSV_0x44,
+ IREE_VM_OP_CORE_RSV_0x45,
+ IREE_VM_OP_CORE_RSV_0x46,
+ IREE_VM_OP_CORE_RSV_0x47,
+ IREE_VM_OP_CORE_RSV_0x48,
+ IREE_VM_OP_CORE_RSV_0x49,
+ IREE_VM_OP_CORE_CmpEQRef = 0x4A,
+ IREE_VM_OP_CORE_CmpNERef = 0x4B,
+ IREE_VM_OP_CORE_CmpNZRef = 0x4C,
+ IREE_VM_OP_CORE_CmpNZI32 = 0x4D,
+ IREE_VM_OP_CORE_RSV_0x4E,
+ IREE_VM_OP_CORE_RSV_0x4F,
+ IREE_VM_OP_CORE_Branch = 0x50,
+ IREE_VM_OP_CORE_CondBranch = 0x51,
+ IREE_VM_OP_CORE_Call = 0x52,
+ IREE_VM_OP_CORE_CallVariadic = 0x53,
+ IREE_VM_OP_CORE_Return = 0x54,
+ IREE_VM_OP_CORE_Fail = 0x55,
+ IREE_VM_OP_CORE_RSV_0x56,
+ IREE_VM_OP_CORE_RSV_0x57,
+ IREE_VM_OP_CORE_RSV_0x58,
+ IREE_VM_OP_CORE_RSV_0x59,
+ IREE_VM_OP_CORE_RSV_0x5A,
+ IREE_VM_OP_CORE_RSV_0x5B,
+ IREE_VM_OP_CORE_RSV_0x5C,
+ IREE_VM_OP_CORE_RSV_0x5D,
+ IREE_VM_OP_CORE_RSV_0x5E,
+ IREE_VM_OP_CORE_RSV_0x5F,
+ IREE_VM_OP_CORE_Yield = 0x60,
+ IREE_VM_OP_CORE_RSV_0x61,
+ IREE_VM_OP_CORE_RSV_0x62,
+ IREE_VM_OP_CORE_RSV_0x63,
+ IREE_VM_OP_CORE_RSV_0x64,
+ IREE_VM_OP_CORE_RSV_0x65,
+ IREE_VM_OP_CORE_RSV_0x66,
+ IREE_VM_OP_CORE_RSV_0x67,
+ IREE_VM_OP_CORE_RSV_0x68,
+ IREE_VM_OP_CORE_RSV_0x69,
+ IREE_VM_OP_CORE_RSV_0x6A,
+ IREE_VM_OP_CORE_RSV_0x6B,
+ IREE_VM_OP_CORE_RSV_0x6C,
+ IREE_VM_OP_CORE_RSV_0x6D,
+ IREE_VM_OP_CORE_RSV_0x6E,
+ IREE_VM_OP_CORE_RSV_0x6F,
+ IREE_VM_OP_CORE_RSV_0x70,
+ IREE_VM_OP_CORE_RSV_0x71,
+ IREE_VM_OP_CORE_RSV_0x72,
+ IREE_VM_OP_CORE_RSV_0x73,
+ IREE_VM_OP_CORE_RSV_0x74,
+ IREE_VM_OP_CORE_RSV_0x75,
+ IREE_VM_OP_CORE_RSV_0x76,
+ IREE_VM_OP_CORE_RSV_0x77,
+ IREE_VM_OP_CORE_RSV_0x78,
+ IREE_VM_OP_CORE_RSV_0x79,
+ IREE_VM_OP_CORE_RSV_0x7A,
+ IREE_VM_OP_CORE_RSV_0x7B,
+ IREE_VM_OP_CORE_Trace = 0x7C,
+ IREE_VM_OP_CORE_Print = 0x7D,
+ IREE_VM_OP_CORE_CondBreak = 0x7E,
+ IREE_VM_OP_CORE_Break = 0x7F,
+ IREE_VM_OP_CORE_RSV_0x80,
+ IREE_VM_OP_CORE_RSV_0x81,
+ IREE_VM_OP_CORE_RSV_0x82,
+ IREE_VM_OP_CORE_RSV_0x83,
+ IREE_VM_OP_CORE_RSV_0x84,
+ IREE_VM_OP_CORE_RSV_0x85,
+ IREE_VM_OP_CORE_RSV_0x86,
+ IREE_VM_OP_CORE_RSV_0x87,
+ IREE_VM_OP_CORE_RSV_0x88,
+ IREE_VM_OP_CORE_RSV_0x89,
+ IREE_VM_OP_CORE_RSV_0x8A,
+ IREE_VM_OP_CORE_RSV_0x8B,
+ IREE_VM_OP_CORE_RSV_0x8C,
+ IREE_VM_OP_CORE_RSV_0x8D,
+ IREE_VM_OP_CORE_RSV_0x8E,
+ IREE_VM_OP_CORE_RSV_0x8F,
+ IREE_VM_OP_CORE_RSV_0x90,
+ IREE_VM_OP_CORE_RSV_0x91,
+ IREE_VM_OP_CORE_RSV_0x92,
+ IREE_VM_OP_CORE_RSV_0x93,
+ IREE_VM_OP_CORE_RSV_0x94,
+ IREE_VM_OP_CORE_RSV_0x95,
+ IREE_VM_OP_CORE_RSV_0x96,
+ IREE_VM_OP_CORE_RSV_0x97,
+ IREE_VM_OP_CORE_RSV_0x98,
+ IREE_VM_OP_CORE_RSV_0x99,
+ IREE_VM_OP_CORE_RSV_0x9A,
+ IREE_VM_OP_CORE_RSV_0x9B,
+ IREE_VM_OP_CORE_RSV_0x9C,
+ IREE_VM_OP_CORE_RSV_0x9D,
+ IREE_VM_OP_CORE_RSV_0x9E,
+ IREE_VM_OP_CORE_RSV_0x9F,
+ IREE_VM_OP_CORE_PrefixExtI64 = 0xA0,
+ IREE_VM_OP_CORE_PrefixExtF32 = 0xA1,
+ IREE_VM_OP_CORE_PrefixExtF64 = 0xA2,
+ IREE_VM_OP_CORE_RSV_0xA3,
+ IREE_VM_OP_CORE_RSV_0xA4,
+ IREE_VM_OP_CORE_RSV_0xA5,
+ IREE_VM_OP_CORE_RSV_0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RSV_0xF5,
+ IREE_VM_OP_CORE_RSV_0xF6,
+ IREE_VM_OP_CORE_RSV_0xF7,
+ IREE_VM_OP_CORE_RSV_0xF8,
+ IREE_VM_OP_CORE_RSV_0xF9,
+ IREE_VM_OP_CORE_RSV_0xFA,
+ IREE_VM_OP_CORE_RSV_0xFB,
+ IREE_VM_OP_CORE_RSV_0xFC,
+ IREE_VM_OP_CORE_RSV_0xFD,
+ IREE_VM_OP_CORE_RSV_0xFE,
+ IREE_VM_OP_CORE_RSV_0xFF,
+} iree_vm_core_op_t;
+
+#define IREE_VM_OP_CORE_TABLE(OPC, RSV) \
+ OPC(0x00, GlobalLoadI32) \
+ OPC(0x01, GlobalStoreI32) \
+ OPC(0x02, GlobalLoadIndirectI32) \
+ OPC(0x03, GlobalStoreIndirectI32) \
+ OPC(0x04, GlobalLoadRef) \
+ OPC(0x05, GlobalStoreRef) \
+ OPC(0x06, GlobalLoadIndirectRef) \
+ OPC(0x07, GlobalStoreIndirectRef) \
+ OPC(0x08, ConstI32Zero) \
+ OPC(0x09, ConstI32) \
+ OPC(0x0A, ConstRefZero) \
+ OPC(0x0B, ConstRefRodata) \
+ RSV(0x0C) \
+ RSV(0x0D) \
+ RSV(0x0E) \
+ RSV(0x0F) \
+ OPC(0x10, ListAlloc) \
+ OPC(0x11, ListReserve) \
+ OPC(0x12, ListSize) \
+ OPC(0x13, ListResize) \
+ OPC(0x14, ListGetI32) \
+ OPC(0x15, ListSetI32) \
+ OPC(0x16, ListGetRef) \
+ OPC(0x17, ListSetRef) \
+ RSV(0x18) \
+ RSV(0x19) \
+ RSV(0x1A) \
+ RSV(0x1B) \
+ RSV(0x1C) \
+ RSV(0x1D) \
+ OPC(0x1E, SelectI32) \
+ OPC(0x1F, SelectRef) \
+ OPC(0x20, SwitchI32) \
+ OPC(0x21, SwitchRef) \
+ OPC(0x22, AddI32) \
+ OPC(0x23, SubI32) \
+ OPC(0x24, MulI32) \
+ OPC(0x25, DivI32S) \
+ OPC(0x26, DivI32U) \
+ OPC(0x27, RemI32S) \
+ OPC(0x28, RemI32U) \
+ OPC(0x29, NotI32) \
+ OPC(0x2A, AndI32) \
+ OPC(0x2B, OrI32) \
+ OPC(0x2C, XorI32) \
+ OPC(0x2D, ShlI32) \
+ OPC(0x2E, ShrI32S) \
+ OPC(0x2F, ShrI32U) \
+ RSV(0x30) \
+ OPC(0x31, TruncI32I8) \
+ OPC(0x32, TruncI32I16) \
+ OPC(0x33, ExtI8I32S) \
+ OPC(0x34, ExtI8I32U) \
+ OPC(0x35, ExtI16I32S) \
+ OPC(0x36, ExtI16I32U) \
+ RSV(0x37) \
+ RSV(0x38) \
+ RSV(0x39) \
+ RSV(0x3A) \
+ RSV(0x3B) \
+ RSV(0x3C) \
+ RSV(0x3D) \
+ RSV(0x3E) \
+ RSV(0x3F) \
+ OPC(0x40, CmpEQI32) \
+ OPC(0x41, CmpNEI32) \
+ OPC(0x42, CmpLTI32S) \
+ OPC(0x43, CmpLTI32U) \
+ RSV(0x44) \
+ RSV(0x45) \
+ RSV(0x46) \
+ RSV(0x47) \
+ RSV(0x48) \
+ RSV(0x49) \
+ OPC(0x4A, CmpEQRef) \
+ OPC(0x4B, CmpNERef) \
+ OPC(0x4C, CmpNZRef) \
+ OPC(0x4D, CmpNZI32) \
+ RSV(0x4E) \
+ RSV(0x4F) \
+ OPC(0x50, Branch) \
+ OPC(0x51, CondBranch) \
+ OPC(0x52, Call) \
+ OPC(0x53, CallVariadic) \
+ OPC(0x54, Return) \
+ OPC(0x55, Fail) \
+ RSV(0x56) \
+ RSV(0x57) \
+ RSV(0x58) \
+ RSV(0x59) \
+ RSV(0x5A) \
+ RSV(0x5B) \
+ RSV(0x5C) \
+ RSV(0x5D) \
+ RSV(0x5E) \
+ RSV(0x5F) \
+ OPC(0x60, Yield) \
+ RSV(0x61) \
+ RSV(0x62) \
+ RSV(0x63) \
+ RSV(0x64) \
+ RSV(0x65) \
+ RSV(0x66) \
+ RSV(0x67) \
+ RSV(0x68) \
+ RSV(0x69) \
+ RSV(0x6A) \
+ RSV(0x6B) \
+ RSV(0x6C) \
+ RSV(0x6D) \
+ RSV(0x6E) \
+ RSV(0x6F) \
+ RSV(0x70) \
+ RSV(0x71) \
+ RSV(0x72) \
+ RSV(0x73) \
+ RSV(0x74) \
+ RSV(0x75) \
+ RSV(0x76) \
+ RSV(0x77) \
+ RSV(0x78) \
+ RSV(0x79) \
+ RSV(0x7A) \
+ RSV(0x7B) \
+ OPC(0x7C, Trace) \
+ OPC(0x7D, Print) \
+ OPC(0x7E, CondBreak) \
+ OPC(0x7F, Break) \
+ RSV(0x80) \
+ RSV(0x81) \
+ RSV(0x82) \
+ RSV(0x83) \
+ RSV(0x84) \
+ RSV(0x85) \
+ RSV(0x86) \
+ RSV(0x87) \
+ RSV(0x88) \
+ RSV(0x89) \
+ RSV(0x8A) \
+ RSV(0x8B) \
+ RSV(0x8C) \
+ RSV(0x8D) \
+ RSV(0x8E) \
+ RSV(0x8F) \
+ RSV(0x90) \
+ RSV(0x91) \
+ RSV(0x92) \
+ RSV(0x93) \
+ RSV(0x94) \
+ RSV(0x95) \
+ RSV(0x96) \
+ RSV(0x97) \
+ RSV(0x98) \
+ RSV(0x99) \
+ RSV(0x9A) \
+ RSV(0x9B) \
+ RSV(0x9C) \
+ RSV(0x9D) \
+ RSV(0x9E) \
+ RSV(0x9F) \
+ OPC(0xA0, PrefixExtI64) \
+ OPC(0xA1, PrefixExtF32) \
+ OPC(0xA2, PrefixExtF64) \
+ RSV(0xA3) \
+ RSV(0xA4) \
+ RSV(0xA5) \
+ RSV(0xA6) \
+ RSV(0xA7) \
+ RSV(0xA8) \
+ RSV(0xA9) \
+ RSV(0xAA) \
+ RSV(0xAB) \
+ RSV(0xAC) \
+ RSV(0xAD) \
+ RSV(0xAE) \
+ RSV(0xAF) \
+ RSV(0xB0) \
+ RSV(0xB1) \
+ RSV(0xB2) \
+ RSV(0xB3) \
+ RSV(0xB4) \
+ RSV(0xB5) \
+ RSV(0xB6) \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 0x01,
+ IREE_VM_OP_EXT_I64_GlobalLoadIndirectI64 = 0x02,
+ IREE_VM_OP_EXT_I64_GlobalStoreIndirectI64 = 0x03,
+ IREE_VM_OP_EXT_I64_RSV_0x04,
+ IREE_VM_OP_EXT_I64_RSV_0x05,
+ IREE_VM_OP_EXT_I64_RSV_0x06,
+ IREE_VM_OP_EXT_I64_RSV_0x07,
+ IREE_VM_OP_EXT_I64_ConstI64Zero = 0x08,
+ IREE_VM_OP_EXT_I64_ConstI64 = 0x09,
+ IREE_VM_OP_EXT_I64_RSV_0x0A,
+ IREE_VM_OP_EXT_I64_RSV_0x0B,
+ IREE_VM_OP_EXT_I64_RSV_0x0C,
+ IREE_VM_OP_EXT_I64_RSV_0x0D,
+ IREE_VM_OP_EXT_I64_RSV_0x0E,
+ IREE_VM_OP_EXT_I64_RSV_0x0F,
+ IREE_VM_OP_EXT_I64_RSV_0x10,
+ IREE_VM_OP_EXT_I64_RSV_0x11,
+ IREE_VM_OP_EXT_I64_RSV_0x12,
+ IREE_VM_OP_EXT_I64_RSV_0x13,
+ IREE_VM_OP_EXT_I64_ListGetI64 = 0x14,
+ IREE_VM_OP_EXT_I64_ListSetI64 = 0x15,
+ IREE_VM_OP_EXT_I64_RSV_0x16,
+ IREE_VM_OP_EXT_I64_RSV_0x17,
+ IREE_VM_OP_EXT_I64_RSV_0x18,
+ IREE_VM_OP_EXT_I64_RSV_0x19,
+ IREE_VM_OP_EXT_I64_RSV_0x1A,
+ IREE_VM_OP_EXT_I64_RSV_0x1B,
+ IREE_VM_OP_EXT_I64_RSV_0x1C,
+ IREE_VM_OP_EXT_I64_RSV_0x1D,
+ IREE_VM_OP_EXT_I64_SelectI64 = 0x1E,
+ IREE_VM_OP_EXT_I64_RSV_0x1F,
+ IREE_VM_OP_EXT_I64_SwitchI64 = 0x20,
+ IREE_VM_OP_EXT_I64_RSV_0x21,
+ IREE_VM_OP_EXT_I64_AddI64 = 0x22,
+ IREE_VM_OP_EXT_I64_SubI64 = 0x23,
+ IREE_VM_OP_EXT_I64_MulI64 = 0x24,
+ IREE_VM_OP_EXT_I64_DivI64S = 0x25,
+ IREE_VM_OP_EXT_I64_DivI64U = 0x26,
+ IREE_VM_OP_EXT_I64_RemI64S = 0x27,
+ IREE_VM_OP_EXT_I64_RemI64U = 0x28,
+ IREE_VM_OP_EXT_I64_NotI64 = 0x29,
+ IREE_VM_OP_EXT_I64_AndI64 = 0x2A,
+ IREE_VM_OP_EXT_I64_OrI64 = 0x2B,
+ IREE_VM_OP_EXT_I64_XorI64 = 0x2C,
+ IREE_VM_OP_EXT_I64_ShlI64 = 0x2D,
+ IREE_VM_OP_EXT_I64_ShrI64S = 0x2E,
+ IREE_VM_OP_EXT_I64_ShrI64U = 0x2F,
+ IREE_VM_OP_EXT_I64_RSV_0x30,
+ IREE_VM_OP_EXT_I64_RSV_0x31,
+ IREE_VM_OP_EXT_I64_TruncI64I32 = 0x32,
+ IREE_VM_OP_EXT_I64_RSV_0x33,
+ IREE_VM_OP_EXT_I64_RSV_0x34,
+ IREE_VM_OP_EXT_I64_RSV_0x35,
+ IREE_VM_OP_EXT_I64_RSV_0x36,
+ IREE_VM_OP_EXT_I64_ExtI32I64S = 0x37,
+ IREE_VM_OP_EXT_I64_ExtI32I64U = 0x38,
+ IREE_VM_OP_EXT_I64_RSV_0x39,
+ IREE_VM_OP_EXT_I64_RSV_0x3A,
+ IREE_VM_OP_EXT_I64_RSV_0x3B,
+ IREE_VM_OP_EXT_I64_RSV_0x3C,
+ IREE_VM_OP_EXT_I64_RSV_0x3D,
+ IREE_VM_OP_EXT_I64_RSV_0x3E,
+ IREE_VM_OP_EXT_I64_RSV_0x3F,
+ IREE_VM_OP_EXT_I64_CmpEQI64 = 0x40,
+ IREE_VM_OP_EXT_I64_CmpNEI64 = 0x41,
+ IREE_VM_OP_EXT_I64_CmpLTI64S = 0x42,
+ IREE_VM_OP_EXT_I64_CmpLTI64U = 0x43,
+ IREE_VM_OP_EXT_I64_RSV_0x44,
+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P_EXT_I64_RSV_0xF7,
+ IREE_VM_OP_EXT_I64_RSV_0xF8,
+ IREE_VM_OP_EXT_I64_RSV_0xF9,
+ IREE_VM_OP_EXT_I64_RSV_0xFA,
+ IREE_VM_OP_EXT_I64_RSV_0xFB,
+ IREE_VM_OP_EXT_I64_RSV_0xFC,
+ IREE_VM_OP_EXT_I64_RSV_0xFD,
+ IREE_VM_OP_EXT_I64_RSV_0xFE,
+ IREE_VM_OP_EXT_I64_RSV_0xFF,
+} iree_vm_ext_i64_op_t;
+
+#define IREE_VM_OP_EXT_I64_TABLE(OPC, RSV) \
+ OPC(0x00, GlobalLoadI64) \
+ OPC(0x01, GlobalStoreI64) \
+ OPC(0x02, GlobalLoadIndirectI64) \
+ OPC(0x03, GlobalStoreIndirectI64) \
+ RSV(0x04) \
+ RSV(0x05) \
+ RSV(0x06) \
+ RSV(0x07) \
+ OPC(0x08, ConstI64Zero) \
+ OPC(0x09, ConstI64) \
+ RSV(0x0A) \
+ RSV(0x0B) \
+ RSV(0x0C) \
+ RSV(0x0D) \
+ RSV(0x0E) \
+ RSV(0x0F) \
+ RSV(0x10) \
+ RSV(0x11) \
+ RSV(0x12) \
+ RSV(0x13) \
+ OPC(0x14, ListGetI64) \
+ OPC(0x15, ListSetI64) \
+ RSV(0x16) \
+ RSV(0x17) \
+ RSV(0x18) \
+ RSV(0x19) \
+ RSV(0x1A) \
+ RSV(0x1B) \
+ RSV(0x1C) \
+ RSV(0x1D) \
+ OPC(0x1E, SelectI64) \
+ RSV(0x1F) \
+ OPC(0x20, SwitchI64) \
+ RSV(0x21) \
+ OPC(0x22, AddI64) \
+ OPC(0x23, SubI64) \
+ OPC(0x24, MulI64) \
+ OPC(0x25, DivI64S) \
+ OPC(0x26, DivI64U) \
+ OPC(0x27, RemI64S) \
+ OPC(0x28, RemI64U) \
+ OPC(0x29, NotI64) \
+ OPC(0x2A, AndI64) \
+ OPC(0x2B, OrI64) \
+ OPC(0x2C, XorI64) \
+ OPC(0x2D, ShlI64) \
+ OPC(0x2E, ShrI64S) \
+ OPC(0x2F, ShrI64U) \
+ RSV(0x30) \
+ RSV(0x31) \
+ OPC(0x32, TruncI64I32) \
+ RSV(0x33) \
+ RSV(0x34) \
+ RSV(0x35) \
+ RSV(0x36) \
+ OPC(0x37, ExtI32I64S) \
+ OPC(0x38, ExtI32I64U) \
+ RSV(0x39) \
+ RSV(0x3A) \
+ RSV(0x3B) \
+ RSV(0x3C) \
+ RSV(0x3D) \
+ RSV(0x3E) \
+ RSV(0x3F) \
+ OPC(0x40, CmpEQI64) \
+ OPC(0x41, CmpNEI64) \
+ OPC(0x42, CmpLTI64S) \
+ OPC(0x43, CmpLTI64U) \
+ RSV(0x44) \
+ RSV(0x45) \
+ RSV(0x46) \
+ RSV(0x47) \
+ RSV(0x48) \
+ RSV(0x49) \
+ RSV(0x4A) \
+ RSV(0x4B) \
+ RSV(0x4C) \
+ OPC(0x4D, CmpNZI64) \
+ RSV(0x4E) \
+ RSV(0x4F) \
+ RSV(0x50) \
+ RSV(0x51) \
+ RSV(0x52) \
+ RSV(0x53) \
+ RSV(0x54) \
+ RSV(0x55) \
+ RSV(0x56) \
+ RSV(0x57) \
+ RSV(0x58) \
+ RSV(0x59) \
+ RSV(0x5A) \
+ RSV(0x5B) \
+ RSV(0x5C) \
+ RSV(0x5D) \
+ RSV(0x5E) \
+ RSV(0x5F) \
+ RSV(0x60) \
+ RSV(0x61) \
+ RSV(0x62) \
+ RSV(0x63) \
+ RSV(0x64) \
+ RSV(0x65) \
+ RSV(0x66) \
+ RSV(0x67) \
+ RSV(0x68) \
+ RSV(0x69) \
+ RSV(0x6A) \
+ RSV(0x6B) \
+ RSV(0x6C) \
+ RSV(0x6D) \
+ RSV(0x6E) \
+ RSV(0x6F) \
+ RSV(0x70) \
+ RSV(0x71) \
+ RSV(0x72) \
+ RSV(0x73) \
+ RSV(0x74) \
+ RSV(0x75) \
+ RSV(0x76) \
+ RSV(0x77) \
+ RSV(0x78) \
+ RSV(0x79)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RSV(0xCA) \
+ RSV(0xCB) \
+ RSV(0xCC) \
+ RSV(0xCD) \
+ RSV(0xCE) \
+ RSV(0xCF) \
+ RSV(0xD0) \
+ RSV(0xD1) \
+ RSV(0xD2) \
+ RSV(0xD3) \
+ RSV(0xD4) \
+ RSV(0xD5) \
+ RSV(0xD6) \
+ RSV(0xD7) \
+ RSV(0xD8) \
+ RSV(0xD9) \
+ RSV(0xDA) \
+ RSV(0xDB) \
+ RSV(0xDC) \
+ RSV(0xDD) \
+ RSV(0xDE) \
+ RSV(0xDF) \
+ RSV(0xE0) \
+ RSV(0xE1) \
+ RSV(0xE2) \
+ RSV(0xE3) \
+ RSV(0xE4) \
+ RSV(0xE5) \
+ RSV(0xE6) \
+ RSV(0xE7) \
+ RSV(0xE8) \
+ RSV(0xE9) \
+ RSV(0xEA) \
+ RSV(0xEB) \
+ RSV(0xEC) \
+ RSV(0xED) \
+ RSV(0xEE) \
+ RSV(0xEF) \
+ RSV(0xF0) \
+ RSV(0xF1) \
+ RSV(0xF2) \
+ RSV(0xF3) \
+ RSV(0xF4) \
+ RSV(0xF5) \
+ RSV(0xF6) \
+ RSV(0xF7) \
+ RSV(0xF8) \
+ RSV(0xF9) \
+ RSV(0xFA) \
+ RSV(0xFB) \
+ RSV(0xFC) \
+ RSV(0xFD) \
+ RSV(0xFE) \
+ RSV(0xFF)
+
diff --git a/scripts/get_e2e_artifacts.py b/scripts/get_e2e_artifacts.py
index 21d9259..3b5fd62 100755
--- a/scripts/get_e2e_artifacts.py
+++ b/scripts/get_e2e_artifacts.py
@@ -163,7 +163,7 @@
command = ['bazel', 'test', *test_suites, '--color=yes']
print(f'Running: `{" ".join(command)}`')
if not FLAGS.dry_run:
- subprocess.check_call(command)
+ subprocess.run(command, check=True)
print()
written_paths = set()
diff --git a/scripts/git/submodule_versions.py b/scripts/git/submodule_versions.py
index d3e2c61..d578286 100755
--- a/scripts/git/submodule_versions.py
+++ b/scripts/git/submodule_versions.py
@@ -46,7 +46,7 @@
raw_status = utils.execute(["git", "submodule", "status"],
cwd=repo_dir,
silent=True,
- capture_output=True).decode("UTF-8")
+ capture_output=True).stdout
status_lines = []
for line in raw_status.splitlines():
# Format is a status char followed by revision, space and path.
@@ -105,7 +105,7 @@
"still in the version file") % (path,))
continue
if written is None:
- print("Warning: Submodule %s is not in the version file" % (current,))
+ print(f"Warning: Submodule '{current}' is not in the version file")
continue
# Directly update the submodule commit hash in the index.
# See: https://stackoverflow.com/questions/33514642
@@ -138,7 +138,7 @@
" ./scripts/git/submodule_versions.py export # Use version in git state ('actual')"
)
for k, (current, written) in diff_versions.items():
- print("%s : actual=%s written=%s" % (k, current, written))
+ print(f"{k} : actual={current} written={written}")
return False
return True
diff --git a/scripts/git/update_to_llvm_syncpoint.py b/scripts/git/update_to_llvm_syncpoint.py
index d543b48..0775bb1 100755
--- a/scripts/git/update_to_llvm_syncpoint.py
+++ b/scripts/git/update_to_llvm_syncpoint.py
@@ -152,8 +152,7 @@
return utils.execute(["git", "rev-parse", rev],
cwd=path,
silent=True,
- capture_output=True,
- universal_newlines=True).strip()
+ capture_output=True).stdout.strip()
def find_new_llvm_bazel_commit(llvm_bazel_path, llvm_commit, llvm_bazel_commit):
@@ -192,8 +191,7 @@
return utils.execute(
["git", "submodule", "status", "third_party/llvm-project"],
capture_output=True,
- universal_newlines=True,
- cwd=llvm_bazel_path).split()[0].lstrip("+-")
+ cwd=llvm_bazel_path).stdout.split()[0].lstrip("+-")
def find_new_tf_commit(tensorflow_path, llvm_commit, tf_commit):
@@ -233,8 +231,7 @@
"tensorflow/workspace.bzl"
],
capture_output=True,
- universal_newlines=True,
- cwd=tensorflow_path).split()
+ cwd=tensorflow_path).stdout.split()
if len(tf_integrate_commits) > 2:
raise RuntimeError(
f"Expected one or two TF commits to involve LLVM commit {llvm_commit},"
diff --git a/scripts/git/utils.py b/scripts/git/utils.py
index b4328e7..cbeb29e 100644
--- a/scripts/git/utils.py
+++ b/scripts/git/utils.py
@@ -25,7 +25,7 @@
return execute(["git", "rev-parse", "--show-toplevel"],
cwd=os.path.dirname(__file__),
capture_output=True,
- silent=True).strip().decode("UTF-8")
+ silent=True).stdout.strip()
def str2bool(v):
@@ -42,22 +42,30 @@
raise argparse.ArgumentTypeError("Boolean value expected.")
-def execute(args, cwd, capture_output=False, silent=False, **kwargs):
+def execute(args, cwd, capture_output=False, text=True, silent=False, **kwargs):
"""Executes a command.
Args:
args: List of command line arguments.
cwd: Directory to execute in.
capture_output: Whether to capture the output.
+ text: Whether or not to treat std* as text (as opposed to binary streams).
silent: Whether to skip logging the invocation.
**kwargs: Extra arguments to pass to subprocess.exec
Returns:
- The output if capture_output, otherwise None.
+ A subprocess.CompletedProcess
"""
if not silent:
- print("+", " ".join(args), " [from %s]" % cwd)
+ print(f"+{' '.join(args)} [from {cwd}]")
if capture_output:
- return subprocess.check_output(args, cwd=cwd, **kwargs)
- else:
- return subprocess.check_call(args, cwd=cwd, **kwargs)
+ # TODO(#4131) python>=3.7: Use capture_output=True.
+ kwargs["stdout"] = subprocess.PIPE
+ kwargs["stderr"] = subprocess.PIPE
+ return subprocess.run(
+ args,
+ cwd=cwd,
+ check=True,
+ # TODO(#4131) python>=3.7: Replace 'universal_newlines' with 'text'.
+ universal_newlines=text,
+ **kwargs)
diff --git a/scripts/update_e2e_coverage.py b/scripts/update_e2e_coverage.py
index fba79b2..3de3738 100755
--- a/scripts/update_e2e_coverage.py
+++ b/scripts/update_e2e_coverage.py
@@ -30,6 +30,7 @@
REFERENCE_BACKEND = 'tf'
# Assumes that tests are expanded for the tf, iree_vmla, and
# iree_vulkan backends.
+# TODO(#4131) python>=3.7: Remove redundant OrderedDict
BACKENDS_TO_TITLES = collections.OrderedDict([
('tf', 'tensorflow'),
('tflite', 'tflite'),
diff --git a/scripts/update_op_coverage.py b/scripts/update_op_coverage.py
index 575a390..77ce782 100755
--- a/scripts/update_op_coverage.py
+++ b/scripts/update_op_coverage.py
@@ -79,9 +79,15 @@
def get_tested_ops_for_backends(build_dir):
"""Parses current op tests for each backend."""
- ctest_output = subprocess.check_output(
- ['ctest', '-N', '-L', E2E_XLA_OPS_PATH], cwd=build_dir)
- tests = ctest_output.decode('ascii').strip().split('\n')
+ completed_process = subprocess.run(
+ ['ctest', '-N', '-L', E2E_XLA_OPS_PATH],
+ cwd=build_dir,
+ # TODO(#4131) python>=3.7: Use capture_output=True.
+ stderr=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ # TODO(#4131) python>=3.7: Replace 'universal_newlines' with 'text'.
+ universal_newlines=True)
+ tests = completed_process.stdout.strip().split('\n')
res = collections.defaultdict(list)
for t in tests:
if not t.endswith('.mlir'):
diff --git a/scripts/utils.py b/scripts/utils.py
index 870044b..313dd65 100644
--- a/scripts/utils.py
+++ b/scripts/utils.py
@@ -33,10 +33,13 @@
print(f'Running: `{" ".join(command)}`')
if dry_run:
return None, None
- process = subprocess.run(command,
- stderr=subprocess.PIPE,
- stdout=subprocess.PIPE,
- universal_newlines=True)
+ process = subprocess.run(
+ command,
+ # TODO(#4131) python>=3.7: Use capture_output=True.
+ stderr=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ # TODO(#4131) python>=3.7: Replace 'universal_newlines' with 'text'.
+ universal_newlines=True)
if log_stderr:
for line in process.stderr.splitlines():
diff --git a/third_party/dear_imgui b/third_party/dear_imgui
deleted file mode 160000
index 4c13807..0000000
--- a/third_party/dear_imgui
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4c13807b7d43ff0946b7ffea0ae3aee9e611d778
diff --git a/third_party/sdl2 b/third_party/sdl2
deleted file mode 160000
index a1390ed..0000000
--- a/third_party/sdl2
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit a1390ed39ec77ecfb574bc6fcd5bfc5e3adbdea9