Compiler uses a default optimization level when unconfigured
This commit is contained in:
parent
a418baa113
commit
04420cb7d3
@ -94,11 +94,14 @@ func (this *Compiler) CompileIRModule (module *llvm.Module, filetype string) err
|
|||||||
// - clang
|
// - clang
|
||||||
// If none were found, it returns an error.
|
// If none were found, it returns an error.
|
||||||
func (this *Compiler) FindBackend (filetype string) (string, []string, error) {
|
func (this *Compiler) FindBackend (filetype string) (string, []string, error) {
|
||||||
|
optimization := "0"
|
||||||
|
if this.Optimization != "" { optimization = this.Optimization }
|
||||||
|
|
||||||
llcArgs := []string {
|
llcArgs := []string {
|
||||||
"-",
|
"-",
|
||||||
fmt.Sprintf("-filetype=%s", filetype),
|
fmt.Sprintf("-filetype=%s", filetype),
|
||||||
"-o", this.Output,
|
"-o", this.Output,
|
||||||
fmt.Sprintf("-O=%s", this.Optimization),
|
fmt.Sprintf("-O=%s", optimization),
|
||||||
}
|
}
|
||||||
|
|
||||||
// attempt to use llc command
|
// attempt to use llc command
|
||||||
|
Loading…
Reference in New Issue
Block a user