Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/link: using lld linker fails on Windows #39326

Open
Keithcat1 opened this issue May 30, 2020 · 0 comments
Open

cmd/link: using lld linker fails on Windows #39326

Keithcat1 opened this issue May 30, 2020 · 0 comments
Labels
Milestone

Comments

@Keithcat1
Copy link

@Keithcat1 Keithcat1 commented May 30, 2020

after the following commands:
set CGO_LDFLAGS=-fuse-ld=lld
go build

I get this error:

command-line-arguments

C:\go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
lld: error: unknown argument: -T
collect2.exe: error: ld returned 1 exit status
The argument which is causing this is :
-Wl,-T,C:\Users\Keith\AppData\Local\Temp\go-link-100899651\fix_debug_gdb_scripts.ld
I found a way to remove this one argument, but the resulting executable crashes when I start it.

@ianlancetaylor ianlancetaylor changed the title LLD linker doesn't work on windows cmd/link: using lld linker fails on Windows May 30, 2020
@ianlancetaylor ianlancetaylor added this to the Go1.16 milestone May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.