-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: introduce configure --shared #6994
Changes from all commits
3f68d0e
eeeeeaf
6d027f6
66fd9d4
f9d4754
8f418f5
38acb90
eeb315b
53c7adc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -411,17 +411,23 @@ extern "C" NODE_EXTERN void node_module_register(void* mod); | |
# define NODE_MODULE_EXPORT __attribute__((visibility("default"))) | ||
#endif | ||
|
||
#ifdef NODE_SHARED_MODE | ||
# define NODE_CTOR_PREFIX | ||
#else | ||
# define NODE_CTOR_PREFIX static | ||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One result of removing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bnoordhuis Correct, here is an example (notice uppercase T for export):
This change was in the original PR by Fedor. I believe he included it due to Electron, see here electron/node@0828dfa and the uses here electron/electron@69adff1 |
||
|
||
#if defined(_MSC_VER) | ||
#pragma section(".CRT$XCU", read) | ||
#define NODE_C_CTOR(fn) \ | ||
static void __cdecl fn(void); \ | ||
NODE_CTOR_PREFIX void __cdecl fn(void); \ | ||
__declspec(dllexport, allocate(".CRT$XCU")) \ | ||
void (__cdecl*fn ## _)(void) = fn; \ | ||
static void __cdecl fn(void) | ||
NODE_CTOR_PREFIX void __cdecl fn(void) | ||
#else | ||
#define NODE_C_CTOR(fn) \ | ||
static void fn(void) __attribute__((constructor)); \ | ||
static void fn(void) | ||
NODE_CTOR_PREFIX void fn(void) __attribute__((constructor)); \ | ||
NODE_CTOR_PREFIX void fn(void) | ||
#endif | ||
|
||
#define NODE_MODULE_X(modname, regfunc, priv, flags) \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
'use strict'; | ||
require('../common'); | ||
var assert = require('assert'); | ||
|
||
// check for existence | ||
assert(process.config.variables.hasOwnProperty('node_module_version')); | ||
|
||
// ensure that `node_module_version` is an Integer > 0 | ||
assert(Number.isInteger(process.config.variables.node_module_version)); | ||
assert(process.config.variables.node_module_version > 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks
./configure --static
.EDIT: Doesn't it?