Skip to content

Conversation

@LanzaSchneider
Copy link
Contributor

Issue

On macOS, the order of -framework flags in LINKFLAGS can vary between builds due to the use of unordered data structures for extra_frameworks. This causes the flags string generated from the SCons environment to change on every build invocation, even when there are no actual configuration changes.

For module developers using external build systems (like Rake) that consume these flags, this results in:

  • Unnecessary regeneration of external build configuration files
  • Loss of incremental build capabilities for the external system
  • Longer iteration times
图片 图片

Solution

Sort the extra_frameworks list before generating the framework linker flags to ensure a deterministic order.

# Before
frameworks = [item for key in extra_frameworks for item in ["-framework", key]]

# After
frameworks = [item for key in sorted(extra_frameworks) for item in ["-framework", key]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants