Skip to content

Commit

Permalink
boost: fix build for non x86_64 hostPlatforms
Browse files Browse the repository at this point in the history
  • Loading branch information
tobim committed Nov 24, 2024
1 parent 5ec5cda commit 3e2ceab
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/development/libraries/boost/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ let
"link=${link}"
"-sEXPAT_INCLUDE=${expat.dev}/include"
"-sEXPAT_LIBPATH=${expat.out}/lib"
(
# The stacktrace from exception feature causes memory leaks when built
# with libc++. For all other standard library implementations, i.e.
# libstdc++, we must aknowledge this or stacktrace refuses to compile.
# Issue upstream: https://github.com/boostorg/stacktrace/issues/163
if (stdenv.cc.libcxx != null) then
"boost.stacktrace.from_exception=off"
else
"define=BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK"
)

# TODO: make this unconditional
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform ||
Expand Down

0 comments on commit 3e2ceab

Please sign in to comment.