Skip to content

Commit

Permalink
[net8.0] [src] Add the RequiresPreviewFeatures attribute if we're usi…
Browse files Browse the repository at this point in the history
…ng an unstable version of Xcode. Contributes towards #18343. (#18488)

Android does the same.

Contributes towards #18343.
  • Loading branch information
rolfbjarne authored Jun 26, 2023
1 parent 52e6ce2 commit 39da079
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/AssemblyInfo.cs.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ using System.Runtime.CompilerServices;
// in order to compile stuff, we erase the third and fourth number and only use 0 for both.
[assembly: AssemblyVersion ("@NUGET_VERSION_MAJOR@.@NUGET_VERSION_MINOR@.0.0")]
#endif

#if NET && !XCODE_IS_STABLE && !COREBUILD
[assembly: RequiresPreviewFeatures("These are preview bindings for an unstable version of Xcode. Opt into preview features by adding <EnablePreviewFeatures>True</EnablePreviewFeatures> to your project file.")]
#endif
4 changes: 4 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ DOTNET_REFERENCES = \
DOTNET_OR_GREATER_DEFINES:=$(foreach version,$(shell seq 6 $(firstword $(subst ., ,$(subst net,,$(DOTNET_TFM))))),/define:NET$(version)_0_OR_GREATER)
DOTNET_FLAGS=/noconfig /nostdlib+ /deterministic /features:strict /nologo /target:library /debug /unsafe /define:NET /define:NET_TODO /define:XAMCORE_3_0 $(DOTNET_OR_GREATER_DEFINES) $(DOTNET_REFERENCES)

ifeq ($(XCODE_IS_STABLE),true)
DOTNET_FLAGS+=/define:XCODE_IS_STABLE
endif

DOTNET_COMPILER=$(DOTNET_BUILD_DIR)/compiler
DOTNET_GENERATOR_FLAGS=$(GENERATOR_FLAGS) -compiler=$(abspath $(DOTNET_COMPILER)) --lib=$(DOTNET_BCL_DIR) -attributelib:$(DOTNET_BINDING_ATTRIBUTES) $(DOTNET_REFERENCES)
DOTNET_GENERATOR=$(DOTNET_BUILD_DIR)/bgen/bgen
Expand Down

6 comments on commit 39da079

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.