There have been three options related to threads and users had to set all three of them separately to get the correct compilation results. This makes sure the relationship between the options makes sense and sets necessary options for users if only part of the necessary options are specified. This does:
- Remove -matomics; this option alone does not enable anything, so removed it to not confuse users.
- -mthread-model posix sets -target-feature +atomics
- -pthread sets both -target-feature +atomics and -mthread-model posix
Also errors out when explicitly given options don't match, such as -pthread is given with -mthread-model single.
Shouldn't every use of hasFlag be getLastArgValue instead?