[llvm-dev] clang -xc++ foo.o
Hubert Tong via llvm-dev
llvm-dev at lists.llvm.org
Fri Aug 24 06:27:18 PDT 2018
On Thu, Aug 23, 2018 at 2:02 PM Jay K via llvm-dev <llvm-dev at lists.llvm.org>
wrote:
> clang -xc++ -c 1.c 2.c
> clang -xc++ main.c 1.o 2.o
> 1.o:1:1: error: source file is not valid UTF-8
>
> Would be nice, albeit I realize kinda proby/non-deterministic/big, if .o
> files were recognized and -xc++ did not apply to them.
>
It would be nice, and can possibly be generalized to say:
-xc++:.c (apply -xc++ to .c files going forward)
-xnone:.o (prevent the effects of a previous -x from applying to .o files
going forward)
> I'm converting C to C++ and don't want to rename files, at least at this
> point, maybe forever.
>
> For now I've compromised and main remains C. It is much smaller than the
> various libraries, so -xc++ is almost a complete solution.
>
> Thank you,
> - Jay
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180824/7ac5f0fd/attachment.html>
More information about the llvm-dev
mailing list