Skip to content

Commit

Permalink
rustc: Enable profiler on more platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin committed Sep 24, 2024
1 parent 9423bdb commit 07695c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkgs/development/compilers/rust/rustc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,12 @@ in stdenv.mkDerivation (finalAttrs: {
# Since fastCross only builds std, it doesn't make sense (and
# doesn't work) to build a linker.
"--disable-llvm-bitcode-linker"
] ++ optionals (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) [
] ++ optionals (stdenv.targetPlatform.isLinux || stdenv.targetPlatform.isDarwin || stdenv.targetPlatform.isAndroid || stdenv.targetPlatform.isFreeBSD || (stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.isMinGW) && !(stdenv.targetPlatform.useLLVM or false)) [
# Sources for the conditions
# https://github.com/rust-lang/rust/blob/master/src/ci/github-actions/jobs.yml
# https://github.com/search?q=repo%3Arust-lang%2Frust%20%2Fenable-profiler%2F&type=code
# MinGW excluded because there's an open pr to rust to remove it's
# `enable-profiler` in `jobs.yml` https://github.com/rust-lang/rust/pull/122613/files
"--enable-profiler" # build libprofiler_builtins
] ++ optionals stdenv.buildPlatform.isMusl [
"${setBuild}.musl-root=${pkgsBuildBuild.targetPackages.stdenv.cc.libc}"
Expand Down

0 comments on commit 07695c0

Please sign in to comment.