All of lore.kernel.org
 help / color / mirror / Atom feed
* [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional
@ 2022-06-22 17:32 Markus Volk
  2022-06-22 17:32 ` [oe-core][PATCH 2/2] llvm: dont use host python Markus Volk
  2022-06-22 20:44 ` [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional Luca Ceresoli
  0 siblings, 2 replies; 7+ messages in thread
From: Markus Volk @ 2022-06-22 17:32 UTC (permalink / raw)
  To: openembedded-core; +Cc: Markus Volk

Make it a PACKAGECONFIG option and thus avoid automagic to improve reproducibility

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta/recipes-devtools/llvm/llvm_git.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index 67ed1eab00..b86605cbce 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -90,6 +90,9 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
                   -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \
                  "
 
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[optviewer] = "-DPY_PYGMENTS_FOUND=ON -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=ON -DPY_YAML_FOUND=ON,-DPY_PYGMENTS_FOUND=OFF,,python3-pygments python3-pyyaml"
+
 # patch out build host paths for reproducibility
 do_compile:prepend:class-target() {
         sed -i -e "s,${WORKDIR},,g" ${B}/tools/llvm-config/BuildVariables.inc
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [oe-core][PATCH 2/2] llvm: dont use host python
  2022-06-22 17:32 [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional Markus Volk
@ 2022-06-22 17:32 ` Markus Volk
  2022-06-22 20:44 ` [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional Luca Ceresoli
  1 sibling, 0 replies; 7+ messages in thread
From: Markus Volk @ 2022-06-22 17:32 UTC (permalink / raw)
  To: openembedded-core; +Cc: Markus Volk

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta/recipes-devtools/llvm/llvm_git.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index b86605cbce..292f295cf3 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -15,7 +15,7 @@ COMPATIBLE_HOST:riscv32 = "null"
 
 RDEPENDS:${PN}:append:class-target = " ncurses-terminfo"
 
-inherit cmake pkgconfig
+inherit cmake pkgconfig python3native
 
 PROVIDES += "llvm${PV}"
 
@@ -75,7 +75,6 @@ EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \
                   -DLLVM_OPTIMIZED_TABLEGEN=ON \
                   -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS}' \
                   -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \
-                  -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \
                   -G Ninja"
 
 EXTRA_OECMAKE:append:class-target = "\
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional
  2022-06-22 17:32 [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional Markus Volk
  2022-06-22 17:32 ` [oe-core][PATCH 2/2] llvm: dont use host python Markus Volk
@ 2022-06-22 20:44 ` Luca Ceresoli
  2022-06-22 21:03   ` Markus Volk
  1 sibling, 1 reply; 7+ messages in thread
From: Luca Ceresoli @ 2022-06-22 20:44 UTC (permalink / raw)
  To: Markus Volk; +Cc: openembedded-core

Hi Markus,

On Wed, 22 Jun 2022 19:32:50 +0200
"Markus Volk" <f_l_k@t-online.de> wrote:

> Make it a PACKAGECONFIG option and thus avoid automagic to improve reproducibility
> 
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  meta/recipes-devtools/llvm/llvm_git.bb | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
> index 67ed1eab00..b86605cbce 100644
> --- a/meta/recipes-devtools/llvm/llvm_git.bb
> +++ b/meta/recipes-devtools/llvm/llvm_git.bb
> @@ -90,6 +90,9 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
>                    -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \
>                   "
>  
> +PACKAGECONFIG ?= ""
> +PACKAGECONFIG[optviewer] = "-DPY_PYGMENTS_FOUND=ON -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=ON -DPY_YAML_FOUND=ON,-DPY_PYGMENTS_FOUND=OFF,,python3-pygments python3-pyyaml"
> +

I have been working on a different version of this patch earlier today
based on the discussion on this mailing list. Now it completed testing
on my machine and I have run a build on the autobuilders:

https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/1049

My approach was slightly different, but not dramatically. I wrote a
more informative commit message though. I'm sending my patch to have
both out so that we can find which is the best one.

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional
  2022-06-22 20:44 ` [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional Luca Ceresoli
@ 2022-06-22 21:03   ` Markus Volk
  2022-06-23  7:40     ` Luca Ceresoli
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Volk @ 2022-06-22 21:03 UTC (permalink / raw)
  To: Luca Ceresoli; +Cc: openembedded-core

Hi Luca,

your commit message is way better than mine.

One suggestion on your patch. I guess to be working on the target it 
would be needed to add python3-pygment and python3-pyyaml as runtime 
dependencies as well.

PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml"

Markus

Am 22.06.22 um 22:44 schrieb Luca Ceresoli:
> Hi Markus,
>
> On Wed, 22 Jun 2022 19:32:50 +0200
> "Markus Volk" <f_l_k@t-online.de> wrote:
>
>> Make it a PACKAGECONFIG option and thus avoid automagic to improve reproducibility
>>
>> Signed-off-by: Markus Volk <f_l_k@t-online.de>
>> ---
>>   meta/recipes-devtools/llvm/llvm_git.bb | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
>> index 67ed1eab00..b86605cbce 100644
>> --- a/meta/recipes-devtools/llvm/llvm_git.bb
>> +++ b/meta/recipes-devtools/llvm/llvm_git.bb
>> @@ -90,6 +90,9 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
>>                     -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \
>>                    "
>>   
>> +PACKAGECONFIG ?= ""
>> +PACKAGECONFIG[optviewer] = "-DPY_PYGMENTS_FOUND=ON -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=ON -DPY_YAML_FOUND=ON,-DPY_PYGMENTS_FOUND=OFF,,python3-pygments python3-pyyaml"
>> +
> I have been working on a different version of this patch earlier today
> based on the discussion on this mailing list. Now it completed testing
> on my machine and I have run a build on the autobuilders:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/117/builds/1049
>
> My approach was slightly different, but not dramatically. I wrote a
> more informative commit message though. I'm sending my patch to have
> both out so that we can find which is the best one.
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional
  2022-06-22 21:03   ` Markus Volk
@ 2022-06-23  7:40     ` Luca Ceresoli
  2022-06-23  7:57       ` Markus Volk
  0 siblings, 1 reply; 7+ messages in thread
From: Luca Ceresoli @ 2022-06-23  7:40 UTC (permalink / raw)
  To: Markus Volk; +Cc: openembedded-core

Hi Markus,

On Wed, 22 Jun 2022 23:03:47 +0200
"Markus Volk" <f_l_k@t-online.de> wrote:

> Hi Luca,
> 
> your commit message is way better than mine.
> 
> One suggestion on your patch. I guess to be working on the target it 
> would be needed to add python3-pygment and python3-pyyaml as runtime 
> dependencies as well.
> 
> PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml"

Good catch. So if you are OK I will take care of this, send v2, test it
on the autobuilder where it did fail and if there is no surprise send it
to Richard.


-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional
  2022-06-23  7:40     ` Luca Ceresoli
@ 2022-06-23  7:57       ` Markus Volk
  2022-06-23  8:41         ` Luca Ceresoli
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Volk @ 2022-06-23  7:57 UTC (permalink / raw)
  To: Luca Ceresoli; +Cc: openembedded-core

Hi Luca,

the reason i made the switch working manually both sides was that i 
wanted to remove those python modules from build dependencies as i 
thought they would only be needed at runtime. But this should work as 
well and I'm of course OK with it.

Markus

Am 23.06.22 um 09:40 schrieb Luca Ceresoli:
> Hi Markus,
>
> On Wed, 22 Jun 2022 23:03:47 +0200
> "Markus Volk" <f_l_k@t-online.de> wrote:
>
>> Hi Luca,
>>
>> your commit message is way better than mine.
>>
>> One suggestion on your patch. I guess to be working on the target it
>> would be needed to add python3-pygment and python3-pyyaml as runtime
>> dependencies as well.
>>
>> PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml"
> Good catch. So if you are OK I will take care of this, send v2, test it
> on the autobuilder where it did fail and if there is no surprise send it
> to Richard.
>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional
  2022-06-23  7:57       ` Markus Volk
@ 2022-06-23  8:41         ` Luca Ceresoli
  0 siblings, 0 replies; 7+ messages in thread
From: Luca Ceresoli @ 2022-06-23  8:41 UTC (permalink / raw)
  To: Markus Volk; +Cc: openembedded-core

Hi Markus,

On Thu, 23 Jun 2022 09:57:11 +0200
"Markus Volk" <f_l_k@t-online.de> wrote:

> Hi Luca,
> 
> the reason i made the switch working manually both sides was that i 
> wanted to remove those python modules from build dependencies as i 
> thought they would only be needed at runtime.

Sure, fair enough.

As for me, I preferred to do the opposite because the CMake
configuration process might look into anything specific of those
modules, and if they add such code in future versions we might not
notice and experience issues. Maybe unlikely, but my approach was to
prefer a "safe" build to build time.

It's a matter of choice I guess, no approach is clearly "wrong" or
"right" here.

> But this should work as 
> well and I'm of course OK with it.

OK. My v2 is under testing right now.

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-23  8:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22 17:32 [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional Markus Volk
2022-06-22 17:32 ` [oe-core][PATCH 2/2] llvm: dont use host python Markus Volk
2022-06-22 20:44 ` [oe-core][PATCH 1/2] llvm: make LLVM_HAVE_OPT_VIEWER_MODULES optional Luca Ceresoli
2022-06-22 21:03   ` Markus Volk
2022-06-23  7:40     ` Luca Ceresoli
2022-06-23  7:57       ` Markus Volk
2022-06-23  8:41         ` Luca Ceresoli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.