All of lore.kernel.org
 help / color / mirror / Atom feed
* rust: why is it built in do_install()
@ 2023-09-01 16:34 Enrico Scholz
  2023-09-01 17:37 ` [OE-core] " Frédéric Martinsons
  2023-09-01 21:22 ` Richard Purdie
  0 siblings, 2 replies; 6+ messages in thread
From: Enrico Scholz @ 2023-09-01 16:34 UTC (permalink / raw)
  To: openembedded-core

Hello,

rust recipe does

| do_compile () {
| }
|  
| rust_do_install() {
|     rust_runx install
| }
| 
| rust_do_install:class-nativesdk() {
|     export PSEUDO_UNLOAD=1
|     rust_runx install
|     rust_runx install clippy
|     rust_runx install rustfmt


What is the reason to run the expensive "rust_runx" in do_install() and
not in do_compile().

This:

- is unexpected... do_install is usually expected to run fast

- might interfere with different ${PARALLEL_MAKE} and ${PARALLEL_MAKEINST}
  setup

- might slow down the build process because the 'class-native' variant
  seems to run with active 'pseudo'


I guess it is done in this way because of

|    config.set("install", "prefix",  e(d.getVar("D") + d.getVar("prefix")))

where '${D}' is cleared by do_install.


Wouldn't it be better to replace this by

|    config.set("install", "prefix",  e(d.getVar("B") + '/_install' + d.getVar("prefix")))


| do_compile () {
|     rust_runx install
|     rust_runx install clippy
|     rust_runx install rustfmt
| }
|
| rust_do_install() {
|     cp -a ${B}/_install ${D}

?


[adding 'rustfmt' to 'class-native' would be nice because e.g. 'bindgen'
 users might expect it]



Enrico


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

end of thread, other threads:[~2023-09-02  9:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-01 16:34 rust: why is it built in do_install() Enrico Scholz
2023-09-01 17:37 ` [OE-core] " Frédéric Martinsons
2023-09-01 21:22 ` Richard Purdie
2023-09-02  5:09   ` Alexander Kanavin
2023-09-02  9:22     ` Enrico Scholz
2023-09-02  9:49       ` Richard Purdie

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.