Why make does not use jobs when compiling? #58
-
I usually run I have noticed the following output, while my CPU uses only a single core: $ make -j $(nproc)
gcc -o nelua-lua \
-DNDEBUG -DLUA_COMPAT_5_3 -DLUA_ROOT='"/usr/local/"' -DLUA_USE_RPMALLOC -DENABLE_GLOBAL_CACHE=0 -DENABLE_UNLIMITED_CACHE=1 -DBUILD_DYNAMIC_LINK -DLUA_USE_LINUX \
-Ilua \
-Wall -O2 -fno-plt -fno-stack-protector -flto \
-s -Wl,-E \
lua/onelua.c lfs.c sys.c hasher.c lpeglabel/*.c rpmalloc/rpmalloc.c \
-lm -ldl Is this the expected behavior? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is for compiling the bundled Lua interpreter that comes with Nelua, this is usually done only once when installing Nelua. It is expected because all the C code are concatenated to a big single C source file, so the compiler can generate a more optimized binary, this optimization technique is known as amalgamation, thus this is expected. Also note that generated code by Nelua compiler also does this. |
Beta Was this translation helpful? Give feedback.
-
Ah you must have been inspired by SQLite's amalgamation technique. Nice, I like it. Well done 👍 |
Beta Was this translation helpful? Give feedback.
This is for compiling the bundled Lua interpreter that comes with Nelua, this is usually done only once when installing Nelua. It is expected because all the C code are concatenated to a big single C source file, so the compiler can generate a more optimized binary, this optimization technique is known as amalgamation, thus this is expected. Also note that generated code by Nelua compiler also does this.