linker

package
v0.3.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LinkDDPFiles

func LinkDDPFiles(options Options) ([]byte, error)

link the given input file (a .o file compiled from ddp-source-code) with the given dependencies and flags to the ddpruntime, stdlib and ddp_list_types_defs into a executable

Types

type Options

type Options struct {
	// input and output file paths
	// InputFile should be a .o file compiled from ddp-source-code
	InputFile, OutputFile string
	// the external dependencies of the InputFile
	// in the form of a compiler result
	// may be nil for no dependencies
	Dependencies *compiler.Result
	// optional Log function to print intermediate messages
	Log func(string, ...any)
	// wether or not to delete temporary files
	DeleteIntermediateFiles bool
	// flags for the final gcc call
	GCCFlags string
	// the .o file containing main(argc, argv)
	// if this is not set, the linker will use the default main
	MainFile string
	// flags passed to external .c files
	// for example to specify include directories
	ExternGCCFlags string
	// wether the inbuilt list-defs need to be linked in
	LinkInListDefs bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL