From 8aae242302fa70bceb2450c4197412b4ce37a5a1 Mon Sep 17 00:00:00 2001 From: fruffy Date: Fri, 13 Dec 2024 15:34:17 +0100 Subject: [PATCH] Revert custom lib usage. --- ir/CMakeLists.txt | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/ir/CMakeLists.txt b/ir/CMakeLists.txt index 31e3189237..242f6d104c 100644 --- a/ir/CMakeLists.txt +++ b/ir/CMakeLists.txt @@ -12,18 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -set (IR_LIB_SRCS - bitrange.cpp - json_parser.cpp -) - -add_library (ir_lib STATIC ${IR_LIB_SRCS}) -target_link_libraries(ir_lib PRIVATE p4ctoolkit absl::flat_hash_map ${LIBGC_LIBRARIES}) - - set (IR_SRCS annotations.cpp base.cpp + bitrange.cpp dbprint.cpp dbprint-expression.cpp dbprint-stmt.cpp @@ -33,8 +25,9 @@ set (IR_SRCS expression.cpp ir.cpp irutils.cpp - node.cpp + json_parser.cpp loop-visitor.cpp + node.cpp pass_manager.cpp pass_utils.cpp type.cpp @@ -42,6 +35,31 @@ set (IR_SRCS write_context.cpp ) +set (IR_HDRS + annotations.h + configuration.h + dbprint.h + dump.h + id.h + indexed_vector.h + ir-inline.h + ir-tree-macros.h + ir.h + ir-traversal.h + ir-traversal-internal.h + irutils.h + json_generator.h + json_loader.h + json_parser.h + namemap.h + node.h + nodemap.h + pass_manager.h + pass_utils.h + vector.h + visitor.h +) + set (BASE_IR_DEF_FILES ${CMAKE_CURRENT_SOURCE_DIR}/base.def ${CMAKE_CURRENT_SOURCE_DIR}/type.def @@ -52,7 +70,7 @@ set (BASE_IR_DEF_FILES set (IR_DEF_FILES ${IR_DEF_FILES} ${BASE_IR_DEF_FILES} PARENT_SCOPE) add_library (ir STATIC ${IR_SRCS}) -target_link_libraries(ir PUBLIC ir_lib PRIVATE absl::flat_hash_map ${LIBGC_LIBRARIES}) +target_link_libraries(ir PRIVATE absl::flat_hash_map ${LIBGC_LIBRARIES}) add_dependencies(ir genIR)