| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 54e4f05 commit afbcc79
13 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -196,6 +196,16 @@ | |||
| 196 | 196 | 'dependencies': [ 'node_aix_shared' ], | |
| 197 | 197 | }, { | |
| 198 | 198 | 'dependencies': [ '<(node_lib_target_name)' ], | |
| 199 | + 'conditions': [ | ||
| 200 | + ['OS=="win" and node_shared=="true"', { | ||
| 201 | + 'dependencies': ['generate_node_def'], | ||
| 202 | + 'msvs_settings': { | ||
| 203 | + 'VCLinkerTool': { | ||
| 204 | + 'ModuleDefinitionFile': '<(PRODUCT_DIR)/<(node_core_target_name).def', | ||
| 205 | + }, | ||
| 206 | + }, | ||
| 207 | + }], | ||
| 208 | + ], | ||
| 199 | 209 | }], | |
| 200 | 210 | [ 'node_intermediate_lib_type=="static_library" and node_shared=="false"', { | |
| 201 | 211 | 'xcode_settings': { | |
@@ -235,8 +245,15 @@ | |||
| 235 | 245 | }], | |
| 236 | 246 | [ 'node_shared=="true"', { | |
| 237 | 247 | 'xcode_settings': { | |
| 238 | - 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ], | ||
| 248 | + 'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', '-Wl,-rpath,@loader_path/../lib'], | ||
| 239 | 249 | }, | |
| 250 | + 'conditions': [ | ||
| 251 | + ['OS=="linux"', { | ||
| 252 | + 'ldflags': [ | ||
| 253 | + '-Wl,-rpath,\\$$ORIGIN/../lib' | ||
| 254 | + ], | ||
| 255 | + }], | ||
| 256 | + ], | ||
| 240 | 257 | }], | |
| 241 | 258 | [ 'enable_lto=="true"', { | |
| 242 | 259 | 'xcode_settings': { | |
@@ -666,6 +683,7 @@ | |||
| 666 | 683 | 'libraries': [ | |
| 667 | 684 | 'Dbghelp', | |
| 668 | 685 | 'Psapi', | |
| 686 | + 'Winmm', | ||
| 669 | 687 | 'Ws2_32', | |
| 670 | 688 | ], | |
| 671 | 689 | }], | |
@@ -1419,5 +1437,40 @@ | |||
| 1419 | 1437 | }, | |
| 1420 | 1438 | ] | |
| 1421 | 1439 | }], # end aix section | |
| 1440 | + ['OS=="win" and node_shared=="true"', { | ||
| 1441 | + 'targets': [ | ||
| 1442 | + { | ||
| 1443 | + 'target_name': 'gen_node_def', | ||
| 1444 | + 'type': 'executable', | ||
| 1445 | + 'sources': [ | ||
| 1446 | + 'tools/gen_node_def.cc' | ||
| 1447 | + ], | ||
| 1448 | + }, | ||
| 1449 | + { | ||
| 1450 | + 'target_name': 'generate_node_def', | ||
| 1451 | + 'dependencies': [ | ||
| 1452 | + 'gen_node_def', | ||
| 1453 | + '<(node_lib_target_name)', | ||
| 1454 | + ], | ||
| 1455 | + 'type': 'none', | ||
| 1456 | + 'actions': [ | ||
| 1457 | + { | ||
| 1458 | + 'action_name': 'generate_node_def_action', | ||
| 1459 | + 'inputs': [ | ||
| 1460 | + '<(PRODUCT_DIR)/<(node_lib_target_name).dll' | ||
| 1461 | + ], | ||
| 1462 | + 'outputs': [ | ||
| 1463 | + '<(PRODUCT_DIR)/<(node_core_target_name).def', | ||
| 1464 | + ], | ||
| 1465 | + 'action': [ | ||
| 1466 | + '<(PRODUCT_DIR)/gen_node_def.exe', | ||
| 1467 | + '<@(_inputs)', | ||
| 1468 | + '<@(_outputs)', | ||
| 1469 | + ], | ||
| 1470 | + }, | ||
| 1471 | + ], | ||
| 1472 | + }, | ||
| 1473 | + ], | ||
| 1474 | + }], # end win section | ||
| 1422 | 1475 | ], # end conditions block | |
| 1423 | 1476 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ | |||
| 29 | 29 | [ 'clang==1', { | |
| 30 | 30 | 'cflags': [ '-Werror=undefined-inline', ] | |
| 31 | 31 | }], | |
| 32 | - [ 'node_shared=="false" and "<(_type)"=="executable"', { | ||
| 32 | + [ '"<(_type)"=="executable"', { | ||
| 33 | 33 | 'msvs_settings': { | |
| 34 | 34 | 'VCManifestTool': { | |
| 35 | 35 | 'EmbedManifest': 'true', | |
@@ -41,6 +41,19 @@ | |||
| 41 | 41 | 'defines': [ | |
| 42 | 42 | 'NODE_SHARED_MODE', | |
| 43 | 43 | ], | |
| 44 | + 'conditions': [ | ||
| 45 | + ['"<(_type)"=="executable"', { | ||
| 46 | + 'defines': [ | ||
| 47 | + 'USING_UV_SHARED', | ||
| 48 | + 'USING_V8_SHARED', | ||
| 49 | + 'BUILDING_NODE_EXTENSION' | ||
| 50 | + ], | ||
| 51 | + 'defines!': [ | ||
| 52 | + 'BUILDING_V8_SHARED=1', | ||
| 53 | + 'BUILDING_UV_SHARED=1' | ||
| 54 | + ] | ||
| 55 | + }], | ||
| 56 | + ], | ||
| 44 | 57 | }], | |
| 45 | 58 | [ 'OS=="win"', { | |
| 46 | 59 | 'defines!': [ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,7 +35,7 @@ template <typename... Args> | |||
| 35 | 35 | inline std::string SPrintF(const char* format, Args&&... args); | |
| 36 | 36 | template <typename... Args> | |
| 37 | 37 | inline void FPrintF(FILE* file, const char* format, Args&&... args); | |
| 38 | - void FWrite(FILE* file, const std::string& str); | ||
| 38 | + void NODE_EXTERN_PRIVATE FWrite(FILE* file, const std::string& str); | ||
| 39 | 39 | ||
| 40 | 40 | // Listing the AsyncWrap provider types first enables us to cast directly | |
| 41 | 41 | // from a provider type to a debug category. | |
@@ -57,7 +57,7 @@ enum class DebugCategory { | |||
| 57 | 57 | CATEGORY_COUNT | |
| 58 | 58 | }; | |
| 59 | 59 | ||
| 60 | - class EnabledDebugList { | ||
| 60 | + class NODE_EXTERN_PRIVATE EnabledDebugList { | ||
| 61 | 61 | public: | |
| 62 | 62 | bool enabled(DebugCategory category) const { | |
| 63 | 63 | DCHECK_GE(static_cast<int>(category), 0); | |
@@ -168,7 +168,7 @@ void CheckedUvLoopClose(uv_loop_t* loop); | |||
| 168 | 168 | void PrintLibuvHandleInformation(uv_loop_t* loop, FILE* stream); | |
| 169 | 169 | ||
| 170 | 170 | namespace per_process { | |
| 171 | - extern EnabledDebugList enabled_debug_list; | ||
| 171 | + extern NODE_EXTERN_PRIVATE EnabledDebugList enabled_debug_list; | ||
| 172 | 172 | ||
| 173 | 173 | template <typename... Args> | |
| 174 | 174 | inline void FORCE_INLINE Debug(DebugCategory cat, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -558,7 +558,7 @@ class Environment; | |||
| 558 | 558 | struct AllocatedBuffer; | |
| 559 | 559 | ||
| 560 | 560 | typedef size_t SnapshotIndex; | |
| 561 | - class IsolateData : public MemoryRetainer { | ||
| 561 | + class NODE_EXTERN_PRIVATE IsolateData : public MemoryRetainer { | ||
| 562 | 562 | public: | |
| 563 | 563 | IsolateData(v8::Isolate* isolate, | |
| 564 | 564 | uv_loop_t* event_loop, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,6 +32,16 @@ | |||
| 32 | 32 | # define NODE_EXTERN __attribute__((visibility("default"))) | |
| 33 | 33 | #endif | |
| 34 | 34 | ||
| 35 | + // Declarations annotated with NODE_EXTERN_PRIVATE do not form part of | ||
| 36 | + // the public API. They are implementation details that can and will | ||
| 37 | + // change between releases, even in semver patch releases. Do not use | ||
| 38 | + // any such symbol in external code. | ||
| 39 | + #ifdef NODE_SHARED_MODE | ||
| 40 | + #define NODE_EXTERN_PRIVATE NODE_EXTERN | ||
| 41 | + #else | ||
| 42 | + #define NODE_EXTERN_PRIVATE | ||
| 43 | + #endif | ||
| 44 | + | ||
| 35 | 45 | #ifdef BUILDING_NODE_EXTENSION | |
| 36 | 46 | # undef BUILDING_V8_SHARED | |
| 37 | 47 | # undef BUILDING_UV_SHARED | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -320,13 +320,14 @@ enum InitializationSettingsFlags : uint64_t { | |||
| 320 | 320 | }; | |
| 321 | 321 | ||
| 322 | 322 | // TODO(codebytere): eventually document and expose to embedders. | |
| 323 | - InitializationResult InitializeOncePerProcess(int argc, char** argv); | ||
| 324 | - InitializationResult InitializeOncePerProcess( | ||
| 325 | - int argc, | ||
| 326 | - char** argv, | ||
| 327 | - InitializationSettingsFlags flags, | ||
| 328 | - ProcessFlags::Flags process_flags = ProcessFlags::kNoFlags); | ||
| 329 | - void TearDownOncePerProcess(); | ||
| 323 | + InitializationResult NODE_EXTERN_PRIVATE InitializeOncePerProcess(int argc, | ||
| 324 | + char** argv); | ||
| 325 | + InitializationResult NODE_EXTERN_PRIVATE InitializeOncePerProcess( | ||
| 326 | + int argc, | ||
| 327 | + char** argv, | ||
| 328 | + InitializationSettingsFlags flags, | ||
| 329 | + ProcessFlags::Flags process_flags = ProcessFlags::kNoFlags); | ||
| 330 | + void NODE_EXTERN_PRIVATE TearDownOncePerProcess(); | ||
| 330 | 331 | void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s); | |
| 331 | 332 | void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s); | |
| 332 | 333 | void SetIsolateCreateParamsForNode(v8::Isolate::CreateParams* params); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ using NativeModuleCacheMap = | |||
| 29 | 29 | // This class should not depend on any Environment, or depend on access to | |
| 30 | 30 | // the its own singleton - that should be encapsulated in NativeModuleEnv | |
| 31 | 31 | // instead. | |
| 32 | - class NativeModuleLoader { | ||
| 32 | + class NODE_EXTERN_PRIVATE NativeModuleLoader { | ||
| 33 | 33 | public: | |
| 34 | 34 | NativeModuleLoader(const NativeModuleLoader&) = delete; | |
| 35 | 35 | NativeModuleLoader& operator=(const NativeModuleLoader&) = delete; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -478,7 +478,7 @@ void Parse( | |||
| 478 | 478 | namespace per_process { | |
| 479 | 479 | ||
| 480 | 480 | extern Mutex cli_options_mutex; | |
| 481 | - extern std::shared_ptr<PerProcessOptions> cli_options; | ||
| 481 | + extern NODE_EXTERN_PRIVATE std::shared_ptr<PerProcessOptions> cli_options; | ||
| 482 | 482 | ||
| 483 | 483 | } // namespace per_process | |
| 484 | 484 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ namespace node { | |||
| 13 | 13 | class ExternalReferenceRegistry; | |
| 14 | 14 | struct SnapshotData; | |
| 15 | 15 | ||
| 16 | - class SnapshotBuilder { | ||
| 16 | + class NODE_EXTERN_PRIVATE SnapshotBuilder { | ||
| 17 | 17 | public: | |
| 18 | 18 | static std::string Generate(const std::vector<std::string> args, | |
| 19 | 19 | const std::vector<std::string> exec_args); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,6 +26,8 @@ | |||
| 26 | 26 | ||
| 27 | 27 | #include "v8.h" | |
| 28 | 28 | ||
| 29 | + #include "node.h" | ||
| 30 | + | ||
| 29 | 31 | #include <climits> | |
| 30 | 32 | #include <cstddef> | |
| 31 | 33 | #include <cstdio> | |
@@ -108,8 +110,8 @@ struct AssertionInfo { | |||
| 108 | 110 | const char* message; | |
| 109 | 111 | const char* function; | |
| 110 | 112 | }; | |
| 111 | - [[noreturn]] void Assert(const AssertionInfo& info); | ||
| 112 | - [[noreturn]] void Abort(); | ||
| 113 | + [[noreturn]] void NODE_EXTERN_PRIVATE Assert(const AssertionInfo& info); | ||
| 114 | + [[noreturn]] void NODE_EXTERN_PRIVATE Abort(); | ||
| 113 | 115 | void DumpBacktrace(FILE* fp); | |
| 114 | 116 | ||
| 115 | 117 | // Windows 8+ does not like abort() in Release mode | |
| Back | FazBrowse Home | New Git URL |
0 commit comments