Skip to content

Conversation

@etcwilde
Copy link
Member

@etcwilde etcwilde commented Dec 3, 2025

Fixing sources used to build synchronization library. This aligns the synchronization source list with what is posted in the old build system.

set(SWIFT_SYNCHRONIZATION_DARWIN_SOURCES
  Mutex/DarwinImpl.swift
  Mutex/Mutex.swift
)
set(SWIFT_SYNCHRONIZATION_LINUX_SOURCES
  Mutex/LinuxImpl.swift
  Mutex/Mutex.swift
  Mutex/SpinLoopHint.swift
)
set(SWIFT_SYNCHRONIZATION_FREEBSD_SOURCES
  Mutex/FreeBSDImpl.swift
  Mutex/Mutex.swift
)
set(SWIFT_SYNCHRONIZATION_WASM_SOURCES
  Mutex/Mutex.swift
  Mutex/WasmImpl.swift
)
set(SWIFT_SYNCHRONIZATION_WINDOWS_SOURCES
  Mutex/Mutex.swift
  Mutex/WindowsImpl.swift
)
set(SWIFT_SYNCHRONIZATION_OPENBSD_SOURCES
  Mutex/Mutex.swift
  Mutex/OpenBSDImpl.swift
)

This is specifically to fix this error when building for Linux:

/build/swift/Runtimes/Supplemental/Synchronization/Mutex/LinuxImpl.swift:99:19: error: cannot find '_tries' in scope
 97 |       // This value is controlled on a per architecture bases defined in
 98 |       // 'SpinLoopHint.swift'.
 99 |       var tries = _tries
    |                   `- error: cannot find '_tries' in scope
100 |
101 |       repeat {

/build/swift/Runtimes/Supplemental/Synchronization/Mutex/LinuxImpl.swift:126:9: error: cannot find '_spinLoopHint' in scope
124 |         // effect of slowing down this loop if only by a little to preserve
125 |         // energy.
126 |         _spinLoopHint()
    |         `- error: cannot find '_spinLoopHint' in scope
127 |       } while tries != 0
128 |     }
ninja: build stopped: subcommand failed.

Fixing sources used to build synchronization library. This aligns the
synchronization source list with what is posted in the old build system.

```
set(SWIFT_SYNCHRONIZATION_DARWIN_SOURCES
  Mutex/DarwinImpl.swift
  Mutex/Mutex.swift
)
set(SWIFT_SYNCHRONIZATION_LINUX_SOURCES
  Mutex/LinuxImpl.swift
  Mutex/Mutex.swift
  Mutex/SpinLoopHint.swift
)
set(SWIFT_SYNCHRONIZATION_FREEBSD_SOURCES
  Mutex/FreeBSDImpl.swift
  Mutex/Mutex.swift
)
set(SWIFT_SYNCHRONIZATION_WASM_SOURCES
  Mutex/Mutex.swift
  Mutex/WasmImpl.swift
)
set(SWIFT_SYNCHRONIZATION_WINDOWS_SOURCES
  Mutex/Mutex.swift
  Mutex/WindowsImpl.swift
)
set(SWIFT_SYNCHRONIZATION_OPENBSD_SOURCES
  Mutex/Mutex.swift
  Mutex/OpenBSDImpl.swift
)
```

This is specifically to fix this error when building for Linux:

```
/build/swift/Runtimes/Supplemental/Synchronization/Mutex/LinuxImpl.swift:99:19: error: cannot find '_tries' in scope
 97 |       // This value is controlled on a per architecture bases defined in
 98 |       // 'SpinLoopHint.swift'.
 99 |       var tries = _tries
    |                   `- error: cannot find '_tries' in scope
100 |
101 |       repeat {

/build/swift/Runtimes/Supplemental/Synchronization/Mutex/LinuxImpl.swift:126:9: error: cannot find '_spinLoopHint' in scope
124 |         // effect of slowing down this loop if only by a little to preserve
125 |         // energy.
126 |         _spinLoopHint()
    |         `- error: cannot find '_spinLoopHint' in scope
127 |       } while tries != 0
128 |     }
ninja: build stopped: subcommand failed.
```
@etcwilde etcwilde changed the title CMake: Synchronization CMake: Synchronization Source Lists Dec 3, 2025
@etcwilde
Copy link
Member Author

etcwilde commented Dec 3, 2025

@swift-ci please smoke test

@etcwilde etcwilde merged commit 968f086 into swiftlang:main Dec 3, 2025
3 checks passed
@etcwilde etcwilde deleted the ewilde/fix-synchronization-sources branch December 3, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants