Skip to content

Commit 33b37cf

Browse files
Merge pull request #44 from tannergooding/main
Regenerate bindings using the latest ClangSharp
2 parents 073adaa + 99a5223 commit 33b37cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+437
-361
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ csharp_style_implicit_object_creation_when_type_is_apparent = false:error
417417

418418
csharp_style_inlined_variable_declaration = true:error
419419

420-
csharp_style_namespace_declarations= file_scoped:error
420+
csharp_style_namespace_declarations = file_scoped:error
421421

422422
csharp_style_pattern_local_over_anonymous_function = true:error
423423
csharp_style_pattern_matching_over_as_with_null_check = true:error

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
<PackageOutputPath>$(BaseArtifactsPath)pkg/$(Configuration)/</PackageOutputPath>
4646
<Product>TerraFX.Interop.Xlib</Product>
4747
<RootNamespace>TerraFX.Interop</RootNamespace>
48-
<VersionPrefix>6.3.0</VersionPrefix>
49-
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">beta4</VersionSuffix>
48+
<VersionPrefix>6.4.0</VersionPrefix>
49+
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">rc1</VersionSuffix>
5050
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">pr</VersionSuffix>
5151
</PropertyGroup>
5252

Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<!-- Settings that append the existing setting value -->
1414
<PropertyGroup>
15-
<NoWarn>$(NoWarn);AD0001</NoWarn>
15+
<NoWarn>$(NoWarn)</NoWarn>
1616
</PropertyGroup>
1717

1818
<!-- Settings that are only set for CI builds -->

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
<!-- Package versions for package references across all projects -->
1414
<ItemGroup>
15-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.3.0" />
15+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
1616
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
1717
<PackageVersion Include="NUnit" Version="3.13.3" />
18-
<PackageVersion Include="NUnit3TestAdapter" Version="4.2.1" />
18+
<PackageVersion Include="NUnit3TestAdapter" Version="4.3.1" />
1919
</ItemGroup>
2020

2121
</Project>

TerraFX.Interop.Xlib.sln

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".root", ".root", "{2F337CB6
1111
build.sh = build.sh
1212
Directory.Build.props = Directory.Build.props
1313
Directory.Build.targets = Directory.Build.targets
14+
global.json = global.json
1415
LICENSE.md = LICENSE.md
1516
NOTICE.md = NOTICE.md
1617
pack.cmd = pack.cmd
@@ -24,8 +25,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".root", ".root", "{2F337CB6
2425
EndProject
2526
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{8793898A-6542-4606-AA82-AB14151D2D20}"
2627
ProjectSection(SolutionItems) = preProject
27-
docs\CODE_OF_CONDUCT.md = docs\CODE_OF_CONDUCT.md
2828
docs\CODEOWNERS = docs\CODEOWNERS
29+
docs\CODE_OF_CONDUCT.md = docs\CODE_OF_CONDUCT.md
2930
docs\CONTRIBUTING.md = docs\CONTRIBUTING.md
3031
docs\ISSUE_TEMPLATE.md = docs\ISSUE_TEMPLATE.md
3132
docs\PULL_REQUEST_TEMPLATE.md = docs\PULL_REQUEST_TEMPLATE.md

generation/settings.rsp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,23 @@ exclude-empty-records
1616
exclude-enum-operators
1717
generate-aggressive-inlining
1818
generate-cpp-attributes
19+
generate-file-scoped-namespaces
20+
generate-guid-member
1921
generate-macro-bindings
22+
generate-marker-interfaces
2023
generate-native-inheritance-attribute
24+
generate-setslastsystemerror-attribute
2125
generate-tests-nunit
2226
generate-unmanaged-constants
2327
generate-vtbl-index-attribute
2428
log-potential-typedef-remappings
2529
multi-file
30+
preview-codegen
31+
trimmable-vtbls
2632
--headerFile
2733
header.txt
2834
--include-directory
29-
/usr/lib/gcc/x86_64-linux-gnu/9/include
35+
/usr/lib/gcc/x86_64-linux-gnu/11/include
3036
/usr/include/x86_64-linux-gnu
3137
/usr/include
3238
--with-callconv

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "7.0.100",
4+
"allowPrerelease": false,
5+
"rollForward": "latestFeature"
6+
}
7+
}

scripts/build.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $ErrorActionPreference = "Stop"
1919

2020
function Build() {
2121
$logFile = Join-Path -Path $LogDir -ChildPath "$configuration\build.binlog"
22-
& dotnet build -c "$configuration" --no-restore -v "$verbosity" /bl:"$logFile" /err "$properties" "$solution"
22+
& dotnet build -c "$configuration" --no-restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "$properties" "$solution"
2323

2424
if ($LastExitCode -ne 0) {
2525
throw "'Build' failed for '$solution'"
@@ -55,7 +55,7 @@ function Help() {
5555

5656
function Pack() {
5757
$logFile = Join-Path -Path $LogDir -ChildPath "$configuration\pack.binlog"
58-
& dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile" /err "$properties" "$solution"
58+
& dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "$properties" "$solution"
5959

6060
if ($LastExitCode -ne 0) {
6161
throw "'Pack' failed for '$solution'"
@@ -64,7 +64,7 @@ function Pack() {
6464

6565
function Restore() {
6666
$logFile = Join-Path -Path $LogDir -ChildPath "$configuration\restore.binlog"
67-
& dotnet restore -v "$verbosity" /bl:"$logFile" /err "$properties" "$solution"
67+
& dotnet restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "$properties" "$solution"
6868

6969
if ($LastExitCode -ne 0) {
7070
throw "'Restore' failed for '$solution'"
@@ -73,7 +73,7 @@ function Restore() {
7373

7474
function Test() {
7575
$logFile = Join-Path -Path $LogDir -ChildPath "$configuration\test.binlog"
76-
& dotnet test -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile" /err "$properties" "$solution"
76+
& dotnet test -c "$configuration" --no-build --no-restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "$properties" "$solution"
7777

7878
if ($LastExitCode -ne 0) {
7979
throw "'Test' failed for '$solution'"

scripts/build.sh

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ function Build {
7979
logFile="$LogDir/$configuration/build.binlog"
8080

8181
if [[ -z "$properties" ]]; then
82-
dotnet build -c "$configuration" --no-restore -v "$verbosity" /bl:"$logFile" /err "$solution"
82+
dotnet build -c "$configuration" --no-restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "$solution"
8383
else
84-
dotnet build -c "$configuration" --no-restore -v "$verbosity" /bl:"$logFile" /err "${properties[@]}" "$solution"
84+
dotnet build -c "$configuration" --no-restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "${properties[@]}" "$solution"
8585
fi
8686

8787
LASTEXITCODE=$?
@@ -108,6 +108,13 @@ function Generate {
108108
ClangSharpPInvokeGenerator "@generate.rsp"
109109
popd
110110
done
111+
112+
LASTEXITCODE=$?
113+
114+
if [ "$LASTEXITCODE" != 0 ]; then
115+
echo "'Build' failed for '$solution'"
116+
return "$LASTEXITCODE"
117+
fi
111118
}
112119

113120
function Help {
@@ -135,9 +142,9 @@ function Pack {
135142
logFile="$LogDir/$configuration/pack.binlog"
136143

137144
if [[ -z "$properties" ]]; then
138-
dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile" /err "$solution"
145+
dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "$solution"
139146
else
140-
dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile" /err "${properties[@]}" "$solution"
147+
dotnet pack -c "$configuration" --no-build --no-restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "${properties[@]}" "$solution"
141148
fi
142149

143150
LASTEXITCODE=$?
@@ -152,9 +159,9 @@ function Restore {
152159
logFile="$LogDir/$configuration/restore.binlog"
153160

154161
if [[ -z "$properties" ]]; then
155-
dotnet restore -v "$verbosity" /bl:"$logFile" /err "$solution"
162+
dotnet restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "$solution"
156163
else
157-
dotnet restore -v "$verbosity" /bl:"$logFile" /err "${properties[@]}" "$solution"
164+
dotnet restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "${properties[@]}" "$solution"
158165
fi
159166

160167
LASTEXITCODE=$?
@@ -169,9 +176,9 @@ function Test {
169176
logFile="$LogDir/$configuration/test.binlog"
170177

171178
if [[ -z "$properties" ]]; then
172-
dotnet test -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile" /err "$solution"
179+
dotnet test -c "$configuration" --no-build --no-restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "$solution"
173180
else
174-
dotnet test -c "$configuration" --no-build --no-restore -v "$verbosity" /bl:"$logFile" /err "${properties[@]}" "$solution"
181+
dotnet test -c "$configuration" --no-build --no-restore -v "$verbosity" /p:Platform="Any CPU" /bl:"$logFile" /err "${properties[@]}" "$solution"
175182
fi
176183

177184
LASTEXITCODE=$?
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
2+
3+
namespace System.Diagnostics.CodeAnalysis;
4+
5+
[AttributeUsageAttribute(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, Inherited = false)]
6+
internal sealed class UnscopedRefAttribute : Attribute
7+
{
8+
}

0 commit comments

Comments
 (0)