diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-03-17 20:30:50 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-04-21 02:38:00 +0800 |
commit | ce87984cc1d3b6f9e1784da831dbdf008853c2c6 (patch) | |
tree | 4b42601b289e231947e68f28729fcf55f041fd7d /libsolidity/interface | |
parent | 81775b2df6e624ee9b09f7405d8c0d912d873e5b (diff) | |
download | dexon-solidity-ce87984cc1d3b6f9e1784da831dbdf008853c2c6.tar.gz dexon-solidity-ce87984cc1d3b6f9e1784da831dbdf008853c2c6.tar.zst dexon-solidity-ce87984cc1d3b6f9e1784da831dbdf008853c2c6.zip |
Parse remappings in StandardCompiler
Diffstat (limited to 'libsolidity/interface')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index fd697716..444ce02e 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -45,6 +45,11 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) Json::Value const& settings = _input.get("settings", Json::Value()); + vector<string> remappings; + for (auto const& remapping: settings.get("remappings", Json::Value())) + remappings.push_back(remapping.asString()); + m_compilerStack.setRemappings(remappings); + Json::Value optimizerSettings = settings.get("optimizer", Json::Value()); bool optimize = optimizerSettings.get("enabled", Json::Value(false)).asBool(); unsigned optimizeRuns = optimizerSettings.get("runs", Json::Value(200u)).asUInt(); |