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

fix: make zig cc pass -l/-L like Clang/GCC for ELF #19818

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Jun 4, 2024

  1. fix: make zig cc pass -l/-L like Clang/GCC for ELF

    This commit makes the way `zig cc` passes `-l/-L` flags for ELF linking
    consistent with Clang and GCC.
    
    Closes ziglang#19699
    a-khabarov committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    97debb0 View commit details
    Browse the repository at this point in the history
  2. Allow configuring compile steps to omit SONAME

    We need this to add a test case to `test/link/elf.zig` for checking
    `-l`/`-L` behavior compatibility with Clang/GCC for ELF.
    a-khabarov committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    2893fac View commit details
    Browse the repository at this point in the history
  3. Allow setting library paths directly for compile steps

    `LibraryPath` is implemented by analogy with `RPath`.
    
    We need this to add a test case to `test/link/elf.zig` for checking
    `-l`/`-L` behavior compatibility with Clang/GCC for ELF.
    a-khabarov committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    6881032 View commit details
    Browse the repository at this point in the history
  4. Allow setting working directory for compile steps

    Current working directory affects the linking behavior when `-L` is a
    relative path.
    
    We need this to add a test case to `test/link/elf.zig` for checking
    `-l`/`-L` behavior compatibility with Clang/GCC for ELF.
    a-khabarov committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    46dd784 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8d5fc36 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b4dcd83 View commit details
    Browse the repository at this point in the history