-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cdac] link a stub contract descriptor if cdac-build-tool is not avai…
…lable (#101297) * [cdac] link a stub contract descriptor if cdac-build-tool is not available Fixes builds that use src/coreclr/build-runtime.sh directly, or bringup scenarios without msbuild * Use DOTNET_HOST_PATH to run cdac-build-tool Related to dotnet/installer#19534 (comment) it's only unset by .NET Framework which is not supported by runtime.proj --------- Co-authored-by: Adeel Mujahid <[email protected]>
- Loading branch information
Showing
3 changed files
with
85 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
#include <stdint.h> | ||
|
||
#ifdef _MSC_VER | ||
#define DLLEXPORT __declspec(dllexport) | ||
#else | ||
#define DLLEXPORT __attribute__((visibility("default"))) | ||
#endif | ||
|
||
struct DotNetRuntimeContractDescriptor | ||
{ | ||
uint64_t magic; | ||
uint32_t flags; | ||
const uint32_t descriptor_size; | ||
const char *descriptor; | ||
const uint32_t pointer_data_count; | ||
uint32_t pad0; | ||
const uintptr_t *pointer_data; | ||
}; | ||
|
||
extern const uintptr_t contractDescriptorPointerData[]; | ||
|
||
// just the placeholder pointer | ||
const uintptr_t contractDescriptorPointerData[] = { (uintptr_t)0 }; | ||
|
||
DLLEXPORT struct DotNetRuntimeContractDescriptor DotNetRuntimeContractDescriptor; | ||
|
||
#define STUB_DESCRIPTOR "{\"version\":0,\"baseline\":\"empty\",\"contracts\":{},\"types\":{},\"globals\":{}}" | ||
|
||
DLLEXPORT struct DotNetRuntimeContractDescriptor DotNetRuntimeContractDescriptor = { | ||
.magic = 0x0043414443434e44ull, // "DNCCDAC\0" | ||
.flags = 0x1u & (sizeof(void*) == 4 ? 0x02u : 0x00u), | ||
.descriptor_size = sizeof(STUB_DESCRIPTOR), | ||
.descriptor = STUB_DESCRIPTOR, | ||
.pointer_data_count = 1, | ||
.pointer_data = &contractDescriptorPointerData[0], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters