Skip to content

Commit

Permalink
rocmPackages.llvm.clang: remove -nostdlibinc flag (#370180)
Browse files Browse the repository at this point in the history
  • Loading branch information
collares authored Jan 3, 2025
2 parents 92befe3 + 7d27fd2 commit 634ef37
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/build-support/cc-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ stdenvNoCC.mkDerivation {
# no `/usr/include`, there’s essentially no risk to dropping
# the flag there. See discussion in NixOS/nixpkgs#191152.
#
+ optionalString ((cc.isClang or false) && !targetPlatform.isDarwin) ''
+ optionalString ((cc.isClang or false) && !(cc.isROCm or false) && !targetPlatform.isDarwin) ''
echo " -nostdlibinc" >> $out/nix-support/cc-cflags
''

Expand Down
1 change: 1 addition & 0 deletions pkgs/development/rocm-modules/5/llvm/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ stdenv.mkDerivation (finalAttrs: {
passthru = {
isLLVM = targetDir == "llvm";
isClang = targetDir == "clang" || builtins.elem "clang" targetProjects;
isROCm = true;

updateScript = rocmUpdateScript {
name = finalAttrs.pname;
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/rocm-modules/5/llvm/stage-3/clang.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ wrapCCWith rec {
'';

passthru.isClang = true;
passthru.isROCm = true;
});

gccForLibs = stdenv.cc.cc;

extraPackages = [
llvm
lld
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/rocm-modules/6/llvm/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ stdenv.mkDerivation (finalAttrs: {
passthru = {
isLLVM = targetDir == "llvm";
isClang = targetDir == "clang" || builtins.elem "clang" targetProjects;
isROCm = true;

updateScript = rocmUpdateScript {
name = finalAttrs.pname;
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/rocm-modules/6/llvm/stage-3/clang.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ wrapCCWith rec {
'';

passthru.isClang = true;
passthru.isROCm = true;
});

gccForLibs = stdenv.cc.cc;

extraPackages = [
llvm
lld
Expand Down

0 comments on commit 634ef37

Please sign in to comment.