diff options
author | Ross Burton <ross.burton@arm.com> | 2023-02-20 15:46:12 +0000 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-02-22 01:07:43 -0800 |
commit | fcddf51b7c9a09d0504021476dc68a786ef5344b (patch) | |
tree | 4515b6c1185df73ff7e4faa3c17ddcaaf6911cf6 | |
parent | 1ed7324c575ee7e346bbf8dd344b69646a5af24a (diff) | |
download | meta-openembedded-fcddf51b7c9a09d0504021476dc68a786ef5344b.tar.gz |
nodejs: don't force cross-compilation in native builds
By not forcing the cross-compile build logic in native builds the build
is a _lot_ faster. Walltime in buildstats-diff on my machine:
nodejs-native do_compile -475.6s -41.2% 1153.4s -> 677.7s
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb b/meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb index 1811e975cd..f8b7f76f61 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb | |||
@@ -137,18 +137,22 @@ addtask create_v8_qemu_wrapper after do_configure before do_compile | |||
137 | 137 | ||
138 | LDFLAGS:append:x86 = " -latomic" | 138 | LDFLAGS:append:x86 = " -latomic" |
139 | 139 | ||
140 | CROSS_FLAGS = "--cross-compiling" | ||
141 | CROSS_FLAGS:class-native = "--no-cross-compiling" | ||
142 | |||
140 | # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi | 143 | # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi |
141 | do_configure () { | 144 | do_configure () { |
142 | export LD="${CXX}" | 145 | export LD="${CXX}" |
143 | GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES | 146 | GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES |
144 | # $TARGET_ARCH settings don't match --dest-cpu settings | 147 | # $TARGET_ARCH settings don't match --dest-cpu settings |
145 | python3 configure.py --verbose --prefix=${prefix} --cross-compiling \ | 148 | python3 configure.py --verbose --prefix=${prefix} \ |
146 | --shared-openssl \ | 149 | --shared-openssl \ |
147 | --without-dtrace \ | 150 | --without-dtrace \ |
148 | --without-etw \ | 151 | --without-etw \ |
149 | --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ | 152 | --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ |
150 | --dest-os=linux \ | 153 | --dest-os=linux \ |
151 | --libdir=${baselib} \ | 154 | --libdir=${baselib} \ |
155 | ${CROSS_FLAGS} \ | ||
152 | ${ARCHFLAGS} \ | 156 | ${ARCHFLAGS} \ |
153 | ${PACKAGECONFIG_CONFARGS} | 157 | ${PACKAGECONFIG_CONFARGS} |
154 | } | 158 | } |