Build yosys-slang

This commit is contained in:
Miodrag Milanovic 2026-06-10 17:52:06 +02:00
parent ea70de2165
commit 985b282226
3 changed files with 20 additions and 0 deletions

3
.gitmodules vendored
View File

@ -5,3 +5,6 @@
[submodule "cxxopts"]
path = libs/cxxopts
url = https://github.com/jarro2783/cxxopts
[submodule "libs/yosys-slang"]
path = libs/yosys-slang
url = https://github.com/mmicko/yosys-slang

View File

@ -7,3 +7,19 @@ add_subdirectory(json11)
add_subdirectory(minisat)
add_subdirectory(sha1)
add_subdirectory(subcircuit)
# Link yosys slang
set(_old_BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS}")
set(BUILD_SHARED_LIBS OFF)
set(BUILD_AS_PLUGIN OFF)
set(YOSYS_SLANG_OBJECT_LIBRARY ON)
add_subdirectory(yosys-slang)
set(BUILD_SHARED_LIBS "${_old_BUILD_SHARED_LIBS}")
set_target_properties(yosys-slang PROPERTIES
YOSYS_IS_ABC ON # Do not error on warning
YOSYS_COMPONENT YES
YOSYS_REQUIRES ""
YOSYS_ENABLE_IF TRUE
)
add_library(yosys_read_slang ALIAS yosys-slang)
set_property(TARGET yosys_everything APPEND PROPERTY YOSYS_REQUIRES read_slang)

1
libs/yosys-slang Submodule

@ -0,0 +1 @@
Subproject commit 0b5c0b333887678a41825f99093a8b0af32d80d2