On Tue, 19 Oct 2021 at 14:52, Stefan Herbrechtsmeier <
[email protected]> wrote:

> How should we run build scripts which need native npm packages and how
> should we handle licenses of build and runtime packages?
>
> A simplified node.js flow looks like the following
>
> cd ${S}
> rm -rf node_modules
> npm install --arch=$NPM_BUILD_ARCH --dev
> npm run-script --arch=$NPM_BUILD_ARCH build
> rm -rf node_modules
> npm install --arch=$NPM_TARGET_ARCH --global <OR> cp -r dist/* ${D}
>
> Should we split it into two recipes or should we handle everything in a
> single recipe?
>
> Is it accepted to use the output of a native recipe as source for an
> target recipe?
>

If that output is placed in a reasonable place in sysroot-destdir/ and
pulled in via DEPENDS, then yes, that's fine. But it's also okay to do the
build in two steps like above from a single recipe - there are more than a
few recipes where native helper binaries are built to aid with the target
build, typically the build system itself is able to use BUILD_CC for it, or
a custom task is written where CC is set to BUILD_CC explicitly.

I think you should experiment with both options.

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157118): 
https://lists.openembedded.org/g/openembedded-core/message/157118
Mute This Topic: https://lists.openembedded.org/mt/86089523/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to