Various bits of the LLVM project set the build RPATH in a way that means
we have non-deterministic binaries even though we should always be using
relative paths.
This clearly is not working as some of the binaries get rewritten on
install and have large string paddings that correlate with erased build
paths.
So that we don't have to disable RPATHs in every recipe, just do it once
in the common include file and remove the existing recipe-specific
assignments that are now not needed.
Signed-off-by: Ross Burton <ross.burton@arm.com>
def get_clang_target_arch(bb, d):
return get_clang_arch(bb, d, 'TARGET_ARCH')
+# Don't put build-time RPATHs in the binaries, whilst they'll be stripped on
+# install they cause non-deterministic binaries.
+EXTRA_OECMAKE += "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
+
require common.inc
-DLLVM_RUNTIME_TARGETS=${HOST_ARCH} \
-DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
-DLLVM_APPEND_VC_REV=OFF \
- -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
"
EXTRA_OECMAKE:append:class-target = " \
OECMAKE_SOURCEPATH = "${S}/lld"
-# Explicitly disable RPATHs as otherwise they're stipped out of the binaries,
-# and are then non-reproducible.
-#
# Explicitly enable symlinks as the lld build doesn't call into the llvm setup
# and turn that on.
-EXTRA_OECMAKE += "-DCMAKE_SKIP_BUILD_RPATH=ON \
- -DLLVM_INCLUDE_TESTS=OFF -DLLVM_USE_SYMLINKS=ON \
+EXTRA_OECMAKE += "-DLLVM_INCLUDE_TESTS=OFF -DLLVM_USE_SYMLINKS=ON \
-DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen"
BBCLASSEXTEND = "native nativesdk"