From 071b936b371cd5287717d0ac27b80b837836809a Mon Sep 17 00:00:00 2001 From: Rhett Aultman Date: Sun, 11 Dec 2016 14:17:38 -0800 Subject: Only avoid collision if it's the same file @chriseth had suggested that it would be better if contracts were referenced in a file:contract notation, and that we output .bin files that prepend original path names if necessary to avoid a collision. This commit is mostly a draft; it still needs to be run through the test suite. --- solc/CommandLineInterface.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'solc') diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index e322455b..cebc9a07 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -185,8 +185,10 @@ void CommandLineInterface::handleBinary(string const& _contract) { if (m_args.count(g_argBinary)) { - if (m_args.count(g_argOutputDir)) - createFile(_contract + ".bin", m_compiler->object(_contract).toHex()); + if (m_args.count("output-dir")) + { + createFile(m_compiler->filesystemFriendlyName(_contract) + ".bin", m_compiler->object(_contract).toHex()); + } else { cout << "Binary: " << endl; -- cgit v1.2.3 From 0c98e4b2da6b5de885114a744339a1f0f96c79be Mon Sep 17 00:00:00 2001 From: Rhett Aultman Date: Fri, 16 Dec 2016 04:22:42 -0800 Subject: Stylistic corrections --- solc/CommandLineInterface.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'solc') diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index cebc9a07..4a4d3571 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -186,9 +186,7 @@ void CommandLineInterface::handleBinary(string const& _contract) if (m_args.count(g_argBinary)) { if (m_args.count("output-dir")) - { createFile(m_compiler->filesystemFriendlyName(_contract) + ".bin", m_compiler->object(_contract).toHex()); - } else { cout << "Binary: " << endl; -- cgit v1.2.3 From 610156fb92cbf9feadf14b6d0827f0f840b4c765 Mon Sep 17 00:00:00 2001 From: Rhett Aultman Date: Thu, 5 Jan 2017 20:08:34 -0500 Subject: Fix bad merge artifact(?) Looks like merging up munged line 188 in CommandLineInterface.cpp, so that a string literal was being used where a global variable should be. --- solc/CommandLineInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'solc') diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 4a4d3571..e49e8517 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -185,7 +185,7 @@ void CommandLineInterface::handleBinary(string const& _contract) { if (m_args.count(g_argBinary)) { - if (m_args.count("output-dir")) + if (m_args.count(g_argOutputDir)) createFile(m_compiler->filesystemFriendlyName(_contract) + ".bin", m_compiler->object(_contract).toHex()); else { -- cgit v1.2.3