From 6d8929a71aa5cecb6f4a1aa15a2a5db640a62631 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 19 May 2017 16:10:32 +0100 Subject: Rename onChainMetadata to metadata --- solc/CommandLineInterface.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'solc/CommandLineInterface.cpp') diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 0222ccb0..db497d84 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -292,12 +292,12 @@ void CommandLineInterface::handleSignatureHashes(string const& _contract) cout << "Function signatures: " << endl << out; } -void CommandLineInterface::handleOnChainMetadata(string const& _contract) +void CommandLineInterface::handleMetadata(string const& _contract) { if (!m_args.count(g_argMetadata)) return; - string data = m_compiler->onChainMetadata(_contract); + string data = m_compiler->metadata(_contract); if (m_args.count(g_argOutputDir)) createFile(m_compiler->filesystemFriendlyName(_contract) + "_meta.json", data); else @@ -850,7 +850,7 @@ void CommandLineInterface::handleCombinedJSON() if (requests.count(g_strAbi)) contractData[g_strAbi] = dev::jsonCompactPrint(m_compiler->contractABI(contractName)); if (requests.count("metadata")) - contractData["metadata"] = m_compiler->onChainMetadata(contractName); + contractData["metadata"] = m_compiler->metadata(contractName); if (requests.count(g_strBinary)) contractData[g_strBinary] = m_compiler->object(contractName).toHex(); if (requests.count(g_strBinaryRuntime)) @@ -1164,7 +1164,7 @@ void CommandLineInterface::outputCompilationResults() handleBytecode(contract); handleSignatureHashes(contract); - handleOnChainMetadata(contract); + handleMetadata(contract); handleABI(contract); handleNatspec(DocumentationType::NatspecDev, contract); handleNatspec(DocumentationType::NatspecUser, contract); -- cgit v1.2.3 From 6848199b66d9cadae901f71dcf944fe9aa927eeb Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 17 Jul 2017 11:49:45 +0100 Subject: Add CompilerStack::setLibraries --- solc/CommandLineInterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'solc/CommandLineInterface.cpp') diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index db497d84..38f72713 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -774,10 +774,12 @@ bool CommandLineInterface::processInput() m_compiler->setRemappings(m_args[g_argInputFile].as>()); for (auto const& sourceCode: m_sourceCodes) m_compiler->addSource(sourceCode.first, sourceCode.second); + if (m_args.count(g_argLibraries)) + m_compiler->setLibraries(m_libraries); // TODO: Perhaps we should not compile unless requested bool optimize = m_args.count(g_argOptimize) > 0; unsigned runs = m_args[g_argOptimizeRuns].as(); - bool successful = m_compiler->compile(optimize, runs, m_libraries); + bool successful = m_compiler->compile(optimize, runs); for (auto const& error: m_compiler->errors()) SourceReferenceFormatter::printExceptionInformation( -- cgit v1.2.3 From 30012db396793efad5dba9a2bbb64d34994709ce Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 17 Jul 2017 11:54:02 +0100 Subject: Add CompilerStack::setOptimiserSettings --- solc/CommandLineInterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'solc/CommandLineInterface.cpp') diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 38f72713..740061a1 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -779,7 +779,9 @@ bool CommandLineInterface::processInput() // TODO: Perhaps we should not compile unless requested bool optimize = m_args.count(g_argOptimize) > 0; unsigned runs = m_args[g_argOptimizeRuns].as(); - bool successful = m_compiler->compile(optimize, runs); + m_compiler->setOptimiserSettings(optimize, runs); + + bool successful = m_compiler->compile(); for (auto const& error: m_compiler->errors()) SourceReferenceFormatter::printExceptionInformation( -- cgit v1.2.3