mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fix missing of symbols issue on Release build
This commit is contained in:
committed by
Kevin Sawicki
parent
41f356a94d
commit
82d796ded4
@@ -6,6 +6,9 @@
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#include "v8-profiler.h"
|
||||
#include "v8-inspector.h"
|
||||
|
||||
namespace node {
|
||||
|
||||
int open_osfhandle(intptr_t osfhandle, int flags) {
|
||||
@@ -16,4 +19,12 @@ int close(int fd) {
|
||||
return _close(fd);
|
||||
}
|
||||
|
||||
void ReferenceSymbols() {
|
||||
// Following symbols are used by electron.exe but got stripped by compiler,
|
||||
// for some reason, adding them to ForceSymbolReferences does not work,
|
||||
// probably because of VC++ bugs.
|
||||
v8::TracingCpuProfiler::Create(nullptr);
|
||||
reinterpret_cast<v8_inspector::V8InspectorClient*>(nullptr)->unmuteMetrics(0);
|
||||
}
|
||||
|
||||
} // namespace node
|
||||
|
||||
@@ -21,6 +21,9 @@ namespace node {
|
||||
__declspec(dllexport) int open_osfhandle(intptr_t osfhandle, int flags);
|
||||
__declspec(dllexport) int close(int fd);
|
||||
|
||||
// A trick to force referencing symbols.
|
||||
__declspec(dllexport) void ReferenceSymbols();
|
||||
|
||||
} // namespace node
|
||||
|
||||
#endif // ATOM_NODE_OSFHANDLE_H_
|
||||
|
||||
Reference in New Issue
Block a user