mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Rename to solstdlib
This commit is contained in:
parent
5898ff1128
commit
12aa9e54cb
@ -140,7 +140,7 @@ add_subdirectory(libevmasm)
|
|||||||
add_subdirectory(libyul)
|
add_subdirectory(libyul)
|
||||||
add_subdirectory(libsolidity)
|
add_subdirectory(libsolidity)
|
||||||
add_subdirectory(libsolc)
|
add_subdirectory(libsolc)
|
||||||
add_subdirectory(stdlib)
|
add_subdirectory(solstdlib)
|
||||||
add_subdirectory(tools)
|
add_subdirectory(tools)
|
||||||
|
|
||||||
if (NOT EMSCRIPTEN)
|
if (NOT EMSCRIPTEN)
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
#include <libsolutil/Algorithms.h>
|
#include <libsolutil/Algorithms.h>
|
||||||
#include <libsolutil/FunctionSelector.h>
|
#include <libsolutil/FunctionSelector.h>
|
||||||
|
|
||||||
#include "stdlib.h"
|
#include "solstdlib.h"
|
||||||
|
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
|
|
||||||
@ -352,7 +352,7 @@ bool CompilerStack::parse()
|
|||||||
|
|
||||||
Parser parser{m_errorReporter, m_evmVersion, m_parserErrorRecovery};
|
Parser parser{m_errorReporter, m_evmVersion, m_parserErrorRecovery};
|
||||||
|
|
||||||
for (auto [name, content]: solidity::stdlib::sources)
|
for (auto [name, content]: solidity::solstdlib::sources)
|
||||||
m_sources[name].charStream = make_unique<CharStream>(content, name);
|
m_sources[name].charStream = make_unique<CharStream>(content, name);
|
||||||
|
|
||||||
vector<string> sourcesToParse;
|
vector<string> sourcesToParse;
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
# This will re-generate the headers if any file within src was modified.
|
# This will re-generate the headers if any file within src was modified.
|
||||||
set_directory_properties(PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/stdlib/src/)
|
set_directory_properties(PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/solstdlib/src/)
|
||||||
|
|
||||||
set(STDLIB precompiles)
|
set(STDLIB precompiles)
|
||||||
set(GENERATED_STDLIB_HEADERS)
|
set(GENERATED_STDLIB_HEADERS)
|
||||||
foreach(src IN LISTS STDLIB)
|
foreach(src IN LISTS STDLIB)
|
||||||
set(STDLIB_FILE ${CMAKE_SOURCE_DIR}/stdlib/src/${src}.sol)
|
set(STDLIB_FILE ${CMAKE_SOURCE_DIR}/solstdlib/src/${src}.sol)
|
||||||
file(READ ${STDLIB_FILE} STDLIB_FILE_CONTENT HEX)
|
file(READ ${STDLIB_FILE} STDLIB_FILE_CONTENT HEX)
|
||||||
string(REGEX MATCHALL ".." STDLIB_FILE_CONTENT "${STDLIB_FILE_CONTENT}")
|
string(REGEX MATCHALL ".." STDLIB_FILE_CONTENT "${STDLIB_FILE_CONTENT}")
|
||||||
string(REGEX REPLACE ";" ",\n\t0x" STDLIB_FILE_CONTENT "${STDLIB_FILE_CONTENT}")
|
string(REGEX REPLACE ";" ",\n\t0x" STDLIB_FILE_CONTENT "${STDLIB_FILE_CONTENT}")
|
||||||
set(STDLIB_FILE_CONTENT "0x${STDLIB_FILE_CONTENT}")
|
set(STDLIB_FILE_CONTENT "0x${STDLIB_FILE_CONTENT}")
|
||||||
set(STDLIB_FILE_NAME ${src})
|
set(STDLIB_FILE_NAME ${src})
|
||||||
configure_file("${CMAKE_SOURCE_DIR}/stdlib/stdlib.src.h.in" ${CMAKE_BINARY_DIR}/include/stdlib/${src}.h @ONLY)
|
configure_file("${CMAKE_SOURCE_DIR}/solstdlib/solstdlib.src.h.in" ${CMAKE_BINARY_DIR}/include/solstdlib/${src}.h @ONLY)
|
||||||
list(APPEND GENERATED_STDLIB_HEADERS ${CMAKE_BINARY_DIR}/include/stdlib/${src}.h)
|
list(APPEND GENERATED_STDLIB_HEADERS ${CMAKE_BINARY_DIR}/include/solstdlib/${src}.h)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
configure_file("${CMAKE_SOURCE_DIR}/stdlib/stdlib.h.in" ${CMAKE_BINARY_DIR}/include/stdlib.h @ONLY)
|
configure_file("${CMAKE_SOURCE_DIR}/solstdlib/solstdlib.h.in" ${CMAKE_BINARY_DIR}/include/solstdlib.h @ONLY)
|
||||||
|
|
||||||
#add_library(stdlib
|
#add_library(stdlib
|
||||||
# ${GENERATED_STDLIB_HEADERS}
|
# ${GENERATED_STDLIB_HEADERS}
|
@ -3,13 +3,13 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "stdlib/precompiles.h"
|
#include "solstdlib/precompiles.h"
|
||||||
|
|
||||||
namespace solidity::stdlib
|
namespace solidity::solstdlib
|
||||||
{
|
{
|
||||||
|
|
||||||
static std::map<std::string, std::string> sources = {
|
static std::map<std::string, std::string> sources = {
|
||||||
{ "std/precompiles.sol", precompiles },
|
{ "std/precompiles.sol", precompiles },
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace solidity::stdlib
|
} // namespace solidity::solstdlib
|
13
solstdlib/solstdlib.src.h.in
Normal file
13
solstdlib/solstdlib.src.h.in
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// The generation of this file is defined in solstdlib/CMakeLists.txt.
|
||||||
|
// This file was generated by using the content of solstdlib/src/@STDLIB_FILE_NAME@.sol.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace solidity::solstdlib
|
||||||
|
{
|
||||||
|
|
||||||
|
static char const @STDLIB_FILE_NAME@[] = {
|
||||||
|
@STDLIB_FILE_CONTENT@, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace solidity::solstdlib
|
@ -1,13 +0,0 @@
|
|||||||
// The generation of this file is defined in stdlib/CMakeLists.txt.
|
|
||||||
// This file was generated by using the content of stdlib/src/@STDLIB_FILE_NAME@.sol.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
namespace solidity::stdlib
|
|
||||||
{
|
|
||||||
|
|
||||||
static char const @STDLIB_FILE_NAME@[] = {
|
|
||||||
@STDLIB_FILE_CONTENT@, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace solidity::stdlib
|
|
Loading…
Reference in New Issue
Block a user