Commit 73b26e73 by Zircon Liu

Add a working example for opt.

parent 8adfd27b
......@@ -26,5 +26,5 @@ add_subdirectory(third_party/iree)
add_subdirectory(tools)
# Set include directories
include_directories(${IREE_SOURCE_DIR}/iree/compiler/src)
include_directories(${IREE_SOURCE_DIR}/compiler/src)
add_executable(iprc-opt
iprc-opt-main.cc
)
target_link_libraries(iprc-opt
PRIVATE
iree::compiler::API2::Headers
iree::compiler::API2::Impl
)
target_include_directories(iprc-opt
PRIVATE
${IREE_SOURCE_DIR}/compiler/src
)
// Copyright 2020 The IREE Authors
//
// Licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// Main entry function for iree-opt and derived binaries.
//
// Based on mlir-opt but registers the passes and dialects we care about.
#include "iree/compiler/API2/ToolEntryPoints.h"
int main(int argc, char **argv) { return ireeOptRunMain(argc, argv); }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment