diff options
author | Rhett Aultman <roadriverrail@gmail.com> | 2016-12-12 06:17:38 +0800 |
---|---|---|
committer | Rhett Aultman <rhett.aultman@meraki.net> | 2017-01-17 01:32:57 +0800 |
commit | 071b936b371cd5287717d0ac27b80b837836809a (patch) | |
tree | b4aa6fc05ef1ee3ebec47d7c4ada0c2c0a14a10e /solc | |
parent | 9e88f1eebe27c780c80be06d702eac30e2fc5fa3 (diff) | |
download | dexon-solidity-071b936b371cd5287717d0ac27b80b837836809a.tar dexon-solidity-071b936b371cd5287717d0ac27b80b837836809a.tar.gz dexon-solidity-071b936b371cd5287717d0ac27b80b837836809a.tar.bz2 dexon-solidity-071b936b371cd5287717d0ac27b80b837836809a.tar.lz dexon-solidity-071b936b371cd5287717d0ac27b80b837836809a.tar.xz dexon-solidity-071b936b371cd5287717d0ac27b80b837836809a.tar.zst dexon-solidity-071b936b371cd5287717d0ac27b80b837836809a.zip |
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.
Diffstat (limited to 'solc')
-rw-r--r-- | solc/CommandLineInterface.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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; |