Acknowledged

Compiler command line: 2nd argument to "-d" (device) will be silently ignored, including invalid argument (see description for why this is a problem)

This is a problem if a dev tries to specify the “--disable-has-api-check-removal” argument with a *single leading hyphen* (which is supported), but they accidentally make a typo: e.g. “-disable-api-as-check-removal”. This will be interpreted equivalently to “-d isable-api-as-check-removal”, and the incorrect option/argument will be silently ignored by the compiler, so the dev will have no idea they made a typo.

Details:

- The 1st argument to "-d" is supplied by the VS Code extension (which means that there will always be 1 valid argument to "-d", so any additional argument will be ignored)

- The compiler accepts long options with either a double-dash prefix (e.g. "--disable-api-has-check-removal") or a single-dash prefix (e.g. "-disable-api-has-check-removal)

- If a multi-character option is prefixed by a single dash, and it does not match a long option, then it will be interpreted as a short option with an argument (just like Unix/Linux). e.g. "-dfr965" is the same as "-d fr965", since there is no "dfr965" long option

- "disable-api-has-check-removal" starts with "d"

Imagine the following scenario:

- I as a dev want to supply the "--disable-api-has-check-removal" argument to the compiler

- I follow the advice of certain forum posts which suggest using the form with a single dash prefix "-disable-api-has-check-removal" (yes, there are posts which literally describe the option with a single dash prefix)

- I accidentally make a typo in the argument: e.g. "-disable-api-as-check-removal"

Unfortunately, the compiler will silently ignore this typo, because it will interpret "-disable-api-as-check-removal" as "-d isable-api-as-check-removal" and a 2nd argument to -d (whether valid or not) will be silently ignored.

OTOH, if I had specified the argument as "--disable-api-as-check-removal", the compiler would return an error saying that "--disable-api-as-check-removal" is an unknown option.

I think the correct thing to do here is to flag a 2nd argument to "-d" an error, regardless of whether it refers to a valid device or not. (Note that it's not valid to build for 2 devices at the same time. For example, if I specify "-d fr965 -d fr235" on the command line, the 2nd argument to "-d" will be ignored, and the compiler will build for "fr965".)

As a bonus, I think that long options should only be accepted if they have 2 dashes as a prefix. I don't really see the benefit of accepting a long option with 1 dash, as the meaning of such options is ambiguous. i.e. "-some-long-option" is the same as "--some-long-option" only if "some-long-option" is a valid option, otherwise "-some-long-option" is actually equivalent to "-s ome-long-option". otoh, the meaning of "--some-long-option" is unambiguous - it's the long option called "some-long-option".