Skip to content
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

Export required symbols for FreeBSD ELFs #105587

Merged
merged 3 commits into from
Jul 28, 2024
Merged

Export required symbols for FreeBSD ELFs #105587

merged 3 commits into from
Jul 28, 2024

Conversation

am11
Copy link
Member

@am11 am11 commented Jul 27, 2024

Closes #105358

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 27, 2024
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

…e.targets

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@@ -244,6 +244,7 @@ The .NET Foundation licenses this file to you under the MIT license.
<IlcArg Condition="'$(ExportsFile)' != ''" Include="--exportsfile:$(ExportsFile)" />
<IlcArg Condition="'$(_targetOS)' == 'win' and '$(DebuggerSupport)' != 'false'" Include="--export-dynamic-symbol:DotNetRuntimeDebugHeader,DATA" />
<IlcArg Condition="'$(_targetOS)' != 'win' and '$(DebuggerSupport)' != 'false'" Include="--export-dynamic-symbol:DotNetRuntimeDebugHeader" />
<IlcArg Condition="'$(_targetOS)' == 'freebsd' and '$(DebuggerSupport)' != 'false'" Include="--export-dynamic-symbol:__progname;--export-dynamic-symbol:environ" />
Copy link
Member

Choose a reason for hiding this comment

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

For my education - where is the semicolon from this recognized as a separator? I do not think that the ILC command line parser treats semicolon as a separator.

Copy link
Member

Choose a reason for hiding this comment

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

MSBuild would consider this as a separator of the different items.

@am11
Copy link
Member Author

am11 commented Jul 28, 2024

webapiaot template app is also responding

root@cbsdnode:~/api1 # dotnet new webapiaot -n api1 && cd api1
root@cbsdnode:~/api1 # ~/.dotnet9/dotnet publish -p:PublishAot=true -p:StripSymbols=false -o dist --packages pkgs
root@cbsdnode:~/api1 # dist/api1 &
root@cbsdnode:~/api1 # info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /root/api1

fetch -qo- http://localhost:5000/todos | jq
[
  {
    "id": 1,
    "title": "Walk the dog",
    "dueBy": null,
    "isComplete": false
  },
  {
    "id": 2,
    "title": "Do the dishes",
    "dueBy": "2024-07-27",
    "isComplete": false
  },
  {
    "id": 3,
    "title": "Do the laundry",
    "dueBy": "2024-07-28",
    "isComplete": false
  },
  {
    "id": 4,
    "title": "Clean the bathroom",
    "dueBy": null,
    "isComplete": false
  },
  {
    "id": 5,
    "title": "Clean the car",
    "dueBy": "2024-07-29",
    "isComplete": false
  }
]

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thank you!

@jkotas jkotas merged commit 8d54d66 into dotnet:main Jul 28, 2024
86 of 88 checks passed
@am11 am11 deleted the patch-8 branch July 28, 2024 16:25
@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member os-freebsd FreeBSD OS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ILCompiler in .NET9 for FreeBSD does not produce usable binaries
3 participants