Message ID | 20250801125827.2349417-1-ross.burton@arm.com |
---|---|
State | Under Review |
Headers | show |
Series | libclc: do native build of prepare_builtins in a fresh environment | expand |
On Fri, Aug 1, 2025 at 5:58 AM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > > The environment has variables like LDFLAGS set which CMake will try and > use, so until our cmake class is comprehensive enough to nuke those in > the native toolchain file (if that is possible) do a build inside a > clean (apart from PATH) environment to avoid cross-contamination. > > Signed-off-by: Ross Burton <ross.burton@arm.com> > --- > meta/recipes-devtools/clang/libclc_git.bb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-devtools/clang/libclc_git.bb b/meta/recipes-devtools/clang/libclc_git.bb > index 04b76c55d26..e56cf2eb6c0 100644 > --- a/meta/recipes-devtools/clang/libclc_git.bb > +++ b/meta/recipes-devtools/clang/libclc_git.bb > @@ -28,7 +28,7 @@ EXTRA_OECMAKE:append:class-nativesdk = " -DPREPARE_BUILTINS=${B_NATIVE}/prepare_ > # Need to build a native prepare_builtins binary in target builds. The easiest > # way to do this is with a second native cmake build tree. > do_build_prepare_builtins() { > - cmake --fresh -G Ninja \ > + env -i PATH=$PATH cmake --fresh -G Ninja \ This works too. Although, it will be good to preserve the commit msg info I had in prior patch for context > -S ${OECMAKE_SOURCEPATH} -B ${B_NATIVE} \ > -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${WORKDIR}/toolchain-native.cmake \ > -DLIBCLC_TARGETS_TO_BUILD= > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#221243): https://lists.openembedded.org/g/openembedded-core/message/221243 > Mute This Topic: https://lists.openembedded.org/mt/114484448/1997914 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta/recipes-devtools/clang/libclc_git.bb b/meta/recipes-devtools/clang/libclc_git.bb index 04b76c55d26..e56cf2eb6c0 100644 --- a/meta/recipes-devtools/clang/libclc_git.bb +++ b/meta/recipes-devtools/clang/libclc_git.bb @@ -28,7 +28,7 @@ EXTRA_OECMAKE:append:class-nativesdk = " -DPREPARE_BUILTINS=${B_NATIVE}/prepare_ # Need to build a native prepare_builtins binary in target builds. The easiest # way to do this is with a second native cmake build tree. do_build_prepare_builtins() { - cmake --fresh -G Ninja \ + env -i PATH=$PATH cmake --fresh -G Ninja \ -S ${OECMAKE_SOURCEPATH} -B ${B_NATIVE} \ -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${WORKDIR}/toolchain-native.cmake \ -DLIBCLC_TARGETS_TO_BUILD=
The environment has variables like LDFLAGS set which CMake will try and use, so until our cmake class is comprehensive enough to nuke those in the native toolchain file (if that is possible) do a build inside a clean (apart from PATH) environment to avoid cross-contamination. Signed-off-by: Ross Burton <ross.burton@arm.com> --- meta/recipes-devtools/clang/libclc_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)