solidity/libyul/CMakeLists.txt

202 lines
6.2 KiB
CMake
Raw Normal View History

2020-12-09 01:02:25 +00:00
# This will re-generate the polyfill headers, if any file within libyul/backends/wasm/polyfill/ was modified.
set_directory_properties(PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/libyul/backends/wasm/polyfill/)
set(POLYFILLS Arithmetic Bitwise Comparison Conversion Interface Keccak Logical Memory)
set(GENERATED_POLYFILL_HEADERS)
foreach(polyfill IN LISTS POLYFILLS)
set(POLYFILL_FILE ${CMAKE_SOURCE_DIR}/libyul/backends/wasm/polyfill/${polyfill}.yul)
file(READ ${POLYFILL_FILE} EWASM_POLYFILL_CONTENT HEX)
string(REGEX MATCHALL ".." EWASM_POLYFILL_CONTENT "${EWASM_POLYFILL_CONTENT}")
string(REGEX REPLACE ";" ",\n\t0x" EWASM_POLYFILL_CONTENT "${EWASM_POLYFILL_CONTENT}")
set(EWASM_POLYFILL_CONTENT "0x${EWASM_POLYFILL_CONTENT}")
set(EWASM_POLYFILL_NAME ${polyfill})
configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/ewasm_polyfill.in" ${CMAKE_BINARY_DIR}/include/ewasmPolyfills/${polyfill}.h @ONLY)
list(APPEND GENERATED_POLYFILL_HEADERS ${CMAKE_BINARY_DIR}/include/ewasmPolyfills/${polyfill}.h)
endforeach()
add_library(yul
2020-12-09 01:02:25 +00:00
${GENERATED_POLYFILL_HEADERS}
AsmAnalysis.cpp
AsmAnalysis.h
AsmAnalysisInfo.h
AST.h
ASTForward.h
2019-10-15 10:38:12 +00:00
AsmJsonConverter.h
AsmJsonConverter.cpp
AsmJsonImporter.h
AsmJsonImporter.cpp
AsmParser.cpp
AsmParser.h
AsmPrinter.cpp
AsmPrinter.h
2019-02-13 10:57:08 +00:00
AssemblyStack.h
AssemblyStack.cpp
2019-01-29 09:51:25 +00:00
CompilabilityChecker.cpp
CompilabilityChecker.h
2019-12-19 16:58:20 +00:00
Dialect.cpp
Dialect.h
Exceptions.h
2018-11-04 08:34:21 +00:00
Object.cpp
Object.h
2018-11-04 08:34:21 +00:00
ObjectParser.cpp
ObjectParser.h
2020-11-25 18:10:31 +00:00
Scope.cpp
Scope.h
ScopeFiller.cpp
ScopeFiller.h
Utilities.cpp
Utilities.h
YulString.h
backends/evm/AbstractAssembly.h
2019-02-13 10:19:24 +00:00
backends/evm/AsmCodeGen.h
backends/evm/AsmCodeGen.cpp
2019-05-28 10:57:15 +00:00
backends/evm/ConstantOptimiser.cpp
backends/evm/ConstantOptimiser.h
backends/evm/EVMAssembly.cpp
backends/evm/EVMAssembly.h
backends/evm/EVMCodeTransform.cpp
backends/evm/EVMCodeTransform.h
2018-12-06 23:56:16 +00:00
backends/evm/EVMDialect.cpp
backends/evm/EVMDialect.h
2018-12-04 17:57:32 +00:00
backends/evm/EVMObjectCompiler.cpp
backends/evm/EVMObjectCompiler.h
2019-05-28 10:57:15 +00:00
backends/evm/EVMMetrics.cpp
backends/evm/EVMMetrics.h
2019-05-09 14:47:51 +00:00
backends/evm/NoOutputAssembly.h
backends/evm/NoOutputAssembly.cpp
backends/wasm/EVMToEwasmTranslator.cpp
backends/wasm/EVMToEwasmTranslator.h
2019-10-31 16:27:52 +00:00
backends/wasm/BinaryTransform.cpp
backends/wasm/BinaryTransform.h
2019-12-09 16:43:22 +00:00
backends/wasm/TextTransform.cpp
backends/wasm/TextTransform.h
backends/wasm/WasmCodeTransform.cpp
backends/wasm/WasmCodeTransform.h
2019-04-17 17:14:27 +00:00
backends/wasm/WasmDialect.cpp
backends/wasm/WasmDialect.h
backends/wasm/WasmObjectCompiler.cpp
backends/wasm/WasmObjectCompiler.h
backends/wasm/WordSizeTransform.cpp
backends/wasm/WordSizeTransform.h
optimiser/ASTCopier.cpp
optimiser/ASTCopier.h
optimiser/ASTWalker.cpp
optimiser/ASTWalker.h
optimiser/BlockFlattener.cpp
optimiser/BlockFlattener.h
optimiser/BlockHasher.cpp
optimiser/BlockHasher.h
2019-08-06 10:46:16 +00:00
optimiser/CallGraphGenerator.cpp
optimiser/CallGraphGenerator.h
optimiser/CircularReferencesPruner.cpp
optimiser/CircularReferencesPruner.h
optimiser/CommonSubexpressionEliminator.cpp
optimiser/CommonSubexpressionEliminator.h
2019-09-11 09:42:59 +00:00
optimiser/ConditionalSimplifier.cpp
optimiser/ConditionalSimplifier.h
2019-10-07 08:06:00 +00:00
optimiser/ConditionalUnsimplifier.cpp
optimiser/ConditionalUnsimplifier.h
2019-05-09 19:56:56 +00:00
optimiser/ControlFlowSimplifier.cpp
optimiser/ControlFlowSimplifier.h
optimiser/DataFlowAnalyzer.cpp
optimiser/DataFlowAnalyzer.h
2019-03-28 13:18:17 +00:00
optimiser/DeadCodeEliminator.cpp
optimiser/DeadCodeEliminator.h
optimiser/Disambiguator.cpp
optimiser/Disambiguator.h
optimiser/EquivalentFunctionDetector.cpp
optimiser/EquivalentFunctionDetector.h
optimiser/EquivalentFunctionCombiner.cpp
optimiser/EquivalentFunctionCombiner.h
optimiser/ExpressionInliner.cpp
optimiser/ExpressionInliner.h
optimiser/ExpressionJoiner.cpp
optimiser/ExpressionJoiner.h
optimiser/ExpressionSimplifier.cpp
optimiser/ExpressionSimplifier.h
optimiser/ExpressionSplitter.cpp
optimiser/ExpressionSplitter.h
optimiser/ForLoopConditionIntoBody.cpp
optimiser/ForLoopConditionIntoBody.h
2019-09-11 16:55:31 +00:00
optimiser/ForLoopConditionOutOfBody.cpp
optimiser/ForLoopConditionOutOfBody.h
optimiser/ForLoopInitRewriter.cpp
optimiser/ForLoopInitRewriter.h
optimiser/FullInliner.cpp
optimiser/FullInliner.h
2020-07-02 10:48:20 +00:00
optimiser/FunctionCallFinder.cpp
optimiser/FunctionCallFinder.h
optimiser/FunctionGrouper.cpp
optimiser/FunctionGrouper.h
optimiser/FunctionHoister.cpp
optimiser/FunctionHoister.h
optimiser/InlinableExpressionFunctionFinder.cpp
optimiser/InlinableExpressionFunctionFinder.h
2019-05-21 13:52:15 +00:00
optimiser/KnowledgeBase.cpp
optimiser/KnowledgeBase.h
2019-05-27 22:14:01 +00:00
optimiser/LoadResolver.cpp
optimiser/LoadResolver.h
optimiser/LoopInvariantCodeMotion.cpp
optimiser/LoopInvariantCodeMotion.h
optimiser/MainFunction.cpp
optimiser/MainFunction.h
optimiser/Metrics.cpp
optimiser/Metrics.h
optimiser/NameCollector.cpp
optimiser/NameCollector.h
optimiser/NameDispenser.cpp
optimiser/NameDispenser.h
2019-06-19 09:37:22 +00:00
optimiser/NameDisplacer.cpp
optimiser/NameDisplacer.h
2020-08-06 19:44:50 +00:00
optimiser/NameSimplifier.cpp
optimiser/NameSimplifier.h
2019-09-23 14:32:50 +00:00
optimiser/OptimiserStep.h
optimiser/OptimizerUtilities.cpp
optimiser/OptimizerUtilities.h
2020-05-11 17:56:29 +00:00
optimiser/ReasoningBasedSimplifier.cpp
optimiser/ReasoningBasedSimplifier.h
optimiser/RedundantAssignEliminator.cpp
optimiser/RedundantAssignEliminator.h
optimiser/Rematerialiser.cpp
optimiser/Rematerialiser.h
2019-01-16 10:44:45 +00:00
optimiser/SSAReverser.cpp
optimiser/SSAReverser.h
optimiser/SSATransform.cpp
optimiser/SSATransform.h
optimiser/SSAValueTracker.cpp
optimiser/SSAValueTracker.h
optimiser/Semantics.cpp
optimiser/Semantics.h
optimiser/SimplificationRules.cpp
optimiser/SimplificationRules.h
2019-02-04 16:30:29 +00:00
optimiser/StackCompressor.cpp
optimiser/StackCompressor.h
2020-07-02 10:48:20 +00:00
optimiser/StackLimitEvader.cpp
optimiser/StackLimitEvader.h
optimiser/StackToMemoryMover.cpp
optimiser/StackToMemoryMover.h
optimiser/StructuralSimplifier.cpp
optimiser/StructuralSimplifier.h
optimiser/Substitution.cpp
optimiser/Substitution.h
optimiser/Suite.cpp
optimiser/Suite.h
optimiser/SyntacticalEquality.cpp
optimiser/SyntacticalEquality.h
2020-02-11 20:57:52 +00:00
optimiser/TypeInfo.cpp
optimiser/TypeInfo.h
optimiser/UnusedFunctionParameterPruner.cpp
optimiser/UnusedFunctionParameterPruner.h
optimiser/UnusedFunctionsCommon.h
optimiser/UnusedFunctionsCommon.cpp
optimiser/UnusedPruner.cpp
optimiser/UnusedPruner.h
2018-12-13 14:26:01 +00:00
optimiser/VarDeclInitializer.cpp
optimiser/VarDeclInitializer.h
optimiser/VarNameCleaner.cpp
optimiser/VarNameCleaner.h
)
2020-05-11 17:56:29 +00:00
2019-12-12 23:39:29 +00:00
target_link_libraries(yul PUBLIC evmasm solutil langutil smtutil)