mirror of
https://github.com/golang/go.git
synced 2026-02-07 02:09:55 +00:00
cmd/link: support race mode with MSVC clang
I couldn't make --print-file-name work with -msvc clang. (The library name is synchronization.lib, but even with that name it still doesn't print the full path.) Assume it always synchronization.lib. Change-Id: I22e8f14824f7f7e96b71b913217b1f604f1e2da7 Reviewed-on: https://go-review.googlesource.com/c/go/+/703398 Reviewed-by: Than McIntosh <thanm@golang.org> Reviewed-by: Florian Zenker <floriank@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
e5ee1f2600
commit
e603e9834e
1 changed files with 5 additions and 1 deletions
|
|
@ -1943,7 +1943,11 @@ func (ctxt *Link) hostlink() {
|
|||
argv = append(argv, "-Wl,-T,"+p)
|
||||
}
|
||||
if *flagRace {
|
||||
if p := ctxt.findLibPath("libsynchronization.a"); p != "libsynchronization.a" {
|
||||
// Apparently --print-file-name doesn't work with -msvc clang.
|
||||
// (The library name is synchronization.lib, but even with that
|
||||
// name it still doesn't print the full path.) Assume it always
|
||||
// it.
|
||||
if isMSVC || ctxt.findLibPath("libsynchronization.a") != "libsynchronization.a" {
|
||||
argv = append(argv, "-lsynchronization")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue