[cfe-users] clang -cc1 with -c gives 'unknown argument error

don hinton via cfe-users cfe-users at lists.llvm.org
Fri Mar 3 16:45:09 PST 2017


To get the proper -cc1 invocation, try passing -###, e.g.,

echo "" | clang -xc++ -c - -###


hth...
don


On Fri, Mar 3, 2017 at 8:50 AM Larry Evans via cfe-users <
cfe-users at lists.llvm.org> wrote:

> According to:
>
> https://gist.github.com/masuidrive/5231110
>
> -cc1 with -c should work; however, it doesn't:
>
> --{--cut here--
>
> /home/evansl/dwnlds/llvm/3.9/prebuilt/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang++
> --version
> clang version 3.9.0 (tags/RELEASE_390/final)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> InstalledDir:
>
> /home/evansl/dwnlds/llvm/3.9/prebuilt/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin
> uname -a
> Linux lje-OptiPlex-9020 4.4.0-65-generic #86-Ubuntu SMP Thu Feb 23
> 17:49:58 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
> cat test.cpp
> int main()
> {
>    return 0;
> }
>
>
> /home/evansl/dwnlds/llvm/3.9/prebuilt/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang++
> -cc1 -c -print-stats test.cpp
> error: unknown argument: '-c'
> Makefile:31: recipe for target 'bench' failed
> make: *** [bench] Error 1
>
> Compilation exited abnormally with code 2 at Fri Mar  3 11:46:43
>
> --}--cut here--
>
> Please, what am I doing wrong?
>
> -regards,
> Larry
> _______________________________________________
> cfe-users mailing list
> cfe-users at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20170304/3567cfaf/attachment.html>


More information about the cfe-users mailing list