Skip to content

Commit

Permalink
Fix sanitizer search paths.
Browse files Browse the repository at this point in the history
afaict this directory hasn't been named lib64 for quite some time, and
it definitely isn't for the NDK this sample uses on macOS. `find
prebuilts/clang/host -name lib64` only finds one version of Clang where
this was named lib64 (there were likely others that have since been
removed from the repos, but they'll be rather old).

This wasn't caught by CI because the shell script that drives the build
only builds the default build type. That will be fixed automatically as
part of #1010.
  • Loading branch information
DanAlbert committed May 7, 2024
1 parent 6f441dd commit 4672ec0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sanitizers/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if(SANITIZE)
target_link_options(sanitizers PUBLIC -fsanitize=address)

# Grab libclang_rt.asan-${ARCH_STR}-android.so from the NDK.
file(GLOB ASAN_GLOB "${HINT_PATH}/../lib64/clang/*/lib/linux")
file(GLOB ASAN_GLOB "${HINT_PATH}/../lib/clang/*/lib/linux")
find_file(ASAN
NAMES libclang_rt.asan-${ARCH_STR}-android.so
PATHS ${ASAN_GLOB})
Expand All @@ -76,7 +76,7 @@ if(SANITIZE)
target_link_options(sanitizers PUBLIC -fsanitize=undefined -fno-sanitize-recover=undefined)

# Grab libclang_rt.ubsan_standalone-${ARCH_STR}-android.so from the NDK.
file(GLOB UBSAN_GLOB "${HINT_PATH}/../lib64/clang/*/lib/linux")
file(GLOB UBSAN_GLOB "${HINT_PATH}/../lib/clang/*/lib/linux")
find_file(UBSAN
NAMES libclang_rt.ubsan_standalone-${ARCH_STR}-android.so
PATHS ${UBSAN_GLOB})
Expand Down
Binary file not shown.

0 comments on commit 4672ec0

Please sign in to comment.