[PATCH] D139717: Revert "[Driver] Remove Joined -X"

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 16 09:11:08 PST 2022


MaskRay added a comment.

In D139717#3998077 <https://reviews.llvm.org/D139717#3998077>, @manojgupta wrote:

> Xlinker still works. Xcompiler is failing.
>
> A google search will show that Xcompiler is a wide-spread option used by many packages. Whether or not GCC supports it is not relevant. Please do not remove options just because you do not use them.

Can you give an example how they use `-Xcompiler`?

  % gcc -Xcompiler,-fpic -c a.c
  gcc: error: unrecognized command-line option ‘-Xcompiler,-fpic’
  % gcc -Xcompiler -fpic -c a.c
  gcc: error: unrecognized command-line option ‘-Xcompiler’; did you mean ‘--compile’?

My commit message clearly says why the joined form is awkward and should be removed.
It seems that the many occurrences you found are likely for GNU libtool (`-Xcompiler foo` `-Wc,foo`), not for Clang Driver.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139717/new/

https://reviews.llvm.org/D139717



More information about the cfe-commits mailing list