Skip to content

Remove or add CMake guards for remaining runtime dependencies on LLVM/MLIR #4155

Closed

Description

@ScottTodd

Related issues: #1142, #357

We should be able to build just IREE's runtime components by setting IREE_BUILD_COMPILER=OFF and IREE_ENABLE_MLIR=OFF:
https://github.com/google/iree/blob/fdb88b949519731ac49d2eafcdb5d4f29e1617f8/CMakeLists.txt#L32-L42

This doesn't work today for a few reasons, which we should fix.

iree/vm/ ops use(d) tablegen to generate files as part of the build process

We're using checked in generated files with #4092, but have some lingering CMake checks that can be cleaned up now:

https://github.com/google/iree/blob/fdb88b949519731ac49d2eafcdb5d4f29e1617f8/CMakeLists.txt#L494-L506

tests in iree/vm/ use iree_bytecode_module

Sample target:
https://github.com/google/iree/blob/fdb88b949519731ac49d2eafcdb5d4f29e1617f8/iree/vm/test/CMakeLists.txt#L36-L44

used by this test: https://github.com/google/iree/blob/fdb88b949519731ac49d2eafcdb5d4f29e1617f8/iree/vm/CMakeLists.txt#L180-L195

both of those should be guarded by IREE_BUILD_COMPILER like #1876. They could also explicitly check for IREE_BUILD_TESTS

to guard them, edit the BUILD files in those directories and use iree_cmake_extra_content: https://github.com/google/iree/blob/fdb88b949519731ac49d2eafcdb5d4f29e1617f8/iree/build_defs.oss.bzl#L47
together with bazel_to_cmake. Here's a good example:

Activity

  1. added
    infrastructure
    runtime
    runtime/vm
    on Dec 9, 2020
  2. added a commit that references this issue on Dec 24, 2020
    bd3610e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

infrastructureruntimeruntime/vm

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions