mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add ability to set the target EVM version.
This commit is contained in:
1 parent
c9840c98f4
commit
5ab4a1ae78
5 files changed
+135
-12
No files matched your search
@@ -318,6 +318,14 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input)
|
||||
|
||||
Json::Value const& settings = _input.get("settings", Json::Value());
|
||||
|
||||
if (settings.isMember("evmVersion"))
|
||||
{
|
||||
boost::optional<EVMVersion> version = EVMVersion::fromString(settings.get("evmVersion", {}).asString());
|
||||
if (!version)
|
||||
return formatFatalError("JSONError", "Invalid EVM version requested.");
|
||||
m_compilerStack.setEVMVersion(*version);
|
||||
}
|
||||
|
||||
vector<string> remappings;
|
||||
for (auto const& remapping: settings.get("remappings", Json::Value()))
|
||||
remappings.push_back(remapping.asString());
|
||||
|
||||
Reference in new issue
Block a user