Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dependency-owned shared libraries currently link without their owning package's link group. Libraries and flags declared in that package's build.mcpp can therefore reach the consuming executable but disappear from the DLL link command, causing unresolved symbols or missing delay-load settings.
Assign shared images a link-only group containing their owner's dependency closure and runtime contract. Exclude artifact-only and build-time-only edges and ordinary consumer flags, and reuse the group for multiple shared targets from the same package without scheduling duplicate deployment.
Refresh dependency link snapshots after build scripts for ordinary path dependencies as well as workspace plans. Resolve library search paths against the package that declares them.
Closes #771.
Criteria
SharedLinkUsage.OwnerAndDependencyFlagsReachEverySharedImagefailed before the fix because shared images hadlinkGroup == -1, and passes after it. It covers ordinary and workspace plans, Windows and ELF link emission, two shared targets, owner/dependency flags, consumer isolation, and runtime metadata.880_shared_images_use_their_packages_link_configuration.shfailed before the fix with an unresolved BCryptGenRandom symbol. It passes after the fix for workspace, selected app, selected shared owner, and standalone path-dependency builds on Windows. Its helper also requires userenv and a delay-load flag. Native Linux/macOS execution remains for CI.mcpp test: 146 of 147 test programs pass. The remaining failure isGlob.EscapedSpellingIsUtf8WhateverTheName, which throws a Windows code-page conversion exception. Rebuilding and running test_modgraph with the two modified implementation files restored to origin/main reproduces the same failure. This PR does not change that test or its implementation.Intersections
Compatibility
No manifest or build.mcpp API changes. Previously omitted declared link settings now apply to dependency-owned shared images. Existing object selection, import-library dependencies, export handling and deployment remain in place. No migration is required.
Checks before merging
bash .github/tools/check_docs_style.sh,check_docs_structure.shandcheck_version_pins.shpass.python3 .github/tools/check_workflow_assertions.pypasses.