Skip to content

Commit

Permalink
Revert custom lib usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy committed Dec 13, 2024
1 parent 16925b6 commit 8aae242
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions ir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,15 +25,41 @@ 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
visitor.cpp
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
Expand All @@ -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)
Expand Down

0 comments on commit 8aae242

Please sign in to comment.