File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 11CI_DESC=" CI job running ThreadSanitizer"
22CI_DIR=build-sanitize
3- NIX_ARGS=(--arg enableLibcxx true --argstr libcxxSanitizers " Thread" )
3+ NIX_ARGS=(--arg enableLibcxx true --argstr libcxxSanitizers " Thread" --argstr capnprotoSanitizers " thread " )
44export CXX=clang++
55export CXXFLAGS=" -ggdb -Werror -Wall -Wextra -Wpedantic -Wthread-safety -Wno-unused-parameter -fsanitize=thread"
66CMAKE_ARGS=()
Original file line number Diff line number Diff line change 33, enableLibcxx ? false # Whether to use libc++ toolchain and libraries instead of libstdc++
44, minimal ? false # Whether to create minimal shell without extra tools (faster when cross compiling)
55, capnprotoVersion ? null
6+ , capnprotoSanitizers ? null # Optional sanitizers to build cap'n proto with
67, cmakeVersion ? null
78, libcxxSanitizers ? null # Optional LLVM_USE_SANITIZER value to use for libc++, see https://llvm.org/docs/CMake.html
89} :
4142 } // ( lib . optionalAttrs ( lib . versionOlder capnprotoVersion "0.10" ) {
4243 env = { } ; # Drop -std=c++20 flag forced by nixpkgs
4344 } ) ) ;
44- capnproto = capnprotoBase . override ( lib . optionalAttrs enableLibcxx { clangStdenv = llvm . libcxxStdenv ; } ) ;
45+ capnproto = ( capnprotoBase . overrideAttrs ( old : lib . optionalAttrs ( capnprotoSanitizers != null ) {
46+ env = ( old . env or { } ) // {
47+ CXXFLAGS =
48+ lib . concatStringsSep " " [
49+ ( old . env . CXXFLAGS or "" )
50+ "-fsanitize=${ capnprotoSanitizers } "
51+ "-fno-omit-frame-pointer"
52+ "-g"
53+ ] ;
54+ } ;
55+ } ) ) . override ( lib . optionalAttrs enableLibcxx { clangStdenv = llvm . libcxxStdenv ; } ) ;
4556 clang = if enableLibcxx then llvm . libcxxClang else llvm . clang ;
4657 clang-tools = llvm . clang-tools . override { inherit enableLibcxx ; } ;
4758 cmakeHashes = {
You can’t perform that action at this time.
0 commit comments