mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 06:53:40 +00:00
compiler: act as a compiler driver (on unix systems)
As a final step, link the object file with the system compiler/linker. TODO: cross compiling.
This commit is contained in:
+1
-1
@@ -92,7 +92,7 @@ func NewCompiler(pkgName, triple string, dumpSSA bool) (*Compiler, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.machine = target.CreateTargetMachine(triple, "", "", llvm.CodeGenLevelDefault, llvm.RelocDefault, llvm.CodeModelDefault)
|
||||
c.machine = target.CreateTargetMachine(triple, "", "", llvm.CodeGenLevelDefault, llvm.RelocPIC, llvm.CodeModelDefault)
|
||||
c.targetData = c.machine.CreateTargetData()
|
||||
|
||||
c.mod = llvm.NewModule(pkgName)
|
||||
|
||||
Reference in New Issue
Block a user