# Derleme (Build) Detayını Görme

Golang’de normalde derleme işlemini yapmak için go build komutunu kullanırız. Bu komut terminal ekranından bize sadece bir hata olduğunda bilgi verir. Hata yoksa çalıştırılabilir dosyayı zaten oluşturur.\
&#x20;

**Peki programımızın derlenme esnasında bilgilendirmeyi nasıl görebiliriz?**

İşte aşağıdaki gibi:

> go build -gcflags=-m main.go

Yani build’e ek parametre olarak **-gcflags=-m** yazıyoruz. Nasıl gözüktüğünü örnek olarak görelim.

```go
package main
import (
    "fmt"
    "os"
)
func main() {
        fmt.Println("Merhaba")
    fmt.Println(topla(2,2))
    os.Exit(0)
}
func topla(x,y int) int{
    return x + y
}
```

Yukarıdaki kodumuzun derleme çıktısı şöyle olacaktır.

> command-line-arguments\
> ./main.go:13:6: can inline topla\
> ./main.go:9:13: inlining call to fmt.Println\
> ./main.go:10:22: inlining call to topla\
> ./main.go:10:16: inlining call to fmt.Println\
> ./main.go:9:14: "Merhaba" escapes to heap\
> ./main.go:9:13: io.Writer(os.Stdout) escapes to heap\
> ./main.go:10:16: io.Writer(os.Stdout) escapes to heap\
> ./main.go:10:22: topla(2, 2) escapes to heap\
> ./main.go:9:13: main \[]interface {} literal does not escape\
> ./main.go:10:16: main \[]interface {} literal does not escape\
> :1: os.(\*File).close .this does not escape


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://go.kaanksc.com/pratik-bilgiler/derleme-build-detayini-goerme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
