Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1c0b32b
from prototype
VSadov Nov 12, 2020
4adfaa6
fix OSX
VSadov Nov 12, 2020
0facc65
fix for Android
VSadov Nov 16, 2020
a2ab07c
treat "libSystem.Globalization.Native" as QCall in mono too (for now).
VSadov Nov 17, 2020
2b2f800
fix for wasm
VSadov Nov 19, 2020
8c4e514
current
VSadov Nov 20, 2020
6e584b4
remove no longer needed hacks
VSadov Nov 20, 2020
ba71464
Undo confusing changes for now
VSadov Nov 20, 2020
4563d69
fix pedantic errors on GCC
VSadov Nov 20, 2020
51281d6
delete gPalGlobalizationNative
VSadov Nov 21, 2020
25369f4
pass overrider from the host
VSadov Nov 21, 2020
e6fca93
default override
VSadov Nov 21, 2020
c11612f
default PInvoke override runs after optional host-provided overrider.
VSadov Nov 23, 2020
d3f4abe
Some PR feedback (mostly related to code, not the CMake stuff).
VSadov Nov 25, 2020
79453c7
more coding PR feedback
VSadov Dec 1, 2020
becda0e
Deleted "libraries-native" folder.
VSadov Dec 1, 2020
932b5fe
unifying tryrun.cmake into 1 common file
VSadov Dec 2, 2020
3f5cea9
factor out adding lib-specific dependencies into one place (per nativ…
VSadov Dec 3, 2020
8d2b6b9
cleanup: entirely remove tryrun.cmake propagation in eng, gen-buildsy…
VSadov Dec 3, 2020
9b7476f
remove "clrcompression.dll" and "libSystem.IO.Compression.Native.dyli…
VSadov Dec 3, 2020
8a02254
mono: refactor Globalization lookup into `default_resolve_dllimport`.
VSadov Dec 3, 2020
f22e9fd
set FEATURE_DISTRO_AGNOSTIC_SSL according to __PortableBuild
VSadov Dec 3, 2020
e539a1a
CORECLR_CALLING_CONVENTION for the host callback types
VSadov Dec 3, 2020
06dad00
revert change in pal_gssapi.h
VSadov Dec 3, 2020
ac026ba
keep the #include "pal_config.h"
VSadov Dec 4, 2020
eb62c4a
refactor common parts of entrypoints.c into entrypoints.h
VSadov Dec 4, 2020
2f45a47
rename OverrideEntry --> DllImportEntry
VSadov Dec 4, 2020
7b2bdef
extra libs as CMake functions
VSadov Dec 4, 2020
7ab3211
use macros instead of functions in extra_libs.cmake
VSadov Dec 4, 2020
7bf0a63
mono formatting style in src/mono/mono/metadata/native-library.c
VSadov Dec 4, 2020
d3a15fa
mono: Remaining stylistic nits.
VSadov Dec 4, 2020
6c55b68
do not set DFEATURE_DISTRO_AGNOSTIC_SSL on iOS, Android, tvOS
VSadov Dec 7, 2020
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
Prev Previous commit
Next Next commit
more coding PR feedback
  • Loading branch information
VSadov committed Dec 5, 2020
commit 79453c72ea171a8061a2e0277bfc6c7696fd64b3
1 change: 1 addition & 0 deletions src/coreclr/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include_directories("classlibnative/bcltype")
include_directories("classlibnative/cryptography")
include_directories("classlibnative/inc")
include_directories("${GENERATED_INCLUDE_DIR}")
include_directories("hosts/inc")

if(CLR_CMAKE_TARGET_WIN32 AND FEATURE_EVENT_TRACE)
include_directories("${GENERATED_INCLUDE_DIR}/etw")
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/src/dlls/mscoree/unixinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static void ConvertConfigPropertiesToUnicode(
int propertyCount,
LPCWSTR** propertyKeysWRef,
LPCWSTR** propertyValuesWRef,
BundleProbe** bundleProbe,
BundleProbeFn** bundleProbe,
PInvokeOverrideFn** pinvokeOverride,
bool* hostPolicyEmbedded)
{
Expand All @@ -139,7 +139,7 @@ static void ConvertConfigPropertiesToUnicode(
{
// If this application is a single-file bundle, the bundle-probe callback
// is passed in as the value of "BUNDLE_PROBE" property (encoded as a string).
*bundleProbe = (BundleProbe*)_wcstoui64(propertyValuesW[propertyIndex], nullptr, 0);
*bundleProbe = (BundleProbeFn*)_wcstoui64(propertyValuesW[propertyIndex], nullptr, 0);
}
else if (strcmp(propertyKeys[propertyIndex], "PINVOKE_OVERRIDE") == 0)
{
Expand Down Expand Up @@ -193,7 +193,7 @@ int coreclr_initialize(

LPCWSTR* propertyKeysW;
LPCWSTR* propertyValuesW;
BundleProbe* bundleProbe = nullptr;
BundleProbeFn* bundleProbe = nullptr;
bool hostPolicyEmbedded = false;
PInvokeOverrideFn* pinvokeOverride = nullptr;

Expand Down
9 changes: 9 additions & 0 deletions src/coreclr/src/hosts/inc/coreclrhost.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#define CORECLR_CALLING_CONVENTION
#endif

#include <stdint.h>

// For each hosting API, we define a function prototype and a function pointer
// The prototype is useful for implicit linking against the dynamic coreclr
// library and the pointer for explicit dynamic loading (dlopen, LoadLibrary)
Expand Down Expand Up @@ -121,4 +123,11 @@ CORECLR_HOSTING_API(coreclr_execute_assembly,

#undef CORECLR_HOSTING_API

//
// Callback types used by the hosts
//
typedef bool(BundleProbeFn)(const char* path, int64_t* offset, int64_t* size);
Copy link
Member

Choose a reason for hiding this comment

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

These type definitions should include the CORECLR_CALLING_CONVENTION, otherwise on x86 Windows, a wrong calling convention might get used depending on what calling convention the host has set as default.

typedef const void* (PInvokeOverrideFn)(const char* libraryName, const char* entrypointName);


#endif // __CORECLR_HOST_H__
7 changes: 3 additions & 4 deletions src/coreclr/src/inc/bundle.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define _BUNDLE_H_

#include <sstring.h>
#include "coreclrhost.h"

class Bundle;

Expand All @@ -34,12 +35,10 @@ struct BundleFileLocation
bool IsValid() const { LIMITED_METHOD_CONTRACT; return Offset != 0; }
};

typedef bool(BundleProbe)(LPCSTR, INT64*, INT64*);

class Bundle
{
public:
Bundle(LPCSTR bundlePath, BundleProbe *probe);
Bundle(LPCSTR bundlePath, BundleProbeFn *probe);
BundleFileLocation Probe(const SString& path, bool pathIsBundleRelative = false) const;

const SString &Path() const { LIMITED_METHOD_CONTRACT; return m_path; }
Expand All @@ -52,7 +51,7 @@ class Bundle
private:

SString m_path; // The path to single-file executable
BundleProbe *m_probe;
BundleProbeFn *m_probe;

SString m_basePath; // The prefix to denote a path within the bundle
COUNT_T m_basePathLength;
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/inc/pinvokeoverride.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef _PINVOKEOVERRIDE_H_
#define _PINVOKEOVERRIDE_H_

typedef const void* (PInvokeOverrideFn)(const char* libraryName, const char* entrypointName);
#include "coreclrhost.h"

class PInvokeOverride
{
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/src/vm/bundle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const SString &BundleFileLocation::Path() const
return Bundle::AppBundle->Path();
}

Bundle::Bundle(LPCSTR bundlePath, BundleProbe *probe)
Bundle::Bundle(LPCSTR bundlePath, BundleProbeFn *probe)
{
STANDARD_VM_CONTRACT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ namespace
}

#if defined(NATIVE_LIBS_EMBEDDED)
extern "C" const void* GlobalizationResolveDllImport(const char* name);
extern "C" const void* CompressionResolveDllImport(const char* name);

// pinvoke_override:
Expand Down