The -x should accept "c" and "c++" as options, not "cxx".
The -x handler was not handling "c" or "c++" properly.
When -x is forcing the compile to cxx, it also needs to force the link to cxx mode.