How to compile IR into bin?

Hello! I’m trying to manually optimize the results of solc a.sol --bin --ir-optimized -optimize --via-ir, and use solc b.yul --yul to compile it. However, the latter line does not run correctly. How should I compile the IR into binary code?

Please use the --strict-assembly option. --yul is the typed Yul dialect, which is not really what you want.

We need to update the --help output to make this distinction clear. Of the three assembly options (--assemble, --yul and --strict-assembly) only the third one is still relevant today.

1 Like