!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

220 Members
70 Servers

Load older messages


SenderMessageTime
11 Nov 2024
@emilazy:matrix.orgemily
In reply to @reckenrode:matrix.org
Why would ld64 need patching? There’s nothing wrong with it.
well, since it would mean fewer things changing depending on stdenv.targetPlatform.
22:13:49
@emilazy:matrix.orgemilybut it might not be the right place. probably the wrapper is a better idea. (but then adjusting the target platform would still result in rebuilds, right?)22:14:05
@emilazy:matrix.orgemily (really need targetPlatform = null…) 22:14:31
@reckenrode:matrix.orgRandy Eckenrode

I have two main concerns:

  1. Darwin is not forced to be like other platforms for the sake of convenience. We’re finally undoing a lot of that after the refactor; and
  2. Darwin tooling is not hacked up to work around number 1.
22:15:53
@emilazy:matrix.orgemily I think it's more about a general principle that targetPlatform differences should not cause rebuilds of things that don't care about targetPlatform 22:16:49
@emilazy:matrix.orgemily whereas currently targetPlatform being Darwin or not rebuilds the world 22:16:59
@emilazy:matrix.orgemily in an ideal world the unwrapped LLVM derivation wouldn't even be able to look at targetPlatform, e.g. 22:17:28
@emilazy:matrix.orgemily currently, rg 'targetPlatform\.is' pkgs/stdenv is two Darwins and two ghcjses 22:18:36
@emilazy:matrix.orgemily (one of the Darwins is harmless, just making makeStaticBinaries throw) 22:18:57
@emilazy:matrix.orgemily(and the ghcjs mentions also look harmless)22:19:12
@reckenrode:matrix.orgRandy EckenrodeSo if we can move this to the wrapper, that seems fine.22:21:14
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
whereas currently targetPlatform being Darwin or not rebuilds the world
That seems to be a Nix problem where any change in puts cause rebuilds even when they don’t matter.
22:21:34
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
whereas currently targetPlatform being Darwin or not rebuilds the world
*
22:22:05
@reckenrode:matrix.orgRandy EckenrodeBut anyway, to solve the problem at hand, if we can move it somewhere else to avoid the rebuilds, that’s fine.22:22:19
@emilazy:matrix.orgemily it seems like the wrapper would still cause rebuilds because ld-wrapper is used to build clang-unwrapped, etc., but maybe I don't fully understand the rebuild issue 22:23:28
@emilazy:matrix.orgemily
In reply to @reckenrode:matrix.org
That seems to be a Nix problem where any change in inputs cause rebuilds even when they don’t matter.
a problem that the solution to breaks Darwin in other ways…
22:23:49
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
it seems like the wrapper would still cause rebuilds because ld-wrapper is used to build clang-unwrapped, etc., but maybe I don't fully understand the rebuild issue
If you’re using a different linker, I’d expect clang-unwrapped to be rebuilt. There’s no avoiding that.
22:24:29
@emilazy:matrix.orgemilywell, the linker wouldn't matter, since it's only for the target platform22:25:52
@emilazy:matrix.orgemilybut hm22:25:54
@emilazy:matrix.orgemily is ld-wrapper different for the target linker vs. the host one? 22:26:12
@emilazy:matrix.orgemilyI guess it must be?22:26:14
@emilazy:matrix.orgemilyin which case yeah I guess we can move it in there.22:26:20
@reckenrode:matrix.orgRandy EckenrodeOf course it is. It references the absolute path to the host linker.22:27:08
@reckenrode:matrix.orgRandy Eckenrode * 22:28:46
@emilazy:matrix.orgemily do you just reference stdenv.hostPlatform.isDarwin in the ld-wrapper derivation and it means stdenv.targetPlatform.isDarwin when you put it in pkgsBuildTarget? 22:29:29
@reckenrode:matrix.orgRandy Eckenrode

Hmm. Would it be disgustingly hacky to set NIX_DONT_SET_RPATH_aarch64_apple_darwin=1 and NIX_DONT_SET_RPATH_x86_64_apple_darwin=1unconditionally?

23:08:53
@reckenrode:matrix.orgRandy Eckenrode *

Hmm. Would it be disgustingly hacky to set NIX_DONT_SET_RPATH_aarch64_apple_darwin=1 and NIX_DONT_SET_RPATH_x86_64_apple_darwin=1 unconditionally?

23:08:59
@reckenrode:matrix.orgRandy Eckenrode

(I’m guessing yes.)

23:09:14
@reckenrode:matrix.orgRandy Eckenrode

I guess just revert the commit that set NIX_DONT_SET_RPATH_FOR_TARGET for now.

23:11:10
@reckenrode:matrix.orgRandy Eckenrode

I wonder if NIX_DONT_SET_RPATH should be set in a hook that properly does role mangling.

23:11:35

Show newer messages


Back to Room ListRoom Version: 9