2.10. Specifying Temp Directories

The armcl compiler provides several options that allow you to control where a temporary file is written during a given compilation. However, the tiarmclang compiler does not provide an analogous capability for controlling the location of the temporary files that are generated during a compilation. In most, if not all, cases, the tiarmclang compiler places temporary files in the current working directory (that is, whichever directory the tiarmclang executable was invoked from). Ordinarily, temporary files are removed when they are no longer needed by the tiarmclang compiler. However, like the armcl compiler, the tiarmclang compiler does support command-line options that keep one or more of the temporary files that are generated during a given compilation.

armcl Option (and alias)

tiarmclang Option

--abs_directory=<dir> (-fb)

not supported

The armcl compiler supports an absolute listing capability (-abs), which is not provided in the tiarmclang toolset. Thus the tiarmclang compiler does not provide an option to control where an absolute listing file would be written.

armcl Option (and alias)

tiarmclang Option

--asm_directory=<dir> (-fs)

-S -save-temps

The armcl compiler allows you to indicate where a temporary compiler- generated assembly file should be written, but the tiarmclang compiler does not provide this capability. The tiarmclang compiler’s -S option instructs the compiler to write the compiler-generated assembly file to the current working directory and then stop the compiler before actually assembling the file into an object file.

The tiarmclang compiler’s -save-temps option keeps all temporary files generated during compilation and linking without halting either the compiler or the linker. The typical temporary files that are generated during compilation and linking include: an intermediate file (.i extension), a bitcode intermediate file (non-readable with .bc extension), a compiler-generated assembly file (.s extension), and an object file generated from the tiarmclang assembler (.o extension).

armcl Option (and alias)

tiarmclang Option

--list_directory=<dir> (-ff)

not supported

The armcl tools support the capability to generate an assembly listing file, which displays the encoded object code alongside the assembly language source that was either generated by the compiler or was provided in an assembly language source file. The armcl’s --list_directory option allows you to indicate where to write the assembly listing file during the compilation.

The tiarmclang compiler does not provide the analogous capability to generate an assembly listing file. Thus, there is no need for an option to direct where an assembly listing file is to be written.

armcl Option (and alias)

tiarmclang Option

--obj_directory=<dir> (-fr)

-c -save-temps

The armcl compiler allows you to indicate where a temporary assembler- generated object file should be written, but the tiarmclang compiler does not provide this capability. The tiarmclang compiler’s -c option instructs the compiler to write the compiler-generated object file to the current working directory and then stop the compiler before actually linking the file into an application.

The tiarmclang compiler’s -save-temps option keeps all temporary files generated during compilation and linking without halting either the compiler or the linker. The typical temporary files that are generated during compilation and linking include: an intermediate file (.i extension), a bitcode intermediate file (non-readable with .bc extension), a compiler-generated assembly file (.s extension), and an object file generated from the tiarmclang assembler (.o extension).

armcl Option (and alias)

tiarmclang Option

--output_file=<file> (-o)

-o <file>

Both the armcl and tiarmclang compilers support a -o option, which allows you to specify the name and location of the linked output file.

armcl Option

tiarmclang Option

--pp_directory=<dir>

-E

The armcl compiler supports generating a pre-processor file that is emitted after the parser portion of the compiler completes processing of all pre-processing directives (using the -ppo option, for example). The armcl’s --pp_directory option allows you to specify where to write the pre-processor file (.pp extension) during a given compilation.

Whereas the armcl compiler can be made to generate a pre-processor file with a .pp extension, the tiarmclang compiler supports the -E option, which writes the pre-processor output to stdout. You can direct tiarmclang’s pre-processor output to a file using the appropriate UNIX or MS-DOS “pipe” command notation.

armcl Option (and alias)

tiarmclang Option

--temp_directory=<dir> (-ft)

not supported

The armcl compiler provides the --temp_directory option to allow you to specify an alternate directory (from the current work directory) where temporary files are to be written.

The tiarmclang compiler writes temporary files to the current working directory (where tiarmclang is invoked from). Normally, temporary files are automatically removed during the compilation process when the compiler no longer needs a given temporary file, but you can keep all of the temporary files generated during a given compilation by specifying tiarmclang’s -save-temps option. The tiarmclang compiler does not provide an option to write temporary files to an alternate directory.