Skip to content

Commit

Permalink
aws-crt-cpp: enable sanitizer if ptest is enabled
Browse files Browse the repository at this point in the history
(cherry picked from commit be71870)
  • Loading branch information
thomas-roos committed Jan 21, 2025
1 parent d0d0877 commit 75f14dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion recipes-sdk/aws-crt-cpp/aws-crt-cpp_0.29.9.bb
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ EXTRA_OECMAKE += "\
# for generating Makefiles to run tests
OECMAKE_GENERATOR = "Unix Makefiles"

PACKAGECONFIG ??= "\
PACKAGECONFIG ?= "\
${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)} \
"

PACKAGECONFIG:append:x86-64 = " ${@bb.utils.contains('PTEST_ENABLED', '1', 'sanitize', '', d)}"

# enable PACKAGECONFIG = "static" to build static instead of shared libs
PACKAGECONFIG[static] = "-DBUILD_SHARED_LIBS=OFF,-DBUILD_SHARED_LIBS=ON,,"

Expand All @@ -70,3 +72,8 @@ do_install_ptest () {
install -d ${D}${PTEST_PATH}/tests
install -m 0755 ${B}/tests/aws-crt-cpp-tests ${D}${PTEST_PATH}/tests/
}

# -fsanitize=address does cause this
# nooelint: oelint.vars.insaneskip:INSANE_SKIP
INSANE_SKIP:x86-64 += "${@bb.utils.contains('PACKAGECONFIG', 'sanitize', 'buildpaths', '', d)}"
PACKAGECONFIG[sanitize] = "-DENABLE_SANITIZERS=ON -DSANITIZERS=address, -DENABLE_SANITIZERS=OFF,gcc-sanitizers"

0 comments on commit 75f14dd

Please sign in to comment.