Skip to content

runtime/race: eliminate dependency on libc #9918

@dvyukov

Description

@dvyukov

Race runtime currently depends on libc:

with CGO_ENABLED=0:
runtime/race(.text): __libc_malloc: not defined
runtime/race(.text): getuid: not defined
runtime/race(.text): pthread_self: not defined
...

This has several negative effects:

  • don't work with CGO_ENABLED=0
  • there is circular dependency between runtime/race and cmd/cgo
  • cross-compilation is close to impossible
  • external linkage is required

If we eliminate all libc dependencies from race runtime, all these problems go away.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions