Open
Conversation
There was a problem hiding this comment.
Pull request overview
Improves RuSTy’s linker invocation and configuration to support linking by exact library filenames or full paths, and adds new CLI switches for controlling linker/driver behavior while updating docs and tests accordingly.
Changes:
- Added
libraries.link_pathsupport inplc.jsonand documented/link-tested linking via exact filenames and full paths. - Introduced new linker-related CLI flags (
--fuse-ld,--linker-arg,--nocrt,--nolibc) and propagated them through the driver pipeline. - Refactored internal/external linker resolution and expanded test coverage + documentation.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/linking.rs | Adjusts integration tests to use --nocrt with updated linker behavior. |
| tests/integration/external_files.rs | Adds --nocrt to static compilation integration test path. |
| tests/integration/data/json/build_with_link_path.json | New build-config fixture demonstrating libraries.link_path. |
| tests/integration/command_line_compile.rs | Adds --nocrt to a CLI integration test invocation. |
| tests/integration/build_description_tests.rs | Adds integration test that exercises link_path through plc build. |
| src/linker.rs | Major linker resolution refactor; adds driver-mode features and full-path -l handling. |
| compiler/plc_project/src/project.rs | Resolves link_path to an actual file and uses it for link name. |
| compiler/plc_project/src/build_config.rs | Adds link_path to LibraryConfig and parsing test. |
| compiler/plc_project/schema/plc-json.schema | Extends JSON schema with link_path. |
| compiler/plc_driver/src/pipelines.rs | Wires new linker options (fuse_linker, args, nocrt, nolibc) into link step. |
| compiler/plc_driver/src/main.rs | Initializes logging based on parsed CLI log-level flags. |
| compiler/plc_driver/src/lib.rs | Extends LinkOptions with new linker-control fields. |
| compiler/plc_driver/src/cli.rs | Adds log-level flags and new linker-control flags + CLI tests. |
| book/src/using_rusty/build_configuration.md | Documents libraries.link_path and additional linker options for build. |
| book/src/using_rusty.md | Documents new CLI linker flags and enriched -l behavior. |
| book/src/libraries.md | Documents exact-filename and full-path -l forms; updates build-config terminology. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
the linker changes were accidentally merged by another PR (as a dependency) this performs some cleanups that were intended to land with the new linker flags
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.
This PR applies some small cosmetic fixes and addresses a review comment for the recent linker changes.
The linker changes were accidentally commited in another PR before they were approved.