makeBinaryWrapper: add comment

This commit is contained in:
Naïm Favier 2022-05-12 15:23:38 +02:00
parent 3c77d361b5
commit 3e385d9a82
No known key found for this signature in database
GPG Key ID: 49B07322580B7EE2
2 changed files with 3 additions and 3 deletions

View File

@ -15,9 +15,7 @@ makeSetupHook {
++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) darwin.cctools; ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) darwin.cctools;
substitutions = { substitutions = {
cc = let cc = "${cc}/bin/cc ${lib.escapeShellArgs (map (s: "-fsanitize=${s}") sanitizers)}";
san = lib.escapeShellArgs (map (s: "-fsanitize=${s}") sanitizers);
in "${cc}/bin/cc ${san}";
# Extract the function call used to create a binary wrapper from its embedded docstring # Extract the function call used to create a binary wrapper from its embedded docstring
passthru.extractCmd = writeShellScript "extract-binary-wrapper-cmd" '' passthru.extractCmd = writeShellScript "extract-binary-wrapper-cmd" ''

View File

@ -74,6 +74,8 @@ with pkgs;
makeWrapper = callPackage ./make-wrapper { }; makeWrapper = callPackage ./make-wrapper { };
makeBinaryWrapper = callPackage ./make-binary-wrapper { makeBinaryWrapper = callPackage ./make-binary-wrapper {
makeBinaryWrapper = pkgs.makeBinaryWrapper.override { makeBinaryWrapper = pkgs.makeBinaryWrapper.override {
# Enable sanitizers in the tests only, to avoid the performance cost in regular usage.
# The sanitizers cause errors on aarch64-darwin, see https://github.com/NixOS/nixpkgs/pull/150079#issuecomment-994132734
sanitizers = pkgs.lib.optionals (! (pkgs.stdenv.isDarwin && pkgs.stdenv.isAarch64)) sanitizers = pkgs.lib.optionals (! (pkgs.stdenv.isDarwin && pkgs.stdenv.isAarch64))
[ "undefined" "address" ]; [ "undefined" "address" ];
}; };