Add option to build with unmodified original manifest

Sergej Kostjucenko requested to merge aj-original-manifest into master

Created by: ascjones

By default a contract's Cargo.toml will be amended to optimize the final Wasm binary. At the moment that means just removing the rlib crate type if present, though in the future we may make further modifications.

This PR provides the option -Z original-manifest (feedback on the name appreciated) to disable all modifications to the Cargo.toml: it will just build using the original file. Note that this is introduced as an unstable-option (short -Z)

This will result in a larger final contract binary size if rlib is enabled, but gives full control to the user for options from the Cargo.toml. This is useful for troubleshooting e.g https://github.com/paritytech/ink/issues/364.

Options

In general we should try to minimize the number of options/flags we support in order to keep it as simple as possible, so this and other options should be considered through that lens.

Update: with this in mind I have added this as an unstable-option (short -Z),

Merge request reports