class Savi::Compiler::BinaryObject

Overview

The purpose of the BinaryObject pass is to produce a binary object of the program, ready to be linked to create a binary executable.

This pass would usually only be used for troubleshooting or cross-compiling.

This pass does not mutate the Program topology. This pass does not mutate the AST. This pass does not raise any compilation errors. This pass keeps temporary state (on the stack) at the program level. This pass produces no output state (aside from the side effect below). !! This pass has the side-effect of writing files to disk.

Defined in:

savi/compiler/binary_object.cr

Constant Summary

DEFAULT_RUNTIME_PATH = File.expand_path("../../lib/libsavi_runtime", Process.executable_path.not_nil!)

Class Method Summary

Class Method Detail

def self.each_sysroot_include_path(ctx, target, &) #

[View source]
def self.get_default_clang_flags(ctx, language) #

[View source]
def self.invoke_clang_compiler(ctx, target, language, c_file_path) : LLVM::Module #

[View source]
def self.mark_module_functions_as_private(mod : LLVM::Module) #

[View source]
def self.mark_runtime_asserts_as_unreachable(mod : LLVM::Module) #

[View source]
def self.run(ctx) #

[View source]
def self.runtime_bc_path(target) : String #

[View source]
def self.runtime_bc_triple(target) : String #

[View source]