mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
CMake: Isolate libyul into its own static library
This commit is contained in:
parent
713d94476e
commit
3734f40d31
@ -47,6 +47,7 @@ configure_project(TESTS)
|
||||
add_subdirectory(libdevcore)
|
||||
add_subdirectory(liblangutil)
|
||||
add_subdirectory(libevmasm)
|
||||
add_subdirectory(libyul)
|
||||
add_subdirectory(libsolidity)
|
||||
add_subdirectory(libsolc)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Until we have a clear separation, libyul has to be included here
|
||||
file(GLOB_RECURSE sources "*.cpp" "../libyul/*.cpp")
|
||||
file(GLOB_RECURSE headers "*.h" "../libyul/*.h")
|
||||
file(GLOB_RECURSE sources "*.cpp")
|
||||
file(GLOB_RECURSE headers "*.h")
|
||||
|
||||
find_package(Z3 QUIET)
|
||||
if (${Z3_FOUND})
|
||||
@ -26,7 +26,7 @@ if (NOT (${Z3_FOUND} OR ${CVC4_FOUND}))
|
||||
endif()
|
||||
|
||||
add_library(solidity ${sources} ${headers})
|
||||
target_link_libraries(solidity PUBLIC evmasm langutil devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
|
||||
target_link_libraries(solidity PUBLIC yul evmasm langutil devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
|
||||
|
||||
if (${Z3_FOUND})
|
||||
target_link_libraries(solidity PUBLIC ${Z3_LIBRARY})
|
||||
|
43
libyul/CMakeLists.txt
Normal file
43
libyul/CMakeLists.txt
Normal file
@ -0,0 +1,43 @@
|
||||
add_library(yul
|
||||
AsmAnalysis.cpp
|
||||
AsmAnalysisInfo.cpp
|
||||
AsmCodeGen.cpp
|
||||
AsmParser.cpp
|
||||
AsmPrinter.cpp
|
||||
AsmScope.cpp
|
||||
AsmScopeFiller.cpp
|
||||
backends/evm/EVMAssembly.cpp
|
||||
backends/evm/EVMCodeTransform.cpp
|
||||
optimiser/ASTCopier.cpp
|
||||
optimiser/ASTWalker.cpp
|
||||
optimiser/BlockFlattener.cpp
|
||||
optimiser/CommonSubexpressionEliminator.cpp
|
||||
optimiser/DataFlowAnalyzer.cpp
|
||||
optimiser/Disambiguator.cpp
|
||||
optimiser/ExpressionInliner.cpp
|
||||
optimiser/ExpressionJoiner.cpp
|
||||
optimiser/ExpressionSimplifier.cpp
|
||||
optimiser/ExpressionSplitter.cpp
|
||||
optimiser/ForLoopInitRewriter.cpp
|
||||
optimiser/FullInliner.cpp
|
||||
optimiser/FunctionGrouper.cpp
|
||||
optimiser/FunctionHoister.cpp
|
||||
optimiser/InlinableExpressionFunctionFinder.cpp
|
||||
optimiser/MainFunction.cpp
|
||||
optimiser/Metrics.cpp
|
||||
optimiser/NameCollector.cpp
|
||||
optimiser/NameDispenser.cpp
|
||||
optimiser/RedundantAssignEliminator.cpp
|
||||
optimiser/Rematerialiser.cpp
|
||||
optimiser/SSATransform.cpp
|
||||
optimiser/SSAValueTracker.cpp
|
||||
optimiser/Semantics.cpp
|
||||
optimiser/SimplificationRules.cpp
|
||||
optimiser/Substitution.cpp
|
||||
optimiser/Suite.cpp
|
||||
optimiser/SyntacticalEquality.cpp
|
||||
optimiser/UnusedPruner.cpp
|
||||
optimiser/Utilities.cpp
|
||||
optimiser/VarDeclPropagator.cpp
|
||||
)
|
||||
target_link_libraries(yul PUBLIC devcore)
|
@ -27,7 +27,7 @@ add_executable(soltest ${sources} ${headers}
|
||||
${liblll_sources} ${liblll_headers}
|
||||
${libsolidity_sources} ${libsolidity_headers}
|
||||
)
|
||||
target_link_libraries(soltest PRIVATE libsolc solidity evmasm devcore ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
|
||||
target_link_libraries(soltest PRIVATE libsolc yul solidity evmasm devcore ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
|
||||
|
||||
if (LLL)
|
||||
target_link_libraries(soltest PRIVATE lll)
|
||||
|
Loading…
Reference in New Issue
Block a user