mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
merge
This commit is contained in:
parent
8c384232eb
commit
a44bd8c987
10
main.cpp
10
main.cpp
@ -42,7 +42,8 @@ void help()
|
|||||||
{
|
{
|
||||||
cout << "Usage solc [OPTIONS] <file>" << endl
|
cout << "Usage solc [OPTIONS] <file>" << endl
|
||||||
<< "Options:" << endl
|
<< "Options:" << endl
|
||||||
<< " -h,--help Show this help message and exit." << endl
|
<< " -o,--optimize Optimize the bytecode for size." << endl
|
||||||
|
<< " -h,--help Show this help message and exit." << endl
|
||||||
<< " -V,--version Show the version and exit." << endl;
|
<< " -V,--version Show the version and exit." << endl;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@ -58,10 +59,13 @@ void version()
|
|||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
string infile;
|
string infile;
|
||||||
|
bool optimize = false;
|
||||||
for (int i = 1; i < argc; ++i)
|
for (int i = 1; i < argc; ++i)
|
||||||
{
|
{
|
||||||
string arg = argv[i];
|
string arg = argv[i];
|
||||||
if (arg == "-h" || arg == "--help")
|
if (arg == "-o" || arg == "--optimize")
|
||||||
|
optimize = true;
|
||||||
|
else if (arg == "-h" || arg == "--help")
|
||||||
help();
|
help();
|
||||||
else if (arg == "-V" || arg == "--version")
|
else if (arg == "-V" || arg == "--version")
|
||||||
version();
|
version();
|
||||||
@ -98,7 +102,7 @@ int main(int argc, char** argv)
|
|||||||
printer.print(cout);
|
printer.print(cout);
|
||||||
|
|
||||||
compiler.compileContract(*ast);
|
compiler.compileContract(*ast);
|
||||||
instructions = compiler.getAssembledBytecode();
|
instructions = compiler.getAssembledBytecode(optimize);
|
||||||
}
|
}
|
||||||
catch (ParserError const& exception)
|
catch (ParserError const& exception)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user