Repository navigation
Compiler Option Gen
Home › Compiler Option: -gen
Sets the backend code emitter.
Syntax
-gen < backend >
Parameters
backend
gas for x86 GAS assembly, gcc for GNU C, gas64 for x86_64 GAS assembly, clang for clang, llvm for LLVM IR.
Description
The -gen compiler option sets the backend code emitter and assembler. If this option is not specified, the default is -gen gas for x86 and -gen gcc for x86_64.
-gen gas
The compiler will emit GAS assembler code to a .asm file which will then be compiled to an object file using 'as'. This is the compiler's original x86 code generation backend.
-gen gas64
The compiler will emit GAS assembler code (64-bit) to a .asm file which will then be compiled to an object file using 'as'.
-gen gcc
The compiler will emit C code to a .c file which will then be compiled to an .asm file using 'gcc' as a high level assembler. The C backend is intended to make FB portable to more platforms than just x86. This requires gcc to be installed so that the compiler can invoke it to compile the C code, also see Installing gcc for -gen gcc.
-gen clang
The compiler will emit C code to a .c file which will then be compiled to an .asm file using 'clang' as a high level assembler.
-gen llvm
The compiler will emit LLVM IR code to a .ll file which will then be compiled to an .asm file using 'llc'. The LLVM backend is still a work in progress. It is intended for the same purpose as the C backend, and could theoretically solve some of the C backend's problems, such as debugging meta data support.
See also
Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.
tiko-lang · Home · Feature Index · Keyword Index · License
FreeBASIC manual pages reproduced under the GNU FDL 1.3.
- Generics
- Interfaces
- For Each
- Iterators
- Tuples
- Array Results
- Defer
- Lambdas
- Block Strings
- String Slices
- Embed
- Typed Variadics
- C Header Import
- Foreign Library Linking
- UString
- Fixed-Width Types
- Nullptr
- String Library
- Format
- Array
- Map
- Set
- LinkedList
- OrderedMap
- OrderedSet
- Sorting
- Optional
- Result
- Smart Pointers
- Date and Time (Chrono)
- Filesystem
- File Streams
- Config (INI and TOML)
- Codec
- Hash
- UUID
- OS
- Process
- Net
- HTTP and TLS
- Math Library
- Finance
- Logging
- Terminal TUI Library
- PsControls
- tkControls
- sys/win
- Goroutines and Channels
- LLVM Backend
- tiko build
- TIKO_COMPILER
- Variable Declarations
- Standard Data Types
- User Defined Types
- Procedures
- Operators
- Control Flow Statements
- Converting Data Types
- Array Functions
- String Functions
- Mathematical Functions
- Bit Manipulation
- Date and Time Functions
- File I/O Functions
- Console Functions
- User Input (Runtime Library)
- User Input Functions (Graphics Library)
- Screen Functions
- 2D Drawing Functions
- Graphics Library Reference
- Graphics Keyword List
- Memory Functions
- Threading Support Functions
- Error Handling Functions
- Operating System Functions
- Preprocessor
- Intrinsic Defines
- Miscellaneous Keywords
- Modularizing