Re: Why GCJ won't load my plugin when compiling bytecode?
Bryce McKinlay <[email protected]>
| Newsgroups | gmane.comp.gcc.java.devel |
|---|---|
| Message-ID | <CALUNu-r=C=ieWTLybaW-U9RdSOStOzUWMrH4LQeFXCzPspxbCQ@mail.gmail.com> |
On Fri, Sep 9, 2011 at 10:57 PM, Li junsong <[email protected]> wrote: > I chose gcj to write plugin to do optimization. So I need its .class > files output, but not its binary code. Modern versions of gcj only compile .class files to object code. gcj doesn't directly compile Java source code, nor generate bytecode. (early versions of gcj did do these things, but it was changed years ago) When you give it .java source files, gcj actually first calls out to regular java compiler, then compiles the resulting .class files. You can see the commands its running by adding -v to your command line. > If I do not get it wrong, it means that If I want to do such > optimization and measure > the outcome, I have to look for other compilers, ( since GCC plugins > won't work ) right? That's right. A gcc plugin will never have a chance to run when using "gcj -C" because the gcc compiler itself is not run. Bryce