class Savi::Compiler::Binary
- Savi::Compiler::Binary
- Reference
- Object
Overview
The purpose of the Binary pass is to produce a binary executable of the program, using LLVM and clang tooling and writing the result to disk.
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.crClass Method Summary
Instance Method Summary
-
#dynamic_linker_for_linux_or_bsd(target) : String
Get the path to the dynamic linker library for a Linux or FreeBSD target.
- #each_explicit_lib_path(ctx, &)
-
#each_sysroot_lib_glob(ctx, target, &)
Yield each sysroot-based glob used to find paths that exist.
-
#each_sysroot_lib_path(ctx, target, &)
Yield each sysroot-based path in which to search for linkable libs/objs.
-
#find_in_paths(paths, file_name) : String
Given a prioritized list of search paths and a file name, find the file.
- #invoke_linker(flavor, link_args)
-
#link_for_linux_or_bsd(ctx, target, obj_path, bin_path)
Link an ELF executable for a Linux or FreeBSD target.
-
#link_for_macosx(ctx, target, obj_path, bin_path)
Link a MachO executable for a MacOSX target.
-
#link_for_windows(ctx, target, obj_path, bin_path)
Link a EXE executable for a Windows target.
- #maybe_find_in_paths(paths, file_name) : String | Nil
- #run(ctx)
Class Method Detail
Instance Method Detail
Get the path to the dynamic linker library for a Linux or FreeBSD target.
Yield each sysroot-based glob used to find paths that exist.
Yield each sysroot-based path in which to search for linkable libs/objs.
Given a prioritized list of search paths and a file name, find the file. Raises an error if the file couldn't be found in any of the paths
Link an ELF executable for a Linux or FreeBSD target.