Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# may be redefined in command line on configuration stage
# "BUILD_LIBRDKAFKA%": "<!(echo ${BUILD_LIBRDKAFKA:-1})"
"BUILD_LIBRDKAFKA%": "<!(node ./util/get-env.js BUILD_LIBRDKAFKA 1)",
"CKJS_LINKING%": "<!(node ./util/get-env.js CKJS_LINKING static)",
},
"targets": [
{
Expand Down Expand Up @@ -85,7 +86,17 @@
],
'conditions': [
[
'OS=="linux"',
['OS=="linux"', 'CKJS_LINKING="dynamic"'],
{
"libraries": [
"../build/deps/librdkafka.so",
"../build/deps/librdkafka++.so",
"-Wl,-rpath='$$ORIGIN/../deps'",
],
}
],
[
['OS=="linux"', 'CKJS_LINKING!="dynamic"'],
{
"libraries": [
"../build/deps/librdkafka-static.a",
Expand Down
2 changes: 1 addition & 1 deletion deps/librdkafka.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"librdkafka/config.h",
],
"action": [
"make", "-C", "librdkafka", "libs", "install"
"make", "-j5", "-C", "librdkafka", "libs", "install"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this for for developer local work, we can just use -j without a number

Suggested change
"make", "-j5", "-C", "librdkafka", "libs", "install"
"make", "-j", "-C", "librdkafka", "libs", "install"

],
"conditions": [
[
Expand Down
5 changes: 4 additions & 1 deletion util/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ if (isWin) {
var childProcess = require('child_process');

try {
childProcess.execSync('./configure --install-deps --source-deps-only --disable-lz4-ext --enable-static --enable-strip --disable-gssapi --prefix=' + releaseDir + ' --libdir=' + releaseDir, {
let opts = '--install-deps --source-deps-only --disable-lz4-ext --enable-static --enable-strip --disable-gssapi';
if (process.env['CKJS_LINKING'] === 'dynamic')
opts = '';
childProcess.execSync(`./configure ${opts} --prefix=${releaseDir} --libdir=${releaseDir}`, {
cwd: baseDir,
stdio: [0,1,2]
});
Expand Down