The menu "Options|Compiler" allows to set other options that a ect the compilers behaviour.
When this menu item is chosen, a dialog pops up that displays several tabs.
There are 5 tabs:
-
Syntax
- Here options can be set that a ect the various syntax aspects of the code. They
correspond mostly to the -S option on the command line (section 5.1.5, page 98).
-
Code generation
- These options control the generated code; they are mostly concerned
with the -C and -X command-line options.
-
Verbose
- These set the verbosity of the compiler when compiling. The messages of the
compiler are shown in the compiler messages window (can be called with F12).
-
Browser
- options concerning the generated browser information. Browser information needs
to be generated for the symbol browser to work.
-
Assembler
- Options concerning the reading of assembler blocks (-R on the command line)
and the generated assembler (-A on the command line)
Under the tab pages, the Conditional de nes entry box is visible; here symbols to de ne can be
entered. The symbols should be separated with semicolons. The syntax tab of the compiler options
dialog is shown in gure (6.23).
In this dialog, the following options can be set:
-
Delphi 2 extensions on
- Enables the use of classes and exceptions (-Sd (see page 5.1.5)
on the command-line).
-
C-like operators
- Allows the use of some extended operators such as +=, -= etc. (-Sc (see
page 5.1.5) on the command-line).
-
Stop after rst error
- when checked, the compiler stops after the rst error. Normally the
compiler continues compiling till a fatal error is reached. (-Se (see page 5.1.5) on the
command-line)
-
Allow label and goto
- Allow the use of label declarations and goto statements (-Sg (see
page 5.1.5) on the command line).
-
C++ styled inline
- allows the use of inlined functions (-Sc (see page 5.1.5) on the
command-line).
-
TP/BP 7.0 compatibility
- Try to be more Turbo Pascal compatible (-So (see page 5.1.5)
on the command-line).
-
Delphi compatibility
- try to be more Delphicompatible (-Sd (see page 5.1.5) on the
command-line).
-
Allow STATIC in objects
- Allow the Static modi er for object methods (-St (see page
5.1.5) on the command-line)
-
Strict var-strings
- Not used.
-
Extended syntax
- Not used.
-
Allow MMX operations
- Allow MMX operations.
The code generation tab of the compiler options dialog is shown in gure (6.24).
In this dialog, the following options can be set:
-
Run-time checks
- Controls what run-time checking code is generated. If such a check fails, a
run-time error is generated. the following checking code can be generated:
-
Range checking
- Code that checks the results of enumeration and subset type
operations is generated (-Cr (see page 5.1.4) command-line option)
-
Stack checking
- Code that checks whether the stack limit is not reached is generated
(-Cs (see page 5.1.4) command-line option)
-
I/O checking
- Code that checks the result of IO operations is generated. (-Ci (see
page 5.1.4) command-line option).
-
Integer over ow checking
- The result of integer operations is checked (-Co (see page
5.1.4) command-line option)
-
Target processor
- Set the target process for optimizations. The compiler can use di erent
optimizations for di erent processors. This corresponds to the Op option.
-
i386/i486
- Code is optimized for less than Pentium processors.
-
Pentium/pentiumMMX
- Code is optimized for Pentium processors.
-
PPro/PII/c6x86/K6
- Code is optimized for Pentium pro and higher processors.
-
Optimizations
- What optimizations should be used when compiling:
-
Generate faster code
- Corresponds to the -OG command-line option.
-
Generate smaller code
- Corresponds to the -Og command-line option.
-
Use register variables
- Corresponds to the -Or command-line option.
-
Uncertain optimizations
- Corresponds to the -Ou command-line option.
-
Level 1 optimizations
- Corresponds to the O1 command-line option.
-
Level 2 optimizations
- Corresponds to the O1 command-line option.
More information on these switches can be found in section 5.1.4, page 92. The verbose tab of the
compiler options dialog is shown in gure (6.25).
In this dialog, the following verbosity options (-v (see page 5.1.2) on the command-line) can be
set:
-
Warnings
- Generate warnings, corresponds to -vw on the command-line.
-
Notes
- Generate notes, corresponds to -vn on the command-line.
-
Hints
- Generate hints, corresponds to -vh on the command-line.
-
General info
- Generate general information, corresponds to -vi on the command-line.
-
User,tried info
- Generate information on used and tried les. Corresponds to -vut on the
command-line.
-
All
- Switch on full verbosity. Corresponds to -va on the command-line.
-
Show all procedure if error
- If an error using overloaded procedure occurs, show all
procedures. Corresponds to -vb on the command-line.
The browser tab of the compiler options dialog is shown in gure (6.26).
In this dialog, the browser options can be set:
-
No browser
- (default) no browser information is generated by the compiler.
-
Only global browser
- Browser information is generated for global symbols only, i.e.
symbols de ned not in a procedure or function (-b on the command-line)
-
Local and global browser
- Browser information is generated for all symbols, i.e. also for
symbols that are de ned in procedures or functions (-bl on the command-line)
Remark: If no browser information is generated, the symbol browser of the IDE will not work.
The assembler tab of the compiler options dialog is shown in gure (6.27).
In this dialog, the assembler reader and writer options can be set:
-
Assembler reader
- This allows to set the style of the assembler blocks in the sources:
-
Direct assembler
- The assembler blocks are copied as-is to the output (-Rdirect on
the command-line).
-
AT&T assembler
- The assembler is written in AT&T style assembler (-Ratt on the
command-line).
-
Intel style assembler
- The assembler is written in Intel style assembler blocks
(-Rintel on the command-line).
remark that this option is global, but locally the assembler style can be changed with
compiler directives.
-
Assembler info
- When writing assembler les, this option decides which extra information is
written to the assembler le in comments:
-
List source
- The source lines are written to the assembler les together with the
generated assembler (-al on the command line).
-
List register allocation
- The compilers internal register allocation/deallocation
information is written to the assembler le (-ar on the command-line).
-
List temp allocation
- The temporary register allocation/deallocation is written to
the assembler le. (-at on the command-line).
The latter two of these options are mainly useful for debugging the compiler itself, it should
be rarely necessary to use these.
-
Assembler output
- This option tells the compiler what assembler output should be
generated.
-
Use default output
- This depends on the target.
-
Use GNU as
- assemble using gnu as (-Aas on the command-line).
-
Use NASM co
- produce NASM co assembler (go32v2, -Anasmcoff on the
command-line)
-
Use NASM elf
- produce NASM elf assembler (linux, -Anasmelf on the
command-line).
-
Use NASM obj
- produce NASM obj assembler (-Anasmobj on the command-line).
-
Use MASM
- produce MASM (Microsoft assembler) assembler (-Amasm on the
command-line).
-
Use TASM
- produce TASM (Turbo Assembler) assembler (-Atasm on the
command-line).
-
Use co
- Write binary co les directly using the internal assembler (go32v2, -Acoff
on the command-line).
-
Use peco
- Write binary peco les les directly using the internal writer. (Win32)