What parameters should be added to the make command when compiling TiDB source code to get tidb-server-debug?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 问下 TiDB源码编译make加什么参数才有 tidb-server-debug

| username: wangbincmss

Seeing the TiDB source code Makefile, there is

server_debug:
ifeq ($(TARGET), “”)
CGO_ENABLED=1 $(GOBUILD) -gcflags=“all=-N -l” $(RACE_FLAG) -ldflags ‘$(LDFLAGS) $(CHECK_FLAG)’ -o bin/tidb-server-debug ./cmd/tidb-server
else
CGO_ENABLED=1 $(GOBUILD) -gcflags=“all=-N -l” $(RACE_FLAG) -ldflags ‘$(LDFLAGS) $(CHECK_FLAG)’ -o ‘$(TARGET)’ ./cmd/tidb-server
endif

What parameters should be added to make compilation to get tidb-server-debug

| username: wangbincmss | Original post link

make server_debug

| username: ShawnYan | Original post link

:+1: Everything is in the source code.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.