Skip to content

llvmPackages.bintools: fix copy'n'paste mistake for strip#345691

Closed
blitz wants to merge 1 commit intoNixOS:stagingfrom
blitz:stdenv-strip
Closed

llvmPackages.bintools: fix copy'n'paste mistake for strip#345691
blitz wants to merge 1 commit intoNixOS:stagingfrom
blitz:stdenv-strip

Conversation

@blitz
Copy link
Contributor

@blitz blitz commented Oct 1, 2024

strip has been linked to llvm-objcopy instead of llvm-strip. This looks like a copy'n'paste error that worked by accident, because the underlying binary is a multi-call binary and does the right thing. Let's not rely on this and fix the link instead.

I don't really have the compute to test this, so I'd be grateful if someone can do a nixpkgs-review round on this!

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

strip has been linked to llvm-objcopy instead of llvm-strip. This
looks like a copy'n'paste error that worked by accident, because the
underlying binary is a multi-call binary and does the right thing.
Let's not rely on this and fix the link instead.
@github-actions github-actions bot added the 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related label Oct 1, 2024
@alyssais
Copy link
Member

alyssais commented Oct 1, 2024

Looking at the original commit, this was actually on purpose. strip is explicitly mentioned. 3d1e039

I think the reasoning there actually still makes sense — it's best to mirror the behaviour of LLVM_INSTALL_BINUTILS_SYMLINKS, because that's going to be the easiest way to keep it up to date in future, and there's no point forcing a double symlink resolution, so I think we should keep it as it is.

@blitz
Copy link
Contributor Author

blitz commented Oct 1, 2024

Looking at the original commit, this was actually on purpose. strip is explicitly mentioned. 3d1e039

I think the reasoning there actually still makes sense — it's best to mirror the behaviour of LLVM_INSTALL_BINUTILS_SYMLINKS, because that's going to be the easiest way to keep it up to date in future, and there's no point forcing a double symlink resolution, so I think we should keep it as it is.

Fair point. For that it would have been good to leave a comment in the code, to make it obvious that this is intended behavior. But I guess it's not worth the huge rebuild just to add one.

@blitz blitz closed this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants