Skip to content

Commit

Permalink
compiler-rt-sanitizers: Fix native build tooling paths
Browse files Browse the repository at this point in the history
Native builds of compiler-rt-sanitizers fail because llvm-ranlib,
llvm-ar, and llvm-nm are not found where the recipe specifies that
they'll be. Other recipes (in particular: compiler-rt) only specify the
locations of those tools for target and nativesdk builds, and they build
fine. This commit implements the same thing for compiler-rt-sanitizers,
fixing native builds.

Signed-off-by: Eric Sun <ericsun2@cisco.com>
  • Loading branch information
0xERIC authored and kraj committed Jul 30, 2024
1 parent f53a67a commit 79d26d1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions recipes-devtools/clang/compiler-rt-sanitizers_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,21 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCOMPILER_RT_BUILD_PROFILE=ON \
-DCOMPILER_RT_BUILD_MEMPROF=ON \
-DLLVM_ENABLE_PROJECTS='compiler-rt' \
-DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \
-DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \
-DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
-DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
"

EXTRA_OECMAKE:append:class-nativesdk = "\
-DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \
-DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \
-DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
-DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
-DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \
"

EXTRA_OECMAKE:append:class-target = "\
-DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \
-DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \
-DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
"

Expand Down

0 comments on commit 79d26d1

Please sign in to comment.