-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add diagnostic support into sample app and AppBuilders on Mono. #53361
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ MONO_ARCH=x64 | |
DOTNET := ../../../../dotnet.sh | ||
USE_LLVM=true | ||
AOT=false | ||
#RUNTIME_COMPONENTS=diagnostics_tracing | ||
#DIAGNOSTIC_PORTS=127.0.0.1:9000,nosuspend | ||
#DIAGNOSTIC_PORTS=127.0.0.1:9000,suspend | ||
#DIAGNOSTIC_PORTS=$(DOTNET_DiagnosticPorts) | ||
|
||
all: runtimepack run | ||
|
||
|
@@ -15,24 +19,51 @@ runtimepack: | |
../../../../build.sh Mono+Libs -os iOSSimulator -arch $(MONO_ARCH) -c $(MONO_CONFIG) | ||
|
||
run: clean appbuilder | ||
$(DOTNET) publish -c $(MONO_CONFIG) /p:TargetArchitecture=$(MONO_ARCH) \ | ||
/p:UseLLVM=$(USE_LLVM) /p:ForceAOT=$(AOT) | ||
$(DOTNET) publish \ | ||
-c $(MONO_CONFIG) \ | ||
/p:TargetArchitecture=$(MONO_ARCH) \ | ||
/p:UseLLVM=$(USE_LLVM) \ | ||
/p:ForceAOT=$(AOT) \ | ||
'/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this format There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since it includes and there are various workarounds to the problem, one of them is in this PR, but also suggested in different places, like here dotnet/msbuild#471 (comment). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, good to know, thanks for the explanation :) |
||
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' | ||
|
||
run-sim: clean appbuilder | ||
$(DOTNET) publish -c $(MONO_CONFIG) /p:TargetOS=iOSSimulator /p:TargetArchitecture=$(MONO_ARCH) \ | ||
/p:UseLLVM=$(USE_LLVM) /p:ForceAOT=$(AOT) | ||
$(DOTNET) publish \ | ||
-c $(MONO_CONFIG) \ | ||
/p:TargetOS=iOSSimulator \ | ||
/p:TargetArchitecture=$(MONO_ARCH) \ | ||
/p:UseLLVM=$(USE_LLVM) \ | ||
/p:ForceAOT=$(AOT) \ | ||
'/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \ | ||
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' | ||
|
||
run-catalyst: | ||
$(DOTNET) publish -c $(MONO_CONFIG) /p:TargetOS=MacCatalyst /p:TargetArchitecture=$(MONO_ARCH) \ | ||
/p:UseLLVM=False /p:ForceAOT=False | ||
$(DOTNET) publish \ | ||
-c $(MONO_CONFIG) \ | ||
/p:TargetOS=MacCatalyst \ | ||
/p:TargetArchitecture=$(MONO_ARCH) \ | ||
/p:UseLLVM=False \ | ||
/p:ForceAOT=False | ||
|
||
run-sim-interp: clean appbuilder | ||
$(DOTNET) publish -c $(MONO_CONFIG) /p:TargetOS=iOSSimulator /p:TargetArchitecture=$(MONO_ARCH) \ | ||
/p:UseLLVM=$(USE_LLVM) /p:ForceAOT=$(AOT) /p:MonoForceInterpreter=true | ||
$(DOTNET) publish \ | ||
-c $(MONO_CONFIG) \ | ||
/p:TargetOS=iOSSimulator \ | ||
/p:TargetArchitecture=$(MONO_ARCH) \ | ||
/p:UseLLVM=$(USE_LLVM) \ | ||
/p:ForceAOT=$(AOT) \ | ||
/p:MonoForceInterpreter=true \ | ||
'/p:RuntimeComponents="$(RUNTIME_COMPONENTS)"' \ | ||
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' | ||
|
||
run-catalyst-interp: | ||
$(DOTNET) publish -c $(MONO_CONFIG) /p:TargetOS=MacCatalyst /p:TargetArchitecture=$(MONO_ARCH) \ | ||
/p:UseLLVM=False /p:ForceAOT=False /p:MonoForceInterpreter=true | ||
$(DOTNET) publish \ | ||
-c $(MONO_CONFIG) \ | ||
/p:TargetOS=MacCatalyst \ | ||
/p:TargetArchitecture=$(MONO_ARCH) \ | ||
/p:UseLLVM=False \ | ||
/p:ForceAOT=False \ | ||
/p:MonoForceInterpreter=true | ||
|
||
clean: | ||
rm -rf bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since they're all commented out, can it be noted in the makefiles that
RUNTIME_COMPONENTS
andDIAGNOSTIC_PORTS
should be uncommented together if at all?Also, out of curiosity, how were
10.0.2.2:9000
and127.0.0.1:9000
selected (having no prior context of diagnostic ports)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add more comments into the script.
There are no dedicated port numbers, so could be anything.
10.0.2.2 is how you reach host loopback from Android emulator (without need to use adb). On iOS, 127.0.0.1 can still be used from simulator. But as above these are just examples and might need to be adjusted if you run different scenario.