|
7.5. Options and SwitchesAs we have said, gcj is part of the gcc suite of compilers and therefore supports all of the non-language-specific options and switches of that suite. As with most reference material in this book, we will only cover the highlights. See the gcj manpage or the project's Web site for full details.[14]
-Idirname Add dirname to the classpath ahead of its existing contents. -Dname[=value] Add name and optional value to the system properties list. This is only valid with the --main switch. --main Specifies which class contains the application's main(). This gives the starting point for an application. -fno-bounds-check Disable array bounds checking. Like "real" Java, gcj checks all array operations to ensure that array bounds are not exceeded. Using this switch disables that check. It speeds up array operations but can introduce subtle and hard-to-find bugs. Use at your own risk. -fno-store-check Like -fno-bounds-check, this disables a safety feature on arrays. Normally, when you store an object into an array, a check is made to make sure that the object is assignment-compatible with the array type (in other words, that the object is an instanceof() of the array type). Using this switch disables this test. It speeds up array operations but can introduce subtle and hard-to-find bugs. Use at your own risk. There are other switches for native methods, bytecode (as opposed to native) compilation, and some switches related to resources. We leave it as an exercise for the reader to learn and use these where needed. |
|