Skip to content

Do not export symbols for compiler executables under Darwin. #81106

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Apr 25, 2025

This should help reduce the size of the bin folder by about 2%.

Executables that do need these symbols for plugins or similar can opt out of this by passing EXPORT_SYMBOLS_WITH_APPLE_LINKER to add_swift_host_tool.

Addresses rdar://147888376

@edymtt
Copy link
Contributor Author

edymtt commented Apr 25, 2025

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Apr 25, 2025

@swift-ci please build toolchain

@edymtt
Copy link
Contributor Author

edymtt commented Apr 25, 2025

@swift-ci Please Test Source Compatibility

@edymtt
Copy link
Contributor Author

edymtt commented Apr 25, 2025

I have to allow swift-frontend and swift-remoteast-test to export symbols

  Swift(macosx-x86_64) :: Frontend/load-pass-plugin.swift
  Swift(macosx-x86_64) :: RemoteAST/existentials.swift
  Swift(macosx-x86_64) :: RemoteAST/extensions.swift
  Swift(macosx-x86_64) :: RemoteAST/foreign_types.swift
  Swift(macosx-x86_64) :: RemoteAST/member_offsets.swift
  Swift(macosx-x86_64) :: RemoteAST/nominal_types.swift
  Swift(macosx-x86_64) :: RemoteAST/parameterized_existentials.swift
  Swift(macosx-x86_64) :: RemoteAST/structural_types.swift

This should help reduce the size of the `bin` folder by about 2%.

Executables that do need these symbols for plugins or similar can opt
out of this by passing `EXPORT_SYMBOLS_WITH_APPLE_LINKER` to
`add_swift_host_tool` -- for instance that's needed by `swift-frontend`
and `swift-remoteast-test`.

Addresses rdar://147888376
@edymtt edymtt force-pushed the edymtt/no-exported-symbols-for-executables-on-darwin branch from 43504ee to a7d5b4a Compare April 25, 2025 21:26
@edymtt
Copy link
Contributor Author

edymtt commented Apr 25, 2025

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Apr 25, 2025

@swift-ci please build toolchain

@edymtt
Copy link
Contributor Author

edymtt commented Apr 25, 2025

@swift-ci Please Test Source Compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant