Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mingw: alter linker commands to always replace backslashes with forward slashes #361

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

chris-se
Copy link
Contributor

@chris-se chris-se commented Feb 8, 2024

Proposed changes

gcc (mingw) is perfectly fine being invoked with Windows paths that contain backslashes as the directory separator, but this holds only true for arguments that are specified as part of the command line. If due to the Windows command line size limit b2 decides to use a response file, gcc will only accept forward slashes as the directory separator. The current linker rules in gcc.jam (link and link.dll) don't have the corresponding :T modifiers at the place of the linker targets. This change adds the missing ones.

This is similar to the fix in #352, but for dynamic libraries and executables.

This actually the correct fix for #342, because the ar fix didn't actually fix that case, due to that fix affecting a different rule. (That was still required in other cases.)

Types of changes

What types of changes does your code introduce?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes
  • Other (please describe):

Checklist

  • I searched the discussions
  • I searched the closed and open issues
  • I read the contribution guidelines
  • I added myself to the copyright attributions for significant changes
  • I checked that tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • I added necessary documentation (if appropriate)

…rd slashes

 * src/tools/gcc.jam:
     Add missing :T for target file paths in linker invocation rules.
     This fixes builds when b2 uses a response file instead of the
     command line after a size limit is reached.
@grafikrobot grafikrobot merged commit 58da9d0 into bfgroup:main Mar 8, 2024
135 of 137 checks passed
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