Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CompileCommand = &cli.Command{ Name: "compile", Aliases: []string{"c"}, Usage: "gecko compile ...sources", Description: compileHelp, Action: func(ctx *cli.Context) error { if ctx.Args().Len() == 0 { println("No sources provided") return nil } for _, pos := range ctx.Args().Slice() { outFile := compiler.Compile(pos, &config.CompileCfg{ Arch: ctx.String("target-arch"), Platform: ctx.String("target-platform"), Vendor: ctx.String("target-vendor"), CFlags: []string{}, CLFlags: []string{}, CObjects: []string{}, Ctx: ctx, }) if outFile != "" { CopyFile(outFile, pos+".o") } } compiler.PrintErrorSummary() return nil }, Flags: []cli.Flag{ &cli.StringFlag{ Name: "output-dir", Value: ".", Usage: "Output directory path " + color.HiYellowString("(warning: this overrides the build configuration's output directory)"), }, &cli.StringFlag{ Name: "type", Value: "executable", Usage: "Output type for program. (executable | library)", }, &cli.StringFlag{ Name: "backend", Value: "llvm", Usage: "The compilation backend to use (llvm | c)", }, &cli.StringFlag{ Name: "target-arch", Value: runtime.GOARCH, Usage: "The compilation target architecture", }, &cli.StringFlag{ Name: "target-platform", Value: runtime.GOOS, Usage: "The compilation target operating system", }, &cli.StringFlag{ Name: "target-vendor", Value: "", Usage: "The compilation target vendor of file type", }, &cli.BoolFlag{ Name: "print-ir", Value: false, Usage: "Print the file's LLVM IR", }, &cli.BoolFlag{ Name: "ir-only", Value: false, Usage: "Only compile to IR", }, &cli.StringSliceFlag{ Name: "llc-args", Value: &cli.StringSlice{}, Usage: "Pass arguments to underlying llc command", }, }, }
View Source
var GeckoCommands = []*cli.Command{ CompileCommand, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.