mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
CommandLineInterface: Disallow --yul-dialect and --machine when not in assembly mode
This commit is contained in:
parent
8396002fe7
commit
0d7b3ae503
@ -1289,6 +1289,13 @@ bool CommandLineInterface::processInput()
|
||||
|
||||
return assemble(inputLanguage, targetMachine, optimize, yulOptimiserSteps);
|
||||
}
|
||||
else if (countEnabledOptions({g_strYulDialect, g_argMachine}) >= 1)
|
||||
{
|
||||
serr() << "--" << g_strYulDialect << " and --" << g_argMachine << " ";
|
||||
serr() << "are only valid in assembly mode." << endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_args.count(g_argLink))
|
||||
{
|
||||
// switch to linker mode
|
||||
|
@ -0,0 +1 @@
|
||||
--yul-dialect evm --machine ewasm
|
1
test/cmdlineTests/strict_asm_options_in_non_asm_mode/err
Normal file
1
test/cmdlineTests/strict_asm_options_in_non_asm_mode/err
Normal file
@ -0,0 +1 @@
|
||||
--yul-dialect and --machine are only valid in assembly mode.
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
|
||||
contract C
|
||||
{
|
||||
function f() public pure {}
|
||||
}
|
Loading…
Reference in New Issue
Block a user