Skip to content

Unbreak fbclock's Go build under clang 21 (#581) - #581

Open
leoleovich wants to merge 1 commit into
facebook:mainfrom
leoleovich:export-D120272839
Open

leoleovich wants to merge 1 commit into
facebook:mainfrom
leoleovich:export-D120272839

Conversation

@leoleovich

@leoleovich leoleovich commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary:

buck2 test //time/fbclock/... does not build on master: fbclock's Go tests, daemon and sidecar are all unbuildable.

cgo: fbclock.go:72:13: unexpected type: (unsupported type AtomicType)

Clang 21 emits DW_TAG_atomic_type where clang 19 folded the atomic into its base integer. cgo reads DWARF, and Go's debug/dwarf cannot model that tag, so every struct reachable from fbclock_lib fails to convert.

Go never touches seq or crc, so only the cgo preamble now sees the plain base type. fbclock.c keeps the real atomics and static_asserts that the layout matches.

Sentinel-Council-Run: council_1789520658_fbd80dac
Sentinel-Council-Run: council_1789531426_e0c09b3e
Sentinel-Council-Run: council_1789538610_83d8818c
Sentinel-Harness: claude

Modify your team agent prompt, check stats, and leave feedback: https://www.internalfb.com/sentinel_agent/rotations/clock
Model used: Claude Opus 5 (claude-opus-5[1m])

Differential Revision: D120272839

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 16, 2026
@meta-codesync

meta-codesync Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@leoleovich has exported this pull request. If you are a Meta employee, you can view the originating Diff in D120272839.

Summary:

`buck2 test //time/fbclock/...` does not build on master: fbclock's Go tests, daemon and sidecar are all unbuildable.

    cgo: fbclock.go:72:13: unexpected type: (unsupported type AtomicType)

Clang 21 emits `DW_TAG_atomic_type` where clang 19 folded the atomic into its base integer. cgo reads DWARF, and Go's `debug/dwarf` cannot model that tag, so every struct reachable from `fbclock_lib` fails to convert.

Go never touches `seq` or `crc`, so only the cgo preamble now sees the plain base type. `fbclock.c` keeps the real atomics and static_asserts that the layout matches.

Sentinel-Council-Run: council_1789520658_fbd80dac
Sentinel-Council-Run: council_1789531426_e0c09b3e
Sentinel-Council-Run: council_1789538610_83d8818c
Sentinel-Harness: claude

*Modify your team agent prompt, check stats, and leave feedback: https://www.internalfb.com/sentinel_agent/rotations/clock*
Model used: Claude Opus 5 (claude-opus-5[1m])

Differential Revision: D120272839
@meta-codesync meta-codesync Bot changed the title Unbreak fbclock's Go build under clang 21 Unbreak fbclock's Go build under clang 21 (#581) Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant