Skip to content

test: clean up linker tests#1636

Open
ghaith wants to merge 1 commit intomasterfrom
linker_fixes
Open

test: clean up linker tests#1636
ghaith wants to merge 1 commit intomasterfrom
linker_fixes

Conversation

@ghaith
Copy link
Copy Markdown
Collaborator

@ghaith ghaith commented Mar 17, 2026

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.

@ghaith ghaith requested a review from Copilot March 18, 2026 13:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_path support in plc.json and 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.

@ghaith ghaith added the 1.0 This PR/Issue is required before we reach feature completion label Apr 2, 2026
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
@ghaith ghaith changed the title feat: clean up linker flags and add support for libraries using a full path test: clean up linker tests Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.0 This PR/Issue is required before we reach feature completion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants