[cfe-dev] "no input files" error when specifying language?
Goncalo Carvalho via cfe-dev
cfe-dev at lists.llvm.org
Fri Sep 25 03:24:07 PDT 2015
Not sure what the apple version does but I tried it on my cubox and this
appears to work
clang -E -x assembler-with-cpp src/arm/am335x-boneblack.dts -Iinclude -Isrc
Cubox has clang 3.6.2.
Beaglebone has 3.7 so would expect to work there as well.
Comparing with gcc 5.2 and the output is not the same but comparable with
no invalid preprocessing directive errors.
On 25 September 2015 at 09:09, Rick Mann via cfe-dev <cfe-dev at lists.llvm.org
> wrote:
> EDIT: I forgot to add: the same thing happens if I specify -o
> <outputfilename>.
>
> In the ARM Linux development world, it's common to use gcc to pre-process
> "Device Tree" files to take advantage of #include and #define directives.
> Unfortunately, the DT syntax also includes the use of the '#', so they
> specify -x assembler-with-cpp, and it processes nicely. The typical
> invocation (with gcc) looks like this:
>
> cpp -Wp,-MD,src/arm/.am335x-arduino-tre.dtb.d.pre.tmp -nostdinc -Iinclude
> -Isrc/arm -Itestcase-data -undef -D__DTS__ -x assembler-with-cpp -o
> src/arm/.am335x-arduino-tre.dtb.dts.tmp src/arm/am335x-arduino-tre.dts
>
> A simplified invocation is:
>
> cpp -x assembler-with-cpp -o FILE.temp.dts FILE.dts
>
> clang doesn't like this. It's okay with this:
>
> cpp FILE.dts
>
> But of course it complains about the invalid preprocessing directive it
> finds (e.g. "#address-cells = <1>;"). The cure for this is "-x
> assembler-with-cpp", but if I invoke it with either option above:
>
> cpp -x assembler-with-cpp FILE.dts
> cpp -o FILE.temp.dts FILE.dts
>
> It says "clang: error: no input files". If I place the filename FILE.dts
> before any of the options, they don't get applied to that file.
>
> The clang I'm trying this with is:
>
> $ clang --version
> Apple LLVM version 7.0.0 (clang-700.0.72)
> Target: x86_64-apple-darwin14.5.0
> Thread model: posix
>
> Is there any way to do what I want to do here?
>
> Thanks!
>
>
> --
> Rick Mann
> rmann at latencyzero.com
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
--
http://www.cryogenicgraphics.com
http://www.flickr.com/photos/hdrflow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150925/d968c3ff/attachment.html>
More information about the cfe-dev
mailing list