Skip to content

Commit c55d3a7

Browse files
Ensure OnChakraCoreLoadedEntry is visible
1 parent cb550bb commit c55d3a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/ch/ch.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//-------------------------------------------------------------------------------------------------------
22
// Copyright (C) Microsoft. All rights reserved.
3-
// Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
3+
// Copyright (c) ChakraCore Project Contributors. All rights reserved.
44
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
55
//-------------------------------------------------------------------------------------------------------
66
#include "stdafx.h"
@@ -24,8 +24,10 @@ Debugger* Debugger::debugger = nullptr;
2424

2525
#ifdef _WIN32
2626
LPCWSTR hostName = _u("ch.exe");
27+
#define EXPORT_VISIBLE
2728
#else
2829
LPCWSTR hostName = _u("ch");
30+
#define EXPORT_VISIBLE __attribute__((visibility("default")))
2931
#endif
3032

3133
JsRuntimeHandle chRuntime = JS_INVALID_RUNTIME_HANDLE;
@@ -42,7 +44,7 @@ UINT32 startEventCount = 1;
4244

4345
HRESULT RunBgParseSync(LPCSTR fileContents, UINT lengthBytes, const char* fileName);
4446

45-
extern "C"
47+
extern "C" EXPORT_VISIBLE
4648
HRESULT __stdcall OnChakraCoreLoadedEntry(TestHooks& testHooks)
4749
{
4850
return ChakraRTInterface::OnChakraCoreLoaded(testHooks);

0 commit comments

Comments
 (0)