!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

220 Members
70 Servers

Load older messages


SenderMessageTime
12 Nov 2024
@p14:matrix.orgp14Sorry, headed to bed, but my understanding is that libLLVMgold is only using a well defined interface which should not vary as a function of the target. That said I am not a heavy darwin user and I am afk so can’t look there closely for now.22:32:08
@p14:matrix.orgp14
In reply to @reckenrode:matrix.org

@emilazy:matrix.org Here is comparing the Darwin cross to a Linux cross clang: https://gist.github.com/reckenrode/9d9035cf4f070c271d2499b401078320

I am not exactly clear on what is being diffed in these gists
22:36:36
@emilazy:matrix.orgemily pkgsCross.gnu64.clang-unwrapped vs. pkgsCross.[I forget how you spell x86_64-darwin here].clang-unwrapped on a Darwin host, I think. 22:36:59
@emilazy:matrix.orgemily the issue is that you still condition it on enableGold, which the LLVM derivation sets the default of to withGold stdenv.targetPlatform 22:37:19
@emilazy:matrix.orgemily so the same divergence is present. so probably that should be , enableGold ? true in LLVM. 22:37:30
@p14:matrix.orgp14Ok. Will fix it up over the coming days. Would be helpful to know what the best expressions to test are.22:39:47
@emilazy:matrix.orgemily I think you want a Darwin localSystem (because of the patch conditional) and compare say {Linux, Darwin} × {x86-64, AArch64} for the target 22:41:17
@emilazy:matrix.orgemily the -nostdinc patch will be a pain. it's a hack that we have to skip on Darwin because it doesn't help us and it breaks stuff. but it's a hack that works by patching the command-line parsing 22:41:43
@emilazy:matrix.orgemilyat which point Clang doesn't know what target it'll be yet AIUI22:41:49
@emilazy:matrix.orgemilyso to make the patch unconditional the logic probably has to move deeper into the guts22:42:01
@emilazy:matrix.orgemilyalso, it's kind of bad on Linux too, though hard to see how to easily remove it without regressing the issue with unwrapped compilers22:42:16
@emilazy:matrix.orgemily * I think you want a Darwin hostPlatform (because of the patch conditional) and compare say {Linux, Darwin} × {x86-64, AArch64} for the target 22:42:30
@emilazy:matrix.orgemily * the -nostdlibinc patch will be a pain. it's a hack that we have to skip on Darwin because it doesn't help us and it breaks stuff. but it's a hack that works by patching the command-line parsing 22:42:43
@reckenrode:matrix.orgRandy Eckenrode
In reply to @p14:matrix.org
I am not exactly clear on what is being diffed in these gists

I’m comparing pkgsCross.gnu64.buildPackages.clang.cc to pkgsCross.x86_64-darwin.buildPackages.clang.cc

22:44:27
@reckenrode:matrix.orgRandy Eckenrode

If I set enableGoldPlugin to true, there is no diff between them. They’re the same output.

22:45:00
@emilazy:matrix.orgemily (also in case it was missed, this is on a branch where Randy makes the Darwin patch check unconditional, so can't expect to reproduce those results with a Darwin hostPlatform currently) 22:45:34
@emilazy:matrix.orgemily * (also in case it was missed, this is on a branch where Randy makes the Darwin patch check unconditional and removes the stdenv rpath stuff, so can't expect to reproduce those results with a Darwin hostPlatform currently) 22:45:50
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/NixOS/nixpkgs/blob/45d55abd3964711133c2c3bdfdae82e178e9ce55/pkgs/stdenv/darwin/default.nix#L1262-L127822:47:28
@reckenrode:matrix.orgRandy EckenrodeIf clang is correctly setting itself up as a multi-target compiler, should that be overlaid unconditionally?22:47:45
@reckenrode:matrix.orgRandy EckenrodeOr at least the LLVM portion. I don’t know about the Darwin binutils stuff.22:48:01
@reckenrode:matrix.orgRandy Eckenrode

That allows clang.cc to equal the cross one in buildPackages even on Darwin.

22:48:31
13 Nov 2024
@p14:matrix.orgp14
In reply to @reckenrode:matrix.org
If clang is correctly setting itself up as a multi-target compiler, should that be overlaid unconditionally?
Not clear to me. The unwrapped clang can be; but llvmPackages contains wrapped clangs which embed information about the targetPlatform, right?
17:42:07
@reckenrode:matrix.orgRandy Eckenrode
In reply to @p14:matrix.org
Not clear to me. The unwrapped clang can be; but llvmPackages contains wrapped clangs which embed information about the targetPlatform, right?
Assuming the targetPlatform stuff gets dropped, so the same Clang can be used for all cross builds.
18:11:41
@p14:matrix.orgp14
In reply to @reckenrode:matrix.org
Assuming the targetPlatform stuff gets dropped, so the same Clang can be used for all cross builds.
Same llvmPackages.clang.cc but not same llvmPackages.clang.
18:12:48
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/NixOS/nixpkgs/blob/45d55abd3964711133c2c3bdfdae82e178e9ce55/pkgs/stdenv/darwin/default.nix#L306_L32618:13:11
@reckenrode:matrix.orgRandy Eckenrode * 18:13:42
@reckenrode:matrix.orgRandy Eckenrode @p14:matrix.org: Just double-checked what’s overlaid. See above. Only those packages are overlaid. No wrappers are included in those packages. 18:14:35
@p14:matrix.orgp14Ah cool. That was opaque to me, thanks for explaining!18:15:21
@p14:matrix.orgp14I wish we had a simpler llvmPackages extend expression.18:15:37
@reckenrode:matrix.orgRandy EckenrodeThe Darwin stdenv uses functions to group overrides for the stdenv bootstrap (and provide consistency between stages). That stuff is new with the rework. The wrapper won’t be overlaid because it’s not in those functions.18:16:27

Show newer messages


Back to Room ListRoom Version: 9